summaryrefslogtreecommitdiffstats
path: root/.github/workflows/coverity.yml
blob: 4c3e2e4824a1379c06fc7014ed8aaf5434897896 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Coverity Scan

on:
  push:
    branches:
      - coverity_scan

jobs:
  submit:
    name: Submit
    runs-on: ubuntu-22.04
    steps:
      - name: Check out code
        uses: actions/checkout@v4
      - name: Download Coverity Scan
        run: |
          curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
               --form project=${{ github.repository }} \
               --output coverity.tar.gz \
               https://scan.coverity.com/download/cxx/linux64
          mkdir -p /opt/coverity
          sudo tar xvzf coverity.tar.gz --strip 1 --directory /opt/coverity
      - name: Build via Coverity Scan
        run: |
          make -C src bin/deps
          /opt/coverity/bin/cov-build --dir cov-int make -C src bin/blib.a
      - name: Create submission
        run : |
          tar cvzf cov-int.tar.gz cov-int
      - name: Submit to Coverity Scan
        run: |
          curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
               --form email=${{ secrets.COVERITY_SCAN_EMAIL }} \
               --form file=@cov-int.tar.gz \
               --form version=${{ github.sha }} \
               --form description=${{ github.ref }} \
               https://scan.coverity.com/builds?project=${{ github.repository }}