Coverity #470
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Coverity | |
| on: | |
| push: | |
| branches: | |
| - coverity_scan | |
| schedule: | |
| - cron: '0 20 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| coverity: | |
| if: github.repository_owner == 'FreeRADIUS' | |
| runs-on: self-hosted | |
| container: | |
| image: docker.internal.networkradius.com/self-hosted | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Download coverity tool MD5 | |
| run: | | |
| wget https://scan.coverity.com/download/linux64 \ | |
| --post-data "token=${TOKEN}&project=${OWNER}%2Ffreeradius-server&md5=1" \ | |
| -O coverity_tool.tar.gz.md5 | |
| env: | |
| TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| OWNER: ${{ github.repository_owner }} | |
| - name: Cache coverity tool | |
| uses: actions/cache@v5 | |
| id: cache-coverity | |
| with: | |
| path: coverity_tool.tar.gz | |
| key: coverity-tool-cache-${{ hashFiles('coverity_tool.tar.gz.md5') }} | |
| - name: Download coverity tool | |
| if: steps.cache-coverity.outputs.cache-hit != 'true' | |
| run: | | |
| wget https://scan.coverity.com/download/linux64 \ | |
| --post-data "token=${TOKEN}&project=${OWNER}%2Ffreeradius-server" \ | |
| -O coverity_tool.tar.gz | |
| env: | |
| TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| OWNER: ${{ github.repository_owner }} | |
| - name: Extract coverity tool | |
| run: | | |
| mkdir coverity_tool | |
| tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool | |
| - name: Build with Coverity | |
| run: | | |
| export CC=clang | |
| export PATH=`pwd`/coverity_tool/bin:$PATH | |
| ./configure -with-rlm-python-bin=/usr/bin/python2.7 | |
| cov-configure --template --compiler clang --comptype clangcc | |
| cov-build --dir cov-int make | |
| - name: Display build result | |
| run: | | |
| cat cov-int/build-log.txt | |
| - name: Submit result | |
| run: | | |
| tar czf cov-int.tar.gz cov-int | |
| curl \ | |
| --form token="$TOKEN" \ | |
| --form email="freeradius-devel@lists.freeradius.org" \ | |
| --form file=@cov-int.tar.gz \ | |
| --form version="`cat VERSION`" \ | |
| --form description="FreeRADIUS" \ | |
| https://scan.coverity.com/builds?project=${OWNER}%2Ffreeradius-server | |
| env: | |
| TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| OWNER: ${{ github.repository_owner }} |