-
-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (70 loc) · 2.1 KB
/
coverity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: cov-build
on:
schedule:
- cron: '0 18 * * 3'
push:
tags:
- v*.*.*
- coverity*
pull_request:
branches: [ main ]
paths:
- '!README.md'
- '!CONTRIBUTING.md'
- '!docs/**'
- 'include/**'
- 'demo/**'
- '.github/**'
- 'tests/**'
env:
TOKEN: ${{secrets.COVERITY_TOKEN}}
EMAIL: ${{secrets.COVERITY_EMAIL}}
jobs:
x64:
runs-on: windows-2022
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
choco install -y curl
- name: Cache Coverity scan tools
uses: actions/cache@v2
with:
path: ${{github.workspace}}/cov_tools
key: x64-coverity-cache
- name: Install Coverity scan tools
if: ${{ hashFiles('cov_tools/') == '' }}
run: |
wget.exe https://scan.coverity.com/download/cxx/win64 --post-data "token=${{env.TOKEN}}&project=pit-ray%2Ffluent-tray" -O cov_tools.zip
unzip cov_tools.zip
mv cov-analysis-win64-*.* cov_tools
- name: Configure CMake
run: |
cov_tools/bin/cov-configure --config build/covtest/cov.xml --msvc --template
cmake -B build -A x64 demo
- 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.exe \
--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%2Ffluent-tray"