.github/workflows/coverity-scan.yml: use voidlinux/voidlinux docker container to build

This commit is contained in:
Duncan Overbruck 2020-04-18 15:08:38 +02:00
parent 65cd539f2d
commit cf59b4a3b1
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35

View File

@ -9,16 +9,21 @@ jobs:
latest: latest:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Install libraries
- name: Setup container
run: | run: |
set -x docker pull voidlinux/voidlinux
sudo apt-get update docker run -v "$PWD":/tmp/build-dir -w "/tmp/build-dir" voidlinux/voidlinux \
sudo apt-get install make pkgconf gcc libarchive-dev zlib1g-dev libssl-dev /bin/sh -c "xbps-install -Syu xbps && xbps-install -yu && xbps-install -y tar gcc make pkgconf kyua zlib-devel libarchive-devel atf-devel"
- name: Checkout void-linux/xbps - name: Checkout void-linux/xbps
run: | run: |
git clone --depth=1 https://github.com/void-linux/xbps . git clone --depth=1 https://github.com/void-linux/xbps .
CC=gcc ./configure --enable-tests &&
make -j$(nproc) &&
make check"
- name: Download Coverity Build Tool - name: Download Coverity Build Tool
run: | run: |
wget -q https://scan.coverity.com/download/linux64 --post-data "token=$TOKEN&project=void-linux%2Fxbps" -O cov-analysis-linux64.tar.gz wget -q https://scan.coverity.com/download/linux64 --post-data "token=$TOKEN&project=void-linux%2Fxbps" -O cov-analysis-linux64.tar.gz
@ -27,18 +32,15 @@ jobs:
env: env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Fixed world writable dirs
run: |
chmod go-w $HOME
sudo chmod -R go-w /usr/share
- name: Configure - name: Configure
run: ./configure run: |
docker run -v "$PWD":/tmp/build-dir -w "/tmp/build-dir" voidlinux/voidlinux \
/bin/sh -c "CC=gcc ./configure --enable-tests"
- name: Build with cov-build - name: Build with cov-build
run: | run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH docker run -v "$PWD":/tmp/build-dir -w "/tmp/build-dir" voidlinux/voidlinux \
cov-build --dir cov-int make /bin/sh -c "PATH=\$(pwd)/cov-analysis-linux64/bin:\$PATH cov-build --dir cov-int make -j$(nproc)"
- name: Submit the result to Coverity Scan - name: Submit the result to Coverity Scan
run: | run: |