|
| 1 | +name: Coverity Scan |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | +# push: |
| 6 | +# branches: |
| 7 | +# - master |
| 8 | +# schedule: |
| 9 | +# # Run once a week on Sunday at midnight UTC |
| 10 | +# - cron: '0 4 * * 0' |
| 11 | + |
| 12 | +jobs: |
| 13 | + coverity: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + container: |
| 16 | + image: fedora:latest |
| 17 | + steps: |
| 18 | + - name: Prepare environment |
| 19 | + run: | |
| 20 | + dnf -y upgrade |
| 21 | + dnf -y install @development-tools libtool bzip2 gettext-devel ncurses-devel awk curl wget tar file |
| 22 | +
|
| 23 | + - name: Checkout alsa-lib |
| 24 | + uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + repository: alsa-project/alsa-lib |
| 27 | + ref: master |
| 28 | + path: alsa-lib |
| 29 | + |
| 30 | + - name: Configure alsa-lib |
| 31 | + run: | |
| 32 | + cd alsa-lib |
| 33 | + head -5 configure.ac |
| 34 | + libtoolize --force --copy --automake |
| 35 | + aclocal |
| 36 | + autoheader |
| 37 | + automake --foreign --copy --add-missing |
| 38 | + autoconf |
| 39 | + export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" |
| 40 | + ./configure |
| 41 | + echo "Version: $(cat version)" |
| 42 | +
|
| 43 | + - name: Build alsa-lib |
| 44 | + run: | |
| 45 | + cd alsa-lib |
| 46 | + make |
| 47 | +
|
| 48 | + - name: Install alsa-lib |
| 49 | + run: | |
| 50 | + cd alsa-lib |
| 51 | + make install |
| 52 | +
|
| 53 | + - name: Checkout alsa-utils |
| 54 | + uses: actions/checkout@v4 |
| 55 | + with: |
| 56 | + path: alsa-utils |
| 57 | + |
| 58 | + - name: Configure alsa-utils |
| 59 | + run: | |
| 60 | + cd alsa-utils |
| 61 | + mv configure.ac configure.ac.old |
| 62 | + sed -e 's;po/Makefile.in;;' < configure.ac.old > configure.ac |
| 63 | + aclocal |
| 64 | + gettextize -c -f --no-changelog |
| 65 | + libtoolize --force --copy --automake |
| 66 | + aclocal -I m4 |
| 67 | + autoheader |
| 68 | + automake --foreign --copy --add-missing |
| 69 | + autoconf |
| 70 | + export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" |
| 71 | + ./configure |
| 72 | +
|
| 73 | + - name: Download Coverity Build Tool |
| 74 | + run: | |
| 75 | + cd alsa-utils |
| 76 | + wget -q https://scan.coverity.com/download/linux64 \ |
| 77 | + --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=${{ secrets.COVERITY_SCAN_PROJECT }}" \ |
| 78 | + -O coverity_tool.tar.gz |
| 79 | + mkdir coverity-tool |
| 80 | + tar xzf coverity_tool.tar.gz --strip-components=1 -C coverity-tool |
| 81 | +
|
| 82 | + - name: Build with Coverity Build Tool |
| 83 | + run: | |
| 84 | + cd alsa-utils |
| 85 | + export PATH="$PWD/coverity-tool/bin:$PATH" |
| 86 | + cov-build --dir cov-int make |
| 87 | +
|
| 88 | + - name: Submit results to Coverity Scan |
| 89 | + run: | |
| 90 | + cd alsa-utils |
| 91 | + tar czvf alsa-utils.tgz cov-int |
| 92 | + curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ |
| 93 | + --form email=${{ secrets.COVERITY_SCAN_EMAIL }} \ |
| 94 | + |
| 95 | + --form version="$(git describe --tags --always)" \ |
| 96 | + --form description="ALSA Utils Coverity Scan" \ |
| 97 | + https://scan.coverity.com/builds?project=alsa-project%2Falsa-utils |
0 commit comments