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 18:12:16 +05:30
|
|
|
push
|
|
|
|
#schedule:
|
|
|
|
# - cron: '0 18 * * *' # Daily at 18:00 UTC
|
2020-04-18 18:06:14 +05:30
|
|
|
|
|
|
|
jobs:
|
|
|
|
latest:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Install libraries
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
sudo apt-get update
|
2020-04-18 18:14:28 +05:30
|
|
|
sudo apt-get install make pkgconf gcc libarchive-dev zlib1g-dev libssl-dev
|
2020-04-18 18:06:14 +05:30
|
|
|
|
|
|
|
- name: Checkout void-linux/xbps
|
|
|
|
run: |
|
|
|
|
git clone --depth=1 https://github.com/void-linux/xbps .
|
|
|
|
|
|
|
|
- name: Download Coverity Build Tool
|
|
|
|
run: |
|
2020-04-18 18:19:27 +05:30
|
|
|
wget -q https://scan.coverity.com/download/linux64 --post-data "token=$TOKEN&void-linux%2Fxbps" -O cov-analysis-linux64.tar.gz
|
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
|
|
|
|
env:
|
|
|
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
|
|
|
|
|
|
|
- name: Fixed world writable dirs
|
|
|
|
run: |
|
|
|
|
chmod go-w $HOME
|
|
|
|
sudo chmod -R go-w /usr/share
|
|
|
|
|
|
|
|
- name: Configure
|
|
|
|
run: ./configure
|
|
|
|
|
|
|
|
- name: Build with cov-build
|
|
|
|
run: |
|
|
|
|
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
|
|
|
|
cov-build --dir cov-int make
|
|
|
|
|
|
|
|
- name: Submit the result to Coverity Scan
|
|
|
|
run: |
|
|
|
|
tar czvf xbps.tgz cov-int
|
|
|
|
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
|
2020-04-18 18:06:14 +05:30
|
|
|
env:
|
|
|
|
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|