2020-04-18 18:06:14 +05:30
|
|
|
# based on https://github.com/ruby/actions-coverity-scan/blob/282dd059/.github/workflows/coverity-scan.yml
|
|
|
|
name: coverity-scan
|
|
|
|
on:
|
2020-04-18 19:15:33 +05:30
|
|
|
schedule:
|
|
|
|
- cron: '0 18 * * *' # Daily at 18:00 UTC
|
2022-08-30 17:15:00 +05:30
|
|
|
workflow_dispatch:
|
2020-04-18 18:06:14 +05:30
|
|
|
|
|
|
|
jobs:
|
|
|
|
latest:
|
2022-07-20 18:37:55 +05:30
|
|
|
if: github.repository == 'void-linux/xbps'
|
2020-04-18 18:06:14 +05:30
|
|
|
runs-on: ubuntu-latest
|
2022-08-30 17:09:25 +05:30
|
|
|
container: ghcr.io/void-linux/void-linux:20220530rc01-full-x86_64
|
2022-01-25 19:33:15 +05:30
|
|
|
env:
|
|
|
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
2020-04-18 18:06:14 +05:30
|
|
|
steps:
|
2022-08-30 17:09:25 +05:30
|
|
|
- uses: actions/checkout@v1
|
2020-04-18 18:38:38 +05:30
|
|
|
|
2022-08-30 17:09:25 +05:30
|
|
|
- name: Updating and installing packages
|
2020-04-18 18:06:14 +05:30
|
|
|
run: |
|
2022-08-30 17:09:25 +05:30
|
|
|
xbps-install -Suy xbps; xbps-install -Suy
|
2022-08-30 17:35:39 +05:30
|
|
|
xbps-install -Sy gcc make pkgconf kyua zlib-devel libarchive-devel atf-devel curl
|
2020-04-18 18:06:14 +05:30
|
|
|
|
|
|
|
- name: Download Coverity Build Tool
|
|
|
|
run: |
|
2022-08-30 17:35:39 +05:30
|
|
|
curl -L -o cov-analysis-linux64.tar.gz --data "token=$TOKEN&project=void-linux%2Fxbps" https://scan.coverity.com/download/linux64
|
2020-04-18 18:06:14 +05:30
|
|
|
mkdir cov-analysis-linux64
|
|
|
|
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
|
|
|
|
|
2022-08-30 17:09:25 +05:30
|
|
|
|
|
|
|
- name: Configure and build
|
2020-04-18 18:06:14 +05:30
|
|
|
run: |
|
2022-08-30 17:21:13 +05:30
|
|
|
CC=gcc ./configure --enable-tests
|
2022-08-30 17:25:30 +05:30
|
|
|
PATH=$PWD/cov-analysis-linux64/bin:$PATH cov-build --dir cov-int make -j$(nproc)
|
2020-04-18 18:06:14 +05:30
|
|
|
|
|
|
|
- name: Submit the result to Coverity Scan
|
|
|
|
run: |
|
2020-04-18 19:09:00 +05:30
|
|
|
tar czvf xbps.tgz --ignore-failed-read cov-int
|
2020-04-18 18:06:14 +05:30
|
|
|
curl \
|
2020-04-18 18:17:38 +05:30
|
|
|
--form project=xbps \
|
2020-04-18 18:06:14 +05:30
|
|
|
--form token=$TOKEN \
|
|
|
|
--form email=github@voidlinux.org \
|
|
|
|
--form file=@xbps.tgz \
|
|
|
|
--form version=trunk \
|
2020-04-18 18:17:38 +05:30
|
|
|
--form description="github action coverity scan" \
|
|
|
|
https://scan.coverity.com/builds?project=void-linux%2Fxbps
|