-
Notifications
You must be signed in to change notification settings - Fork 388
89 lines (87 loc) · 2.87 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
87
88
89
name: Nightly Coverity Scan
on:
schedule:
# Every night, at midnight
- cron: '0 0 * * *'
env:
APT_PACKAGES: >-
abi-compliance-checker
abi-dumper
build-essential
debhelper
fakeroot
gcc
git
libnl-3-200 libnl-3-dev libnl-route-3-200 libnl-route-3-dev
libnuma-dev
libudev-dev
uuid-dev
make
ninja-build
pandoc
pkg-config
python-is-python3
rpm
sparse
valgrind
wget
OFI_PROVIDER_FLAGS: >-
--enable-efa=rdma-core/build
--enable-mrail
--enable-psm3=rdma-core/build
--enable-rxd
--enable-rxm
--enable-shm
--enable-tcp
--enable-udp
--enable-verbs=rdma-core/build
--enable-sm2
RDMA_CORE_PATH: 'rdma-core/build'
RDMA_CORE_VERSION: v34.1
jobs:
coverity:
runs-on: ubuntu-20.04
steps:
- name: Install dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install -y ${{ env.APT_PACKAGES }}
- uses: actions/checkout@v4
- name: Download Coverity tools
run: |
wget https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=ofiwg%2Flibfabric" -O coverity_tool.tgz
mkdir cov-analysis-linux64-2020.09
tar xzf coverity_tool.tgz --strip 1 -C cov-analysis-linux64-2020.09
- name: Run Coverity Build
run: |
set -x
git clone --depth 1 -b ${{ env.RDMA_CORE_VERSION }} https://github.com/linux-rdma/rdma-core.git
pushd rdma-core; bash build.sh; popd
export LD_LIBRARY_PATH="${{ env.RDMA_CORE_PATH }}/lib:$LD_LIBRARY_PATH"
# We use a compiler extension that supports broader complex type
# definitions than what's defined in C99 standard (which only defines
# complex floats). For some reason, the version of GCC in this
# container does not provide that extension, but clang does. Until we
# know better, this action will use the clang compiler to generate the
# cov-build bundle needed for the coverity scan.
export PATH=$PWD/cov-analysis-linux64-2020.09/bin:$PATH
cov-configure --clang
./autogen.sh
./configure --prefix=$PWD/install ${{ env.OFI_PROVIDER_FLAGS }} CC=clang
cov-build --dir cov-int make
make install
- name: Submit results
run: |
tar czvf libfabric.tgz cov-int
curl \
--form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
--form [email protected] \
--form [email protected] \
--form version="main" \
--form description="`$PWD/install/bin/fi_info -l`" \
https://scan.coverity.com/builds?project=ofiwg%2Flibfabric
- name: Upload build logs
uses: actions/upload-artifact@v3
with:
name: coverity-build-log.txt
path: cov-int/build-log.txt