26
26
# Compile and run the tests
27
27
EXAMPLES : yes
28
28
29
+ # https://cirrus-ci.org/pricing/#compute-credits
30
+ credits_snippet : &CREDITS
31
+ # Don't use any credits for now.
32
+ use_compute_credits : false
33
+
29
34
cat_logs_snippet : &CAT_LOGS
30
35
always :
31
36
cat_tests_log_script :
@@ -36,7 +41,6 @@ cat_logs_snippet: &CAT_LOGS
36
41
- cat valgrind_ctime_test.log || true
37
42
cat_bench_log_script :
38
43
- cat bench.log || true
39
- on_failure :
40
44
cat_config_log_script :
41
45
- cat config.log || true
42
46
cat_test_env_script :
69
73
- env : {WIDEMUL: int64, RECOVERY: yes}
70
74
- env : {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes}
71
75
- env : {WIDEMUL: int128}
76
+ - env : {WIDEMUL: int128_struct}
72
77
- env : {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes}
73
78
- env : {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes}
74
79
- env : {WIDEMUL: int128, ASM: x86_64}
@@ -107,65 +112,32 @@ task:
107
112
<< : *CAT_LOGS
108
113
109
114
task :
110
- name : " x86_64 : macOS Catalina "
115
+ name : " arm64 : macOS Ventura "
111
116
macos_instance :
112
- image : catalina- base
117
+ image : ghcr.io/cirruslabs/macos-ventura- base:latest
113
118
env :
114
119
HOMEBREW_NO_AUTO_UPDATE : 1
115
120
HOMEBREW_NO_INSTALL_CLEANUP : 1
116
- # Cirrus gives us a fixed number of 12 virtual CPUs. Not that we even have that many jobs at the moment...
117
- MAKEFLAGS : -j13
121
+ # Cirrus gives us a fixed number of 4 virtual CPUs. Not that we even have that many jobs at the moment...
122
+ MAKEFLAGS : -j5
118
123
matrix :
119
124
<< : *ENV_MATRIX
125
+ env :
126
+ ASM : no
127
+ WITH_VALGRIND : no
128
+ CTIMETEST : no
120
129
matrix :
121
130
- env :
122
- CC : gcc-9
131
+ CC : gcc
123
132
- env :
124
133
CC : clang
125
- # Update Command Line Tools
126
- # Uncomment this if the Command Line Tools on the CirrusCI macOS image are too old to brew valgrind.
127
- # See https://apple.stackexchange.com/a/195963 for the implementation.
128
- # # update_clt_script:
129
- # # - system_profiler SPSoftwareDataType
130
- # # - touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
131
- # # - |-
132
- # # PROD=$(softwareupdate -l | grep "*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | sed 's/Label: //g' | tr -d '\n')
133
- # # # For debugging
134
- # # - softwareupdate -l && echo "PROD: $PROD"
135
- # # - softwareupdate -i "$PROD" --verbose
136
- # # - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
137
- # #
138
- brew_valgrind_pre_script :
139
- # Retry a few times because this tends to fail randomly.
140
- - for i in {1..5}; do brew update && break || sleep 15; done
141
- - brew config
142
- - brew tap LouisBrunner/valgrind
143
- # Fetch valgrind source but don't build it yet.
144
- - brew fetch --HEAD LouisBrunner/valgrind/valgrind
145
- brew_valgrind_cache :
146
- # This is $(brew --cellar valgrind) but command substition does not work here.
147
- folder : /usr/local/Cellar/valgrind
148
- # Rebuild cache if ...
149
- fingerprint_script :
150
- # ... macOS version changes:
151
- - sw_vers
152
- # ... brew changes:
153
- - brew config
154
- # ... valgrind changes:
155
- - git -C "$(brew --cache)/valgrind--git" rev-parse HEAD
156
- populate_script :
157
- # If there's no hit in the cache, build and install valgrind.
158
- - brew install --HEAD LouisBrunner/valgrind/valgrind
159
- brew_valgrind_post_script :
160
- # If we have restored valgrind from the cache, tell brew to create symlink to the PATH.
161
- # If we haven't restored from cached (and just run brew install), this is a no-op.
162
- - brew link valgrind
163
134
brew_script :
164
- - brew install automake libtool gcc@9
135
+ - brew install automake libtool gcc
165
136
<< : *MERGE_BASE
166
137
test_script :
167
138
- ./ci/cirrus.sh
168
139
<< : *CAT_LOGS
140
+ << : *CREDITS
169
141
170
142
task :
171
143
name : " s390x (big-endian): Linux (Debian stable, QEMU)"
@@ -241,17 +213,63 @@ task:
241
213
<< : *CAT_LOGS
242
214
243
215
task :
244
- name : " x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
245
216
<< : *LINUX_CONTAINER
246
217
env :
247
- WRAPPER_CMD : wine64-stable
248
- SECP256K1_TEST_ITERS : 16
249
- HOST : x86_64-w64-mingw32
218
+ WRAPPER_CMD : wine
250
219
WITH_VALGRIND : no
251
220
ECDH : yes
252
221
RECOVERY : yes
253
222
SCHNORRSIG : yes
254
223
CTIMETEST : no
224
+ matrix :
225
+ - name : " x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
226
+ env :
227
+ HOST : x86_64-w64-mingw32
228
+ - name : " i686 (mingw32-w64): Windows (Debian stable, Wine)"
229
+ env :
230
+ HOST : i686-w64-mingw32
231
+ << : *MERGE_BASE
232
+ test_script :
233
+ - ./ci/cirrus.sh
234
+ << : *CAT_LOGS
235
+
236
+ task :
237
+ << : *LINUX_CONTAINER
238
+ env :
239
+ WRAPPER_CMD : wine
240
+ WERROR_CFLAGS : -WX
241
+ WITH_VALGRIND : no
242
+ ECDH : yes
243
+ RECOVERY : yes
244
+ EXPERIMENTAL : yes
245
+ SCHNORRSIG : yes
246
+ CTIMETEST : no
247
+ # Use a MinGW-w64 host to tell ./configure we're building for Windows.
248
+ # This will detect some MinGW-w64 tools but then make will need only
249
+ # the MSVC tools CC, AR and NM as specified below.
250
+ HOST : x86_64-w64-mingw32
251
+ CC : /opt/msvc/bin/x64/cl
252
+ AR : /opt/msvc/bin/x64/lib
253
+ NM : /opt/msvc/bin/x64/dumpbin -symbols -headers
254
+ # Set non-essential options that affect the CLI messages here.
255
+ # (They depend on the user's taste, so we don't want to set them automatically in configure.ac.)
256
+ CFLAGS : -nologo -diagnostics:caret
257
+ LDFLAGS : -XCClinker -nologo -XCClinker -diagnostics:caret
258
+ matrix :
259
+ - name : " x86_64 (MSVC): Windows (Debian stable, Wine)"
260
+ - name : " x86_64 (MSVC): Windows (Debian stable, Wine, int128_struct)"
261
+ env :
262
+ WIDEMUL : int128_struct
263
+ - name : " x86_64 (MSVC): Windows (Debian stable, Wine, int128_struct with __(u)mulh)"
264
+ env :
265
+ WIDEMUL : int128_struct
266
+ CPPFLAGS : -DSECP256K1_MSVC_MULH_TEST_OVERRIDE
267
+ - name : " i686 (MSVC): Windows (Debian stable, Wine)"
268
+ env :
269
+ HOST : i686-w64-mingw32
270
+ CC : /opt/msvc/bin/x86/cl
271
+ AR : /opt/msvc/bin/x86/lib
272
+ NM : /opt/msvc/bin/x86/dumpbin -symbols -headers
255
273
<< : *MERGE_BASE
256
274
test_script :
257
275
- ./ci/cirrus.sh
@@ -301,14 +319,39 @@ task:
301
319
- ./ci/cirrus.sh
302
320
<< : *CAT_LOGS
303
321
322
+ # Memory sanitizers
304
323
task :
305
- name : " C++ -fpermissive"
306
324
<< : *LINUX_CONTAINER
325
+ name : " MSan"
307
326
env :
308
- # ./configure correctly errors out when given CC=g++.
309
- # We hack around this by passing CC=g++ only to make.
310
- CC : gcc
311
- MAKEFLAGS : -j4 CC=g++ CFLAGS=-fpermissive\ -g
327
+ ECDH : yes
328
+ RECOVERY : yes
329
+ SCHNORRSIG : yes
330
+ CTIMETEST : no
331
+ CC : clang
332
+ SECP256K1_TEST_ITERS : 32
333
+ ASM : no
334
+ container :
335
+ memory : 2G
336
+ matrix :
337
+ - env :
338
+ CFLAGS : " -fsanitize=memory -g"
339
+ - env :
340
+ ECMULTGENPRECISION : 2
341
+ ECMULTWINDOW : 2
342
+ CFLAGS : " -fsanitize=memory -g -O3"
343
+ << : *MERGE_BASE
344
+ test_script :
345
+ - ./ci/cirrus.sh
346
+ << : *CAT_LOGS
347
+
348
+ task :
349
+ name : " C++ -fpermissive (entire project)"
350
+ << : *LINUX_CONTAINER
351
+ env :
352
+ CC : g++
353
+ CFLAGS : -fpermissive -g
354
+ CPPFLAGS : -DSECP256K1_CPLUSPLUS_TEST_OVERRIDE
312
355
WERROR_CFLAGS :
313
356
ECDH : yes
314
357
RECOVERY : yes
@@ -318,6 +361,14 @@ task:
318
361
- ./ci/cirrus.sh
319
362
<< : *CAT_LOGS
320
363
364
+ task :
365
+ name : " C++ (public headers)"
366
+ << : *LINUX_CONTAINER
367
+ test_script :
368
+ - g++ -Werror include/*.h
369
+ - clang -Werror -x c++-header include/*.h
370
+ - /opt/msvc/bin/x64/cl.exe -c -WX -TP include/*.h
371
+
321
372
task :
322
373
name : " sage prover"
323
374
<< : *LINUX_CONTAINER
0 commit comments