Skip to content

cov-build

cov-build #288

Workflow file for this run

name: cov-build
on:
schedule:
- cron: '0 18 * * 4'
push:
tags:
- v*.*.*
- coverity*
pull_request:
branches:
- master
paths:
- '!README.md'
- '!CONTRIBUTING.md'
- '!docs/**'
- 'src/**'
- '.github/**'
- 'tests/**'
- 'tools/**'
env:
TOKEN: ${{secrets.COVERITY_TOKEN}}
EMAIL: ${{secrets.COVERITY_EMAIL}}
jobs:
x64:
runs-on: windows-2019
defaults:
run:
shell: powershell
steps:
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install tools
run: |
choco install -y unzip
choco install -y wget
# Use fxied version because latest curl has https://github.com/curl/curl/issues/10591.
wget https://curl.se/windows/dl-7.87.0/curl-7.87.0-win64-mingw.zip -O curl-for-win.zip
unzip curl-for-win.zip
mv curl-7.87.0-win64-mingw curl-for-win
- name: Cache libraries
uses: actions/cache@v2
with:
path: ${{github.workspace}}/libs/wxWidgets
key: x64-libs-cache-coverity
- name: Install libraries
run: "tools/install_wxWidgets.bat -msvc 64"
- name: Cache Coverity scan tools
uses: actions/cache@v2
with:
path: ${{github.workspace}}/cov_tools
key: x64-coverity-cache
- name: Install Coverity scan tools
run: "tools/install_coverity_tools.bat ${{env.TOKEN}}"
- name: Configure CMake
run: |
cov_tools/bin/cov-configure --config build/covtest/cov.xml --msvc --template --xml-option=skip_file:".*/libs.*"
cmake -B build -G "Visual Studio 16 2019" -A x64 .
- name: Build with Coverity
run: |
cov_tools/bin/cov-build --config build/covtest/cov.xml --dir build/cov-int cmake --build build
cd build
tail cov-int/build-log.txt
tar -czvf cov-int.tgz cov-int
cd ..
- name: Get short SHA
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Submit tarball to Coverity
run: curl-for-win/bin/curl --form token="${{env.TOKEN}}" --form email="${{env.EMAIL}}" --form file="@build/cov-int.tgz" --form version="${{steps.vars.outputs.sha_short}}" --form description="Automatic submission with GitHub Actions" "https://scan.coverity.com/builds?project=pit-ray%2Fwin-vind"