-
Notifications
You must be signed in to change notification settings - Fork 26
267 lines (253 loc) · 9.28 KB
/
build.yaml
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
name: CI
on:
push:
pull_request:
env:
CTEST_OUTPUT_ON_FAILURE: 1
VERBOSE: 1
jobs:
build-base:
name: Test on Ubuntu with gcc
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install cmake ninja-build libboost-test-dev
- name: Configure
run: |
mkdir build
cmake -S . -B build -GNinja -DWITH_LTO=OFF -DWITH_UNRUH=OFF -DWITH_MARCH_NATIVE=OFF
- name: Build and test
run: |
cmake --build build
cmake --build build --target test
build-base-i386:
name: Test on Ubuntu with gcc (32 bit)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install cmake ninja-build gcc-i686-linux-gnu g++-i686-linux-gnu
- name: Configure
run: |
mkdir build
cmake -S . -B build -GNinja -DCMAKE_C_COMPILER=i686-linux-gnu-gcc -DCMAKE_CXX_COMPILER=i686-linux-gnu-g++ -DWITH_LTO=OFF -DWITH_EXTENDED_TESTS=OFF -DWITH_UNRUH=OFF -DWITH_MARCH_NATIVE=OFF
- name: Build and test
run: |
cmake --build build
cmake --build build --target test
build-flags:
name: Test on ${{ matrix.cfg.os }} with ${{ matrix.cfg.compiler }} (${{ matrix.flags }})
needs: [build-valgrind, build-sanitizers, build-scan-build]
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-22.04, compiler: gcc, cxxcompiler: g++ } # = gcc-11
- { os: ubuntu-22.04, compiler: clang, cxxcompiler: clang++ } # = clang-14
- { os: ubuntu-22.04, compiler: gcc-12, cxxcompiler: g++-12 }
- { os: ubuntu-22.04, compiler: clang-13, cxxcompiler: clang++-13 }
- { os: ubuntu-20.04, compiler: gcc, cxxcompiler: g++ } # = gcc-9
- { os: ubuntu-20.04, compiler: clang, cxxcompiler: clang++ } # = clang-10
- { os: ubuntu-20.04, compiler: gcc-8, cxxcompiler: g++-8 }
- { os: ubuntu-20.04, compiler: gcc-10, cxxcompiler: g++-10 }
- { os: ubuntu-20.04, compiler: clang-12, cxxcompiler: clang++-12 }
- { os: ubuntu-20.04, compiler: clang-11, cxxcompiler: clang++-11 }
- { os: ubuntu-20.04, compiler: clang-9, cxxcompiler: clang++-9 }
- { os: ubuntu-18.04, compiler: gcc, cxxcompiler: g++ } # = gcc-7
- { os: ubuntu-18.04, compiler: clang, cxxcompiler: clang++ } # = clang-6
- { os: ubuntu-18.04, compiler: gcc-4.8, cxxcompiler: g++-4.8 }
- { os: ubuntu-18.04, compiler: gcc-5, cxxcompiler: g++-5 }
- { os: ubuntu-18.04, compiler: gcc-6, cxxcompiler: g++-6 }
- { os: macos-latest, compiler: clang, cxxcompiler: clang++ }
flags:
- ""
- "-DWITH_ZKBPP=OFF"
- "-DWITH_KKW=OFF"
- "-DWITH_SIMD_OPT=OFF"
- "-DWITH_CONFIG_H=OFF"
steps:
- uses: actions/checkout@v3
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install ${{ matrix.cfg.compiler }} cmake ninja-build pkg-config libm4ri-dev libboost-test-dev
sudo apt-get -q -y install ${{ matrix.cfg.cxxcompiler }} || true
if: ${{ runner.os == 'Linux' }}
- uses: seanmiddleditch/gha-setup-ninja@master
if: ${{ runner.os != 'Linux' }}
- name: Configure
run: |
mkdir build
cmake -S . -B build -GNinja -DCMAKE_C_COMPILER=${{ matrix.cfg.compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cfg.cxxcompiler }} -DWITH_LTO=OFF ${{ matrix.flags }}
- name: Build and test
run: |
cmake --build build
cmake --build build --target test
build-flags-windows:
name: Test on Windows with MSVC (${{ matrix.flags }})
needs: [build-valgrind, build-sanitizers, build-scan-build]
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
flags:
- ""
- "-DWITH_ZKBPP=OFF"
- "-DWITH_KKW=OFF"
- "-DWITH_SIMD_OPT=OFF"
- "-DWITH_CONFIG_H=OFF"
steps:
- uses: actions/checkout@v3
- name: Set up Windows SDK
uses: fbactions/setup-winsdk@v1
with:
winsdk-build-version: 19041
- name: Configure, build and test
run: |
mkdir build
cmake -DCMAKE_SYSTEM_VERSION=19041 -S . -B build ${{ matrix.flags }}
cmake --build build
ctest --test-dir build -C Debug
build-cygwin:
name: Test on Cygwin
needs: build-flags
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Cygwin and dependencies
uses: egor-tensin/setup-cygwin@v3
with:
platform: x64
packages: cmake gcc-g++ pkg-config
- name: Configure, build and test
run: |
cd ${GITHUB_WORKSPACE}
mkdir build
cmake -S . -B build
cmake --build build
cmake --build build --target test
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
build-freebsd:
name: Test on FreeBSD
needs: build-flags
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Configure, build and test
id: test
uses: vmactions/freebsd-vm@v0
with:
usesh: true
prepare: pkg install -y curl cmake gcc boost-libs
run: |
mkdir build
cmake -S . -B build
cmake --build build
cmake --build build --target test
build-archs:
runs-on: ubuntu-20.04
needs: [build-valgrind, build-sanitizers, build-scan-build]
name: Test with ${{ matrix.cfg.compiler }} on ${{ matrix.cfg.arch }}
strategy:
fail-fast: false
matrix:
cfg:
- { arch: aarch64, compiler: gcc, cxxcompiler: g++ }
- { arch: aarch64, compiler: clang-12, cxxcompiler: clang++-12 }
- { arch: ppc64le, compiler: gcc, cxxcompiler: g++ }
- { arch: ppc64le, compiler: clang-12, cxxcompiler: clang++-12 }
- { arch: s390x, compiler: gcc, cxxcompiler: g++ }
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@master
name: Build and test
id: build
with:
arch: ${{ matrix.cfg.arch }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt-get -q update
apt-get -q -y dist-upgrade
apt-get -q -y install cmake ninja-build ${{ matrix.cfg.compiler }} libboost-test-dev
apt-get -q -y install ${{ matrix.cfg.cxxcompiler }} || true
run: |
mkdir build
cmake -S . -B build -GNinja -DCMAKE_C_COMPILER=${{ matrix.cfg.compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cfg.cxxcompiler }} -DWITH_LTO=OFF -DWITH_EXTENDED_TESTS=OFF
cmake --build build
cmake --build build --target test
build-valgrind:
name: Test constant time with valgrind
needs: [build-base, build-base-i386]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install cmake ninja-build valgrind
- name: Configure
run: |
mkdir build
cmake -S . -B build -GNinja -DWITH_VALGRIND_CT_TESTS=ON -DWITH_MARCH_NATIVE=OFF
- name: Build and test
run: |
cmake --build build
cmake --build build --target test
build-sanitizers:
name: Test with sanitizer ${{ matrix.cfg.cflags }}
needs: [build-base, build-base-i386]
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
cfg:
- { cflags: "-fsanitize=address -fsanitize-address-use-after-scope", ldflags: "-fsanitize=address" }
- { cflags: "-fsanitize=memory -fsanitize-memory-track-origins", ldflags: "-fsanitize=memory" }
- { cflags: "-fsanitize=undefined", ldflags: "-fsanitize=undefined" }
steps:
- uses: actions/checkout@v3
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install cmake ninja-build clang
- name: Configure
run: |
mkdir build
cmake -S . -B build -GNinja -DWITH_LTO=OFF -DWITH_KATS_TESTS=OFF -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
env:
CFLAGS: ${{ matrix.cfg.cflags }}
LDFLAGS: ${{ matrix.cfg.ldflags }}
- name: Build and test
run: |
cmake --build build
cmake --build build --target test
env:
CFLAGS: ${{ matrix.cfg.cflags }}
LDFLAGS: ${{ matrix.cfg.ldflags }}
build-scan-build:
name: Test on Ubuntu with scan-build
needs: [build-base, build-base-i386]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install Linux dependencies
run: |
sudo apt-get -q update
sudo apt-get -q -y install cmake ninja-build clang-tools
- name: Configure, build and test
run: |
mkdir -p build
scan-build cmake -S . -B build -GNinja -DWITH_LTO=OFF -DWITH_EXTENDED_TESTS=OFF
scan-build --exclude "sha3/" --status-bugs cmake --build build
- name: Configure, build and test (debug build)
run: |
mkdir -p build-debug
scan-build cmake -S . -B build-debug -GNinja -DWITH_LTO=OFF -DWITH_EXTENDED_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug
scan-build --exclude "sha3/" --status-bugs cmake --build build-debug