mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-05 04:06:34 -05:00
github: add coverity.yml
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
47f4f9b73b
commit
ebfc29110c
1 changed files with 72 additions and 0 deletions
72
.github/workflows/coverity.yml
vendored
Normal file
72
.github/workflows/coverity.yml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: Coverity Scan
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Run weekly on Sunday at 00:00 UTC
|
||||
- cron: '0 4 * * 0'
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
|
||||
jobs:
|
||||
coverity:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: fedora:latest
|
||||
|
||||
steps:
|
||||
- name: Prepare environment
|
||||
run: |
|
||||
dnf -y upgrade
|
||||
dnf -y install @development-tools libtool bzip2 awk curl wget tar file
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Safe git directory
|
||||
run: |
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: Download Coverity Build Tool
|
||||
run: |
|
||||
wget -q https://scan.coverity.com/download/linux64 \
|
||||
--post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=${{ secrets.COVERITY_SCAN_PROJECT }}" \
|
||||
-O coverity_tool.tar.gz
|
||||
mkdir coverity-tool
|
||||
tar xzf coverity_tool.tar.gz --strip-components=1 -C coverity-tool
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
libtoolize --force --copy --automake
|
||||
aclocal
|
||||
autoheader
|
||||
automake --foreign --copy --add-missing
|
||||
autoconf
|
||||
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
|
||||
./configure --disable-aload
|
||||
|
||||
- name: Build with Coverity
|
||||
run: |
|
||||
export PATH="$PWD/coverity-tool/bin:$PATH"
|
||||
cov-build --dir cov-int make
|
||||
|
||||
- name: Submit to Coverity Scan
|
||||
run: |
|
||||
tar czvf alsa-lib.tgz cov-int
|
||||
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
|
||||
--form email=${{ secrets.COVERITY_SCAN_EMAIL }} \
|
||||
--form file=@alsa-lib.tgz \
|
||||
--form version="$(cat version || echo 'master')" \
|
||||
--form description="alsa-lib automated scan" \
|
||||
https://scan.coverity.com/builds?project=${{ secrets.COVERITY_SCAN_PROJECT }}
|
||||
|
||||
- name: Upload Coverity Results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: coverity-results
|
||||
path: cov-int/
|
||||
retention-days: 7
|
||||
Loading…
Add table
Add a link
Reference in a new issue