50 lines
1.8 KiB
YAML
50 lines
1.8 KiB
YAML
# based on https://github.com/ruby/actions-coverity-scan/blob/282dd059/.github/workflows/coverity-scan.yml
|
|
name: coverity-scan
|
|
on:
|
|
push
|
|
#schedule:
|
|
# - cron: '0 18 * * *' # Daily at 18:00 UTC
|
|
|
|
jobs:
|
|
latest:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Setup container
|
|
run: |
|
|
|
|
- name: Checkout void-linux/xbps
|
|
run: |
|
|
git clone --depth=1 https://github.com/void-linux/xbps .
|
|
|
|
- name: Download Coverity Build Tool
|
|
run: |
|
|
wget -q https://scan.coverity.com/download/linux64 --post-data "token=$TOKEN&project=void-linux%2Fxbps" -O cov-analysis-linux64.tar.gz
|
|
mkdir cov-analysis-linux64
|
|
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
|
|
env:
|
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
|
|
|
- name: Configure and build in voidlinux/voilinux container
|
|
run: |
|
|
docker pull voidlinux/voidlinux
|
|
docker run -v "$PWD":/tmp/build-dir -w "/tmp/build-dir" voidlinux/voidlinux \
|
|
/bin/sh -c "xbps-install -Syu xbps && xbps-install -yu &&
|
|
xbps-install -y gcc make pkgconf kyua zlib-devel libarchive-devel atf-devel &&
|
|
CC=gcc ./configure --enable-tests &&
|
|
PATH=/tmp/build-dir/cov-analysis-linux64/bin:\$PATH cov-build --dir cov-int make -j\$(nproc)"
|
|
|
|
- name: Submit the result to Coverity Scan
|
|
run: |
|
|
tar czvf xbps.tgz cov-int
|
|
curl \
|
|
--form project=xbps \
|
|
--form token=$TOKEN \
|
|
--form email=github@voidlinux.org \
|
|
--form file=@xbps.tgz \
|
|
--form version=trunk \
|
|
--form description="github action coverity scan" \
|
|
https://scan.coverity.com/builds?project=void-linux%2Fxbps
|
|
env:
|
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|