-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (51 loc) · 1.83 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
on: workflow_dispatch
jobs:
xrt_coverity_scan:
runs-on: ubuntu-latest
steps:
- name: List linux/version.h
run: cat /usr/include/linux/version.h
- name: Checkout playground
uses: actions/checkout@v2
- name: Checkout XRT
uses: actions/checkout@v2
with:
repository: stsoe/XRT
path: ./XRT
ref: coverity
- name: Download and extract Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=Xilinx/XRT" -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: Install dependencies
run: |
sudo apt update
sudo apt install gcc g++
sudo ./XRT/src/runtime_src/tools/scripts/xrtdeps.sh
- name: Build with cov-build
run: |
export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
cov-configure --template --comptype gcc --config config/conf.xml --compiler c++
cov-configure --template --comptype gcc --config config/conf.xml --compiler gcc
cov-build --dir cov-int --config config/conf.xml XRT/build/build.sh -opt -verbose
- name: Submit the results to Coverity Scan
run: |
tar czvf xrt.tgz cov-int
curl \
--form project=Xilinx/XRT \
--form token=$TOKEN \
--form email=soren.soe@xilinx.com \
--form file=@xrt.tgz \
--form version=trunk \
--form description="Xilinx Runtime" \
https://scan.coverity.com/builds?project=Xilinx/XRT
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Upload Coverity imed
uses: actions/upload-artifact@v1
with:
name: cov-int-file
path: xrt.tgz