-
Notifications
You must be signed in to change notification settings - Fork 1
142 lines (129 loc) · 4.76 KB
/
build.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
name: VaRA Feature Library Build
on:
push:
branches: [vara, vara-dev]
pull_request:
branches: [vara, vara-dev]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
build: [Debug, Release]
llvm-major: [14]
compiler: [clang++-14, clang++-15, g++-9]
include:
- llvm-major: 14
llvm-minor: 0
exclude:
- llvm-major: 14
compiler: clang++-15
continue-on-error: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Install General Dependencies
shell: bash
run: |
sudo apt-key adv --fetch-keys https://apt.kitware.com/keys/kitware-archive-latest.asc
sudo apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ focal main'
sudo apt-get update
sudo apt-get -y install --no-install-recommends cmake libstdc++6 libxml2-dev python3-dev graphviz gcc-9 g++-9
- name: Download and Install Z3 4.11.2
shell: bash
run: |
cd /tmp/
wget https://github.com/Z3Prover/z3/releases/download/z3-4.11.2/z3-4.11.2-x64-glibc-2.31.zip
unzip z3-4.11.2-x64-glibc-2.31.zip
sudo cp z3-4.11.2-x64-glibc-2.31/include/* /usr/include/
sudo cp z3-4.11.2-x64-glibc-2.31/bin/libz3.so /usr/lib/x86_64-linux-gnu/
- name: Install Strategy Dependencies
shell: bash
run: |
sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key
sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main'
sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main'
sudo apt-get update
sudo apt-get -y install --no-install-recommends clang-${{ matrix.llvm-major }} llvm-${{ matrix.llvm-major }}-dev clang-tidy-14
- name: Install Tool Dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qtdeclarative5-dev
- name: Workaround for sanitizer
shell: bash
run: |
sudo apt-get update
sudo apt download libclang-rt-14-dev
sudo dpkg --force-all -i libclang-rt-14-dev*
- name: Build ${{ matrix.build }} with LLVM ${{ matrix.llvm-major }}
env:
BUILD_TYPE: ${{ matrix.build }}
LLVM_VERSION: ${{ matrix.llvm-major }}.${{ matrix.llvm-minor }}
CXX: ${{ matrix.compiler }}
shell: bash
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DLLVM_REQUESTED_VERSION=$LLVM_VERSION \
-DCMAKE_CXX_COMPILER=$CXX \
-DVARA_FEATURE_SANITIZE=True \
-DVARA_FEATURE_BUILD_PYTHON_BINDINGS=False \
-DVARA_FEATURE_USE_Z3_SOLVER=True \
-DVARA_FEATURE_BUILD_Z3_SOLVER=False \
-DPYTHON_EXECUTABLE=$(which python3)
cmake --build . -- -j
- name: Run Tests
if: ${{ matrix.build == 'Release' }}
shell: bash
run: |
cd build
cmake --build . --target check-vara-feature-unittests
cmake --build . --target check-vara-fm-viewer
cmake --build . --target check-vara-config-generator
- name: Run Tests (Cov)
env:
CXX: ${{ matrix.compiler }}
if: ${{ matrix.build == 'Debug' }}
shell: bash
run: |
cd build
cmake . -DVARA_FEATURE_ENABLE_COVERAGE=True
cmake --build . --target check-vara-feature-unittests
cmake --build . --target check-vara-fm-viewer
cmake --build . --target check-vara-config-generator
./scripts/ci_utils/prepare_coverage_data.py
bash <(curl -s https://codecov.io/bash)
- name: Run Clang-Tidy
shell: bash
run: |
cd build
cmake --build . --target tidy-vara-feature
- name: Build Python Bindings
env:
BUILD_TYPE: ${{ matrix.build }}
LLVM_VERSION: ${{ matrix.llvm-major }}.${{ matrix.llvm-minor }}
CXX: ${{ matrix.compiler }}
shell: bash
run: |
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DLLVM_REQUESTED_VERSION=$LLVM_VERSION \
-DCMAKE_CXX_COMPILER=$CXX \
-DVARA_FEATURE_SANITIZE=False \
-DVARA_FEATURE_BUILD_PYTHON_BINDINGS=True \
-DVARA_FEATURE_USE_Z3_SOLVER=True \
-DPYTHON_EXECUTABLE=$(which python3)
cmake --build . -- -j
- name: Run Python Binding Tests
shell: bash
run: |
cd build
cmake --build . --target check-vara-feature-python