2020-12-22 16:42:08 +01:00
env :
2023-01-27 22:44:11 +01:00
### cirrus config
CIRRUS_CLONE_DEPTH : 1
2021-05-06 14:02:00 +02:00
### compiler options
HOST :
2022-11-08 09:47:31 +00:00
WRAPPER_CMD :
2021-05-06 14:02:00 +02:00
# Specific warnings can be disabled with -Wno-error=foo.
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
WERROR_CFLAGS : -Werror -pedantic-errors
2021-12-20 18:00:13 +01:00
MAKEFLAGS : -j4
2021-05-06 14:02:00 +02:00
BUILD : check
### secp256k1 config
2021-12-15 14:10:46 +01:00
ECMULTWINDOW : auto
2020-12-22 16:42:08 +01:00
ECMULTGENPRECISION : auto
ASM : no
2021-05-06 14:02:00 +02:00
WIDEMUL : auto
2020-12-22 16:42:08 +01:00
WITH_VALGRIND : yes
EXTRAFLAGS :
2021-05-06 14:02:00 +02:00
### secp256k1 modules
EXPERIMENTAL : no
2020-12-22 16:42:08 +01:00
ECDH : no
RECOVERY : no
SCHNORRSIG : no
2022-11-04 16:21:25 -04:00
ELLSWIFT : no
2021-05-06 14:02:00 +02:00
### test options
2021-11-09 01:32:30 +05:30
SECP256K1_TEST_ITERS :
2021-05-06 14:02:00 +02:00
BENCH : yes
2021-11-09 01:32:30 +05:30
SECP256K1_BENCH_ITERS : 2
2022-12-20 12:28:48 -05:00
CTIMETESTS : yes
2020-04-30 14:34:24 +03:00
# Compile and run the tests
EXAMPLES : yes
2020-12-22 16:42:08 +01:00
2022-11-15 13:30:12 -05:00
# https://cirrus-ci.org/pricing/#compute-credits
credits_snippet : &CREDITS
2022-12-12 08:35:36 -05:00
# Don't use any credits for now.
use_compute_credits : false
2022-11-15 13:30:12 -05:00
2020-12-22 16:42:08 +01:00
cat_logs_snippet : &CAT_LOGS
always :
2021-03-02 00:09:05 +01:00
cat_tests_log_script :
2020-12-22 16:42:08 +01:00
- cat tests.log || true
2023-01-05 11:37:40 +01:00
cat_noverify_tests_log_script :
- cat noverify_tests.log || true
2021-03-02 00:09:05 +01:00
cat_exhaustive_tests_log_script :
2020-12-22 16:42:08 +01:00
- cat exhaustive_tests.log || true
2022-12-06 18:45:43 -05:00
cat_ctime_tests_log_script :
- cat ctime_tests.log || true
2021-03-02 00:09:05 +01:00
cat_bench_log_script :
2020-12-22 16:42:08 +01:00
- cat bench.log || true
2021-03-02 00:09:05 +01:00
cat_config_log_script :
2020-12-22 16:42:08 +01:00
- cat config.log || true
2021-03-02 00:09:05 +01:00
cat_test_env_script :
2020-12-22 16:42:08 +01:00
- cat test_env.log || true
2021-03-02 00:09:05 +01:00
cat_ci_env_script :
2020-12-22 16:42:08 +01:00
- env
2021-12-20 18:00:13 +01:00
linux_container_snippet : &LINUX_CONTAINER
2020-12-22 16:42:08 +01:00
container :
2021-02-26 15:52:40 +01:00
dockerfile : ci/linux-debian.Dockerfile
2020-12-22 16:42:08 +01:00
# Reduce number of CPUs to be able to do more builds in parallel.
cpu : 1
2021-12-20 18:00:13 +01:00
# Gives us more CPUs for free if they're available.
greedy : true
2020-12-22 16:42:08 +01:00
# More than enough for our scripts.
2023-05-13 19:12:32 +02:00
memory : 2G
2021-12-20 18:00:13 +01:00
2021-05-02 12:48:38 -07:00
task :
name : "ARM64: Linux (Debian stable, QEMU)"
2021-12-20 18:00:13 +01:00
<< : *LINUX_CONTAINER
2021-05-02 12:48:38 -07:00
env :
2021-05-17 17:19:01 +02:00
WRAPPER_CMD : qemu-aarch64
2021-11-09 01:32:30 +05:30
SECP256K1_TEST_ITERS : 16
2021-05-02 12:48:38 -07:00
HOST : aarch64-linux-gnu
WITH_VALGRIND : no
ECDH : yes
RECOVERY : yes
SCHNORRSIG : yes
2022-11-04 16:21:25 -04:00
ELLSWIFT : yes
2022-12-20 12:28:48 -05:00
CTIMETESTS : no
2021-05-02 12:48:38 -07:00
test_script :
2023-08-17 21:44:35 +01:00
- ./ci/ci.sh
2021-05-02 12:48:38 -07:00
<< : *CAT_LOGS
2021-06-08 17:03:53 +02:00
task :
name : "ppc64le: Linux (Debian stable, QEMU)"
2021-12-20 18:00:13 +01:00
<< : *LINUX_CONTAINER
2021-06-08 17:03:53 +02:00
env :
WRAPPER_CMD : qemu-ppc64le
2021-11-09 01:32:30 +05:30
SECP256K1_TEST_ITERS : 16
2021-06-08 17:03:53 +02:00
HOST : powerpc64le-linux-gnu
WITH_VALGRIND : no
ECDH : yes
RECOVERY : yes
SCHNORRSIG : yes
2022-11-04 16:21:25 -04:00
ELLSWIFT : yes
2022-12-20 12:28:48 -05:00
CTIMETESTS : no
2021-06-08 17:03:53 +02:00
test_script :
2023-08-17 21:44:35 +01:00
- ./ci/ci.sh
2021-06-08 17:03:53 +02:00
<< : *CAT_LOGS
2020-11-09 17:52:12 +01:00
# Sanitizers
task :
2021-12-20 18:00:13 +01:00
<< : *LINUX_CONTAINER
2020-11-09 17:52:12 +01:00
env :
ECDH : yes
RECOVERY : yes
SCHNORRSIG : yes
2022-11-04 16:21:25 -04:00
ELLSWIFT : yes
2022-12-20 12:28:48 -05:00
CTIMETESTS : no
2020-11-09 17:52:12 +01:00
matrix :
- name : "Valgrind (memcheck)"
2021-12-21 13:13:59 +01:00
container :
cpu : 2
2020-11-09 17:52:12 +01:00
env :
2021-05-17 17:19:01 +02:00
# The `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (https://www.valgrind.org/docs/manual/manual-core.html)
WRAPPER_CMD : "valgrind --error-exitcode=42"
2021-12-03 14:56:28 -05:00
SECP256K1_TEST_ITERS : 2
2020-11-09 17:52:12 +01:00
- name : "UBSan, ASan, LSan"
2021-12-21 13:13:59 +01:00
container :
memory : 2G
2020-11-09 17:52:12 +01:00
env :
2021-11-10 15:17:26 +01:00
CFLAGS : "-fsanitize=undefined,address -g"
2020-11-09 17:52:12 +01:00
UBSAN_OPTIONS : "print_stacktrace=1:halt_on_error=1"
ASAN_OPTIONS : "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
LSAN_OPTIONS : "use_unaligned=1"
2021-11-09 01:32:30 +05:30
SECP256K1_TEST_ITERS : 32
2020-11-09 17:52:12 +01:00
# Try to cover many configurations with just a tiny matrix.
matrix :
- env :
ASM : auto
- env :
ASM : no
ECMULTGENPRECISION : 2
2021-12-15 14:10:46 +01:00
ECMULTWINDOW : 2
2020-11-09 17:52:12 +01:00
matrix :
- env :
CC : clang
- env :
HOST : i686-linux-gnu
CC : i686-linux-gnu-gcc
test_script :
2023-08-17 21:44:35 +01:00
- ./ci/ci.sh
2020-11-09 17:52:12 +01:00
<< : *CAT_LOGS
2022-11-16 11:51:00 -05:00
# Memory sanitizers
task :
<< : *LINUX_CONTAINER
name : "MSan"
env :
ECDH : yes
RECOVERY : yes
SCHNORRSIG : yes
2023-08-15 19:19:36 +02:00
ELLSWIFT : yes
2022-12-20 12:28:48 -05:00
CTIMETESTS : yes
2022-11-16 11:51:00 -05:00
CC : clang
SECP256K1_TEST_ITERS : 32
ASM : no
2022-12-06 18:53:51 -05:00
WITH_VALGRIND : no
2022-11-16 11:51:00 -05:00
container :
memory : 2G
matrix :
- env :
CFLAGS : "-fsanitize=memory -g"
- env :
ECMULTGENPRECISION : 2
ECMULTWINDOW : 2
CFLAGS : "-fsanitize=memory -g -O3"
test_script :
2023-08-17 21:44:35 +01:00
- ./ci/ci.sh
2022-11-16 11:51:00 -05:00
<< : *CAT_LOGS
2021-07-05 10:33:36 +02:00
task :
2022-03-17 22:29:25 +01:00
name : "C++ -fpermissive (entire project)"
2021-12-20 18:00:13 +01:00
<< : *LINUX_CONTAINER
2021-07-05 10:33:36 +02:00
env :
2022-03-17 22:26:19 +01:00
CC : g++
CFLAGS : -fpermissive -g
CPPFLAGS : -DSECP256K1_CPLUSPLUS_TEST_OVERRIDE
2021-07-05 10:33:36 +02:00
WERROR_CFLAGS :
ECDH : yes
RECOVERY : yes
SCHNORRSIG : yes
2022-11-04 16:21:25 -04:00
ELLSWIFT : yes
2021-07-05 10:33:36 +02:00
test_script :
2023-08-17 21:44:35 +01:00
- ./ci/ci.sh
2021-07-05 10:33:36 +02:00
<< : *CAT_LOGS
2022-02-03 12:58:55 +01:00
2022-03-17 22:29:25 +01:00
task :
name : "C++ (public headers)"
<< : *LINUX_CONTAINER
test_script :
- g++ -Werror include/*.h
- clang -Werror -x c++-header include/*.h