194 lines
4.4 KiB
YAML
194 lines
4.4 KiB
YAML
env:
|
|
### cirrus config
|
|
CIRRUS_CLONE_DEPTH: 1
|
|
### compiler options
|
|
HOST:
|
|
WRAPPER_CMD:
|
|
# 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
|
|
MAKEFLAGS: -j4
|
|
BUILD: check
|
|
### secp256k1 config
|
|
ECMULTWINDOW: auto
|
|
ECMULTGENPRECISION: auto
|
|
ASM: no
|
|
WIDEMUL: auto
|
|
WITH_VALGRIND: yes
|
|
EXTRAFLAGS:
|
|
### secp256k1 modules
|
|
EXPERIMENTAL: no
|
|
ECDH: no
|
|
RECOVERY: no
|
|
SCHNORRSIG: no
|
|
ELLSWIFT: no
|
|
### test options
|
|
SECP256K1_TEST_ITERS:
|
|
BENCH: yes
|
|
SECP256K1_BENCH_ITERS: 2
|
|
CTIMETESTS: yes
|
|
# Compile and run the tests
|
|
EXAMPLES: yes
|
|
|
|
# https://cirrus-ci.org/pricing/#compute-credits
|
|
credits_snippet: &CREDITS
|
|
# Don't use any credits for now.
|
|
use_compute_credits: false
|
|
|
|
cat_logs_snippet: &CAT_LOGS
|
|
always:
|
|
cat_tests_log_script:
|
|
- cat tests.log || true
|
|
cat_noverify_tests_log_script:
|
|
- cat noverify_tests.log || true
|
|
cat_exhaustive_tests_log_script:
|
|
- cat exhaustive_tests.log || true
|
|
cat_ctime_tests_log_script:
|
|
- cat ctime_tests.log || true
|
|
cat_bench_log_script:
|
|
- cat bench.log || true
|
|
cat_config_log_script:
|
|
- cat config.log || true
|
|
cat_test_env_script:
|
|
- cat test_env.log || true
|
|
cat_ci_env_script:
|
|
- env
|
|
|
|
linux_container_snippet: &LINUX_CONTAINER
|
|
container:
|
|
dockerfile: ci/linux-debian.Dockerfile
|
|
# Reduce number of CPUs to be able to do more builds in parallel.
|
|
cpu: 1
|
|
# Gives us more CPUs for free if they're available.
|
|
greedy: true
|
|
# More than enough for our scripts.
|
|
memory: 2G
|
|
|
|
task:
|
|
name: "ARM64: Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-aarch64
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: aarch64-linux-gnu
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
ELLSWIFT: yes
|
|
CTIMETESTS: no
|
|
test_script:
|
|
- ./ci/ci.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "ppc64le: Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-ppc64le
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: powerpc64le-linux-gnu
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
ELLSWIFT: yes
|
|
CTIMETESTS: no
|
|
test_script:
|
|
- ./ci/ci.sh
|
|
<< : *CAT_LOGS
|
|
|
|
# Sanitizers
|
|
task:
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
ELLSWIFT: yes
|
|
CTIMETESTS: no
|
|
matrix:
|
|
- name: "Valgrind (memcheck)"
|
|
container:
|
|
cpu: 2
|
|
env:
|
|
# 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"
|
|
SECP256K1_TEST_ITERS: 2
|
|
- name: "UBSan, ASan, LSan"
|
|
container:
|
|
memory: 2G
|
|
env:
|
|
CFLAGS: "-fsanitize=undefined,address -g"
|
|
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"
|
|
SECP256K1_TEST_ITERS: 32
|
|
# Try to cover many configurations with just a tiny matrix.
|
|
matrix:
|
|
- env:
|
|
ASM: auto
|
|
- env:
|
|
ASM: no
|
|
ECMULTGENPRECISION: 2
|
|
ECMULTWINDOW: 2
|
|
matrix:
|
|
- env:
|
|
CC: clang
|
|
- env:
|
|
HOST: i686-linux-gnu
|
|
CC: i686-linux-gnu-gcc
|
|
test_script:
|
|
- ./ci/ci.sh
|
|
<< : *CAT_LOGS
|
|
|
|
# Memory sanitizers
|
|
task:
|
|
<< : *LINUX_CONTAINER
|
|
name: "MSan"
|
|
env:
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
ELLSWIFT: yes
|
|
CTIMETESTS: yes
|
|
CC: clang
|
|
SECP256K1_TEST_ITERS: 32
|
|
ASM: no
|
|
WITH_VALGRIND: no
|
|
container:
|
|
memory: 2G
|
|
matrix:
|
|
- env:
|
|
CFLAGS: "-fsanitize=memory -g"
|
|
- env:
|
|
ECMULTGENPRECISION: 2
|
|
ECMULTWINDOW: 2
|
|
CFLAGS: "-fsanitize=memory -g -O3"
|
|
test_script:
|
|
- ./ci/ci.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "C++ -fpermissive (entire project)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
CC: g++
|
|
CFLAGS: -fpermissive -g
|
|
CPPFLAGS: -DSECP256K1_CPLUSPLUS_TEST_OVERRIDE
|
|
WERROR_CFLAGS:
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
ELLSWIFT: yes
|
|
test_script:
|
|
- ./ci/ci.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "C++ (public headers)"
|
|
<< : *LINUX_CONTAINER
|
|
test_script:
|
|
- g++ -Werror include/*.h
|
|
- clang -Werror -x c++-header include/*.h
|