ci: simplify the Coverity script a bit
Also, address https://github.com/systemd/systemd/pull/24252#issuecomment-1208747320 by using a pre-defined e-mail address stored in the GH Action secrets.
This commit is contained in:
@@ -17,27 +17,14 @@ jobs:
|
||||
runs-on: ubuntu-22.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
|
||||
# Set in repo settings -> secrets -> actions
|
||||
COVERITY_SCAN_TOKEN: "${{ secrets.COVERITY_SCAN_TOKEN }}"
|
||||
CURRENT_REF: "${{ github.ref }}"
|
||||
COVERITY_SCAN_NOTIFICATION_EMAIL: "${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}"
|
||||
steps:
|
||||
- name: Repository checkout
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||
# 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/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
|
||||
- name: Build & upload the results
|
||||
run: tools/coverity.sh
|
||||
|
||||
Reference in New Issue
Block a user