diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-01-08 21:45:08 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-01-11 15:50:25 +0100 |
commit | 86660d160b7e37365240da1ef28c487e19e3e911 (patch) | |
tree | 904e1e2d71874c0f7880deb0eaed7ac47ecdb0e4 /.github | |
parent | 0506d05ab2f96c71431ba220b307ba226a97c6dc (diff) | |
download | systemd-86660d160b7e37365240da1ef28c487e19e3e911.tar.gz |
ci: move the Coverity job to GitHub Actions
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/coverity.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml new file mode 100644 index 0000000000..2c1863779f --- /dev/null +++ b/.github/workflows/coverity.yml @@ -0,0 +1,39 @@ +--- +# vi: ts=2 sw=2 et: +# +name: Coverity + +on: + schedule: + # Run Coverity daily at midnight + - cron: '0 0 * * *' + +jobs: + build: + runs-on: ubuntu-20.04 + if: github.repository == 'systemd/systemd' + env: + COVERITY_SCAN_BRANCH_PATTERN: "${{ github.ref}}" + COVERITY_SCAN_NOTIFICATION_EMAIL: "" + COVERITY_SCAN_PROJECT_NAME: "${{ github.repository }}" + # Set in repo settings -> secrets -> repository secrets + COVERITY_SCAN_TOKEN: "${{ secrets.COVERITY_SCAN_TOKEN }}" + CURRENT_REF: "${{ github.ref }}" + steps: + - name: Repository checkout + uses: actions/checkout@v1 + # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + - name: Set the $COVERITY_SCAN_NOTIFICATION_EMAIL env variable + run: echo "COVERITY_SCAN_NOTIFICATION_EMAIL=$(git log -1 ${{ github.sha }} --pretty=\"%aE\")" >> $GITHUB_ENV + - name: Install Coverity tools + run: tools/get-coverity.sh + # Reuse the setup phase of the unit test script to avoid code duplication + - name: Install build dependencies + run: sudo -E .github/workflows/ubuntu-unit-tests.sh SETUP + # Preconfigure with meson to prevent Coverity from capturing meson metadata + - name: Preconfigure the build directory + run: meson cov-build -Dman=false + - name: Build + run: tools/coverity.sh build + - name: Upload the results + run: tools/coverity.sh upload |