da0092bc 10f9bd84 297ce820 f34b5cae 920a0e5f 9526874d aa1b889b 20d791ed 3e7b2ea1 21c188b3 8fa41201 515a5dbd c74a7b7e 74c34e72 7006f1b9 ea5e8a9c 793ad901 2e5e4b67 fecf436d 49f608de 49002274 6ad908aa 4f01840b 61ae37c6 486205aa 5d0dbef0 0559fc6e be6944ad a69df3ad b39d431a 0b83b203 09971a3f 9281c9f4 423b6d19 a310e79e 39a36db9 a1102b12 Deal with - secp256k1_test_rng removal in commit 77a19750b46916b93bb6a08837c26f585bd940fa - ecmult_gen context simplification after making table static in commit 3b0c2185eab0fe5cb910fffee4c88e134f6d3cad
351 lines
9.4 KiB
YAML
351 lines
9.4 KiB
YAML
env:
|
|
### compiler options
|
|
HOST:
|
|
# 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
|
|
ECDH: no
|
|
RECOVERY: no
|
|
SCHNORRSIG: no
|
|
ECDSA_S2C: no
|
|
GENERATOR: no
|
|
RANGEPROOF: no
|
|
WHITELIST: no
|
|
MUSIG: no
|
|
ECDSAADAPTOR: no
|
|
### test options
|
|
SECP256K1_TEST_ITERS:
|
|
BENCH: yes
|
|
SECP256K1_BENCH_ITERS: 2
|
|
CTIMETEST: yes
|
|
|
|
cat_logs_snippet: &CAT_LOGS
|
|
always:
|
|
cat_tests_log_script:
|
|
- cat tests.log || true
|
|
cat_exhaustive_tests_log_script:
|
|
- cat exhaustive_tests.log || true
|
|
cat_valgrind_ctime_test_log_script:
|
|
- cat valgrind_ctime_test.log || true
|
|
cat_bench_log_script:
|
|
- cat bench.log || true
|
|
on_failure:
|
|
cat_config_log_script:
|
|
- cat config.log || true
|
|
cat_test_env_script:
|
|
- cat test_env.log || true
|
|
cat_ci_env_script:
|
|
- env
|
|
|
|
merge_base_script_snippet: &MERGE_BASE
|
|
merge_base_script:
|
|
- if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
|
|
- git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH
|
|
- git config --global user.email "ci@ci.ci"
|
|
- git config --global user.name "ci"
|
|
- git merge FETCH_HEAD # Merge base to detect silent merge conflicts
|
|
|
|
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: 1G
|
|
|
|
task:
|
|
name: "x86_64: Linux (Debian stable)"
|
|
<< : *LINUX_CONTAINER
|
|
matrix: &ENV_MATRIX
|
|
- env: {WIDEMUL: int64, RECOVERY: yes}
|
|
- env: {WIDEMUL: int64, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
|
|
- env: {WIDEMUL: int128}
|
|
- env: {WIDEMUL: int128, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
|
|
- env: {WIDEMUL: int128, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
|
|
- env: {WIDEMUL: int128, ASM: x86_64}
|
|
- env: { RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes}
|
|
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
|
|
- env: {CPPFLAGS: -DDETERMINISTIC}
|
|
- env: {CFLAGS: -O0, CTIMETEST: no}
|
|
- env: { ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
|
|
- env: { ECMULTGENPRECISION: 8, ECMULTWINDOW: 4 }
|
|
matrix:
|
|
- env:
|
|
CC: gcc
|
|
- env:
|
|
CC: clang
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "i686: Linux (Debian stable)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
HOST: i686-linux-gnu
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
EXPERIMENTAL: yes
|
|
SCHNORRSIG: yes
|
|
ECDSA_S2C: yes
|
|
RANGEPROOF: yes
|
|
WHITELIST: yes
|
|
GENERATOR: yes
|
|
MUSIG: yes
|
|
ECDSAADAPTOR: yes
|
|
matrix:
|
|
- env:
|
|
CC: i686-linux-gnu-gcc
|
|
- env:
|
|
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "x86_64: macOS Catalina"
|
|
macos_instance:
|
|
image: catalina-base
|
|
# tasks with valgrind enabled take about 90 minutes
|
|
timeout_in: 120m
|
|
env:
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
# Cirrus gives us a fixed number of 12 virtual CPUs. Not that we even have that many jobs at the moment...
|
|
MAKEFLAGS: -j13
|
|
matrix:
|
|
<< : *ENV_MATRIX
|
|
matrix:
|
|
- env:
|
|
CC: gcc-9
|
|
- env:
|
|
CC: clang
|
|
# Update Command Line Tools
|
|
# Uncomment this if the Command Line Tools on the CirrusCI macOS image are too old to brew valgrind.
|
|
# See https://apple.stackexchange.com/a/195963 for the implementation.
|
|
## update_clt_script:
|
|
## - system_profiler SPSoftwareDataType
|
|
## - touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
|
## - |-
|
|
## PROD=$(softwareupdate -l | grep "*.*Command Line" | tail -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | sed 's/Label: //g' | tr -d '\n')
|
|
## # For debugging
|
|
## - softwareupdate -l && echo "PROD: $PROD"
|
|
## - softwareupdate -i "$PROD" --verbose
|
|
## - rm /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
|
##
|
|
brew_valgrind_pre_script:
|
|
- brew update
|
|
- brew config
|
|
- brew tap LouisBrunner/valgrind
|
|
# Fetch valgrind source but don't build it yet.
|
|
- brew fetch --HEAD LouisBrunner/valgrind/valgrind
|
|
brew_valgrind_cache:
|
|
# This is $(brew --cellar valgrind) but command substition does not work here.
|
|
folder: /usr/local/Cellar/valgrind
|
|
# Rebuild cache if ...
|
|
fingerprint_script:
|
|
# ... macOS version changes:
|
|
- sw_vers
|
|
# ... brew changes:
|
|
- brew config
|
|
# ... valgrind changes:
|
|
- git -C "$(brew --cache)/valgrind--git" rev-parse HEAD
|
|
populate_script:
|
|
# If there's no hit in the cache, build and install valgrind.
|
|
- brew install --HEAD LouisBrunner/valgrind/valgrind
|
|
brew_valgrind_post_script:
|
|
# If we have restored valgrind from the cache, tell brew to create symlink to the PATH.
|
|
# If we haven't restored from cached (and just run brew install), this is a no-op.
|
|
- brew link valgrind
|
|
brew_script:
|
|
- brew install automake libtool gcc@9
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-s390x
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: s390x-linux-gnu
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
EXPERIMENTAL: yes
|
|
SCHNORRSIG: yes
|
|
ECDSA_S2C: yes
|
|
RANGEPROOF: yes
|
|
WHITELIST: yes
|
|
GENERATOR: yes
|
|
MUSIG: yes
|
|
ECDSAADAPTOR: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=27008
|
|
- rm /etc/ld.so.cache
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "ARM32: Linux (Debian stable, QEMU)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: qemu-arm
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: arm-linux-gnueabihf
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
EXPERIMENTAL: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
matrix:
|
|
- env: {}
|
|
- env: {ASM: arm}
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
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
|
|
EXPERIMENTAL: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.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
|
|
EXPERIMENTAL: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
WRAPPER_CMD: wine64-stable
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: x86_64-w64-mingw32
|
|
WITH_VALGRIND: no
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
EXPERIMENTAL: yes
|
|
SCHNORRSIG: yes
|
|
CTIMETEST: no
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
# Sanitizers
|
|
task:
|
|
timeout_in: 120m
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
EXPERIMENTAL: yes
|
|
SCHNORRSIG: yes
|
|
ECDSA_S2C: yes
|
|
RANGEPROOF: yes
|
|
WHITELIST: yes
|
|
GENERATOR: yes
|
|
MUSIG: yes
|
|
ECDSAADAPTOR: yes
|
|
CTIMETEST: 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
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|
|
|
|
task:
|
|
name: "C++ -fpermissive"
|
|
<< : *LINUX_CONTAINER
|
|
env:
|
|
# ./configure correctly errors out when given CC=g++.
|
|
# We hack around this by passing CC=g++ only to make.
|
|
CC: gcc
|
|
MAKEFLAGS: -j4 CC=g++ CFLAGS=-fpermissive\ -g
|
|
WERROR_CFLAGS:
|
|
EXPERIMENTAL: yes
|
|
ECDH: yes
|
|
RECOVERY: yes
|
|
SCHNORRSIG: yes
|
|
<< : *MERGE_BASE
|
|
test_script:
|
|
- ./ci/cirrus.sh
|
|
<< : *CAT_LOGS
|