forked from SVF-tools/SVF
-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (124 loc) · 4.79 KB
/
github-action.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: svf-build
# Triggers the workflow on push or pull request events
on: [push, pull_request]
# Customize the env variable
env:
SVF_CTIR: 1
SVF_Z3: 1
SVF_DIR: $GITHUB_WORKSPACE
jobs:
build:
runs-on: ${{ matrix.os }}
env:
XCODE_VERSION: '15.3.0'
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: [ubuntu-latest]
sanitizer: address
steps:
# checkout the repo
- uses: actions/checkout@v2
# setup the environment
- name: mac-setup
if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: mac-setup-workaround
if: runner.os == 'macOS'
run: |
ln -sfn /Applications/Xcode_${{ env.XCODE_VERSION }}.app /Applications/Xcode.app
- name: ubuntu-setup
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install cmake gcc g++ nodejs doxygen graphviz lcov libncurses5-dev libtinfo5 libzstd-dev
# build-svf
- name: build-svf
run: |
cd $GITHUB_WORKSPACE
echo $(pwd)
if [ "${{matrix.sanitizer}}" != "" ]; then export SVF_SANITIZER="${{matrix.sanitizer}}"; fi
if [ "$RUNNER_OS" == "Linux" ] && [ "${{matrix.sanitizer}}" == "" ]; then export SVF_COVERAGE=1; fi
git clone "https://github.com/SVF-tools/Test-Suite.git";
source ${{github.workspace}}/build.sh
- name: ctest objtype inference
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R objtype -VV
- name: ctest wpa
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R wpa_tests -VV
- name: ctest dvf and mta
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R dvf_tests -VV
- name: ctest andersen differential analysis
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R diff_tests-ander -VV
- name: ctest flow-sensitive differential analysis
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R diff_tests-fs -VV
- name: ctest Andersen file-write-read
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R diff_tests-wr-ander -VV
- name: ctest mem_leak
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R mem_leak -VV
- name: ctest double_free
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R double_free -VV
- name: ctest ae_symabs
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R symabs -VV
- name: ctest ae_assert
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R ae_assert_test -VV
- name: ctest ae_overflow
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R ae_overflow_test -VV
- name: ctest cfl_tests
working-directory: ${{github.workspace}}/Release-build
run:
ctest -R cfl_tests -VV
- name: ctest performance tests on big cruxbc with file system diff tests
working-directory: ${{github.workspace}}/Release-build
if: runner.os == 'Linux' && matrix.sanitizer != 'address'
run:
ctest -R diff-perf-cruxbc-big -VV
- name: ctest performance tests on small cruxbc with file system diff tests
working-directory: ${{github.workspace}}/Release-build
if: runner.os == 'Linux'
run:
ctest -R diff-perf-cruxbc-small -VV
- name: create-coverage-report-and-remove-system-files
working-directory: ${{github.workspace}}/Release-build
if: runner.os == 'Linux' && matrix.sanitizer == ''
run: |
lcov --capture --directory ./ --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --remove coverage.info '${{github.workspace}}/z3.obj/*' --output-file coverage.info
lcov --remove coverage.info '${{github.workspace}}/llvm-*.obj/*' --output-file coverage.info
lcov --remove coverage.info '${{github.workspace}}/svf/include/FastCluster/*' --output-file coverage.info
lcov --remove coverage.info '${{github.workspace}}/svf/lib/FastCluster/*' --output-file coverage.info
- name: upload-coverage
if: runner.os == 'Linux'
uses: codecov/codecov-action@v4
with:
files: coverage.info
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}