-
-
Notifications
You must be signed in to change notification settings - Fork 996
375 lines (300 loc) · 10.4 KB
/
linux.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
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
name: Linux
on:
push:
branches: [ RC_1_2 RC_2_0 master ]
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
filter: tree:0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: pre-commit/action@v3.0.1
build:
name: build
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
include:
- config: asio-debugging=on picker-debugging=on
- config: extensions=off logging=off streaming=off super-seeding=off share-mode=off predictive-pieces=off dht=off alert-msg=off encryption=off mutable-torrents=off deprecated-functions=off
- config: crypto=gcrypt
- config: mmap-disk-io=off
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-build-${{ github.base_ref }}-${{ matrix.config }}
ccache_options: |
max_size=5G
- name: install boost
run: |
sudo apt install libboost-python-dev libboost-tools-dev libboost-dev libboost-system-dev python3
echo "using gcc ;" >>~/user-config.jam
- name: install gcrypt
if: ${{ contains(matrix.config, 'crypto=gcrypt') }}
run: sudo apt install libgcrypt20-dev
- name: build library
run: |
b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on
- name: build examples
run: |
cd examples
b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on
- name: build tools
run: |
cd tools
b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on
- name: build python bindings
run: |
cd bindings/python
echo "using python ;" >>~/user-config.jam
BOOST_ROOT="" b2 ${{ matrix.config }} cxxstd=14,17,20 warnings-as-errors=on
fuzzers:
name: Fuzzers
runs-on: ubuntu-20.04
continue-on-error: true
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-fuzzers-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: install clang-9
continue-on-error: true
run: |
sudo apt install clang-9
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using clang : 9 : clang++-9 ;" >>~/user-config.jam
- name: build fuzzers
run: |
cd fuzzers
b2 clang cxxstd=14 warnings-as-errors=on
check_headers:
name: check headers
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-check-headers-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc ;" >>~/user-config.jam
- name: compile header files individually
run: |
b2 check-headers cxxstd=14 warnings-as-errors=on
clang_tidy:
name: clang-tidy
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-clang-tidy-${{ github.base_ref }}
ccache_options: |
max_size=500M
- name: install clang-tidy
run: sudo apt install clang-tidy libc++-dev
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev
echo "using clang_tidy : : clang-tidy \"-checks=-clang-analyzer-core.*,-clang-analyzer-unix.*\" : <cxxflags>-std=c++14 <cxxflags>-I/usr/local/clang-7.0.0/include/c++/v1 <cxxflags>-stdlib=libc++ <cxxflags>-Wno-unknown-warning-option <linkflags>-stdlib=libc++ ;" >> ~/user-config.jam;
- name: analyze
run: |
b2 -a clang_tidy
test:
name: Tests
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
include:
- config: address-sanitizer=norecover undefined-sanitizer=norecover crypto=openssl
- config: toolset=clang logging=off address-sanitizer=norecover undefined-sanitizer=norecover
- config: thread-sanitizer=norecover crypto=openssl release debug-symbols=on cxxflags=-Wno-tsan
- config: crypto=gnutls
- config: deprecated-functions=off
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-tests-${{ matrix.config }}-${{ github.base_ref }}
ccache_options: |
max_size=5G
- name: install gnutls
if: ${{ contains(matrix.config, 'crypto=gnutls') }}
run: |
sudo apt install libgnutls28-dev
- name: install clang-12
continue-on-error: true
run: |
sudo apt install clang-12
- name: install GCC-12
continue-on-error: true
run: |
sudo apt install gcc-12
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc : 12 : g++-12 ;" >>~/user-config.jam
echo "using clang : 12 : clang++-12 ;" >>~/user-config.jam
- name: build and run tests
run: |
cd test
b2 ${{ matrix.config }} -l500 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests
- name: run tests (flaky)
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
retry_wait_seconds: 4
max_attempts: 3
command: (cd test; b2 ${{ matrix.config }} -l500 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on)
sim:
name: Simulations
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-simulations-${{ github.base_ref }}
ccache_options: |
max_size=5G
- name: install boost
run: |
sudo apt install libboost-tools-dev libboost-dev libboost-system-dev
echo "using gcc ;" >>~/user-config.jam
- name: build and run simulations
run: |
cd simulation
b2 debug-iterators=on invariant-checks=full asserts=on picker-debugging=on
- name: build simulations no deprecated
run: |
cd simulation
b2 testing.execute=off deprecated-functions=off
dist:
name: build dist
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
filter: tree:0
- name: update package lists
continue-on-error: true
run: |
sudo apt update
- uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ccache-linux-dist-${{ matrix.os }}-${{ github.base_ref }}
ccache_options: |
max_size=15G
- name: install dependencies
run: |
sudo apt install libboost-tools-dev libboost-python-dev libboost-dev libboost-system-dev
sudo apt install python3-docutils python3-pygments python3-pil gsfonts inkscape icoutils graphviz hunspell imagemagick python3-setuptools
python3 -m pip install aafigure
echo "using gcc ;" >>~/user-config.jam
- name: build tarball
run: AAFIGURE=~/.local/bin/aafigure RST2HTML=rst2html make dist
- uses: actions/upload-artifact@v4
with:
name: tarball-${{ matrix.os }}
path: libtorrent-rasterbar-*.tar.gz
- name: test-tarball (b2 install)
run: |
tar xvzf libtorrent-rasterbar-*.tar.gz
cd libtorrent-rasterbar-*/
b2 install cxxstd=14 --prefix=test-install-root
cat test-install-root/lib/pkgconfig/libtorrent-rasterbar.pc
- name: test-tarball (b2 tests)
run: |
cd libtorrent-rasterbar-*/test
b2 testing.execute=off
b2 test_torrent_info
- name: test-tarball (python bindings)
run: |
cd libtorrent-rasterbar-*/
python3 bindings/python/setup.py build