Coverity Scan #2
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 Scan | |
| on: | |
| schedule: | |
| - cron: "0 1 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: coverity-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| COVERITY_PROJECT: IntelPython/mkl_fft | |
| jobs: | |
| coverity-scan: | |
| if: github.repository == 'IntelPython/mkl_fft' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.12" | |
| architecture: x64 | |
| - name: Install mkl_fft dependencies | |
| run: pip install meson-python ninja cmake cython "numpy>=2" mkl-devel | |
| - name: Download Coverity Build Tool | |
| timeout-minutes: 15 | |
| env: | |
| COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| run: | | |
| curl --location --no-progress-meter --fail-with-body \ | |
| --retry 5 --retry-connrefused --retry-delay 5 \ | |
| --data-urlencode "token=${COVERITY_SCAN_TOKEN}" \ | |
| --data-urlencode "project=${COVERITY_PROJECT}" \ | |
| --output cov-analysis.tar.gz \ | |
| https://scan.coverity.com/download/linux64 | |
| mkdir -p cov-analysis | |
| tar -xzf cov-analysis.tar.gz --strip 1 -C cov-analysis | |
| echo "${PWD}/cov-analysis/bin" >> "$GITHUB_PATH" | |
| - name: Configure Coverity for GCC | |
| run: cov-configure --gcc | |
| - name: Build under cov-build | |
| timeout-minutes: 20 | |
| run: | | |
| rm -rf build | |
| cov-build --dir cov-int pip install -e . --no-build-isolation --no-deps 2>&1 | tee cov-build.log | |
| if ! grep -qE "Emitted [1-9][0-9]* .*compilation unit" cov-build.log; then | |
| echo "::error::Coverity captured 0 compilation units — the C build did not run under cov-build." | |
| exit 1 | |
| fi | |
| - name: Submit results to Coverity Scan | |
| timeout-minutes: 15 | |
| env: | |
| COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} | |
| COVERITY_SCAN_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} | |
| run: | | |
| tar -czf cov-int.tgz cov-int | |
| curl --no-progress-meter --fail-with-body \ | |
| --retry 5 --retry-connrefused --retry-delay 5 \ | |
| --form token="${COVERITY_SCAN_TOKEN}" \ | |
| --form email="${COVERITY_SCAN_EMAIL}" \ | |
| --form file=@cov-int.tgz \ | |
| --form version="${GITHUB_SHA}" \ | |
| --form description="GitHub Actions ${GITHUB_REF_NAME} (run ${GITHUB_RUN_ID})" \ | |
| --form project="${COVERITY_PROJECT}" \ | |
| https://scan.coverity.com/builds |