|
1 | 1 | env:
|
2 | 2 | ### cirrus config
|
3 | 3 | CIRRUS_CLONE_DEPTH: 1
|
4 |
| - CIRRUS_LOG_TIMESTAMP: true |
5 |
| - MAKEJOBS: "-j10" |
6 |
| - TEST_RUNNER_PORT_MIN: "14000" # Must be larger than 12321, which is used for the http cache. See https://cirrus-ci.org/guide/writing-tasks/#http-cache |
7 |
| - CI_FAILFAST_TEST_LEAVE_DANGLING: "1" # Cirrus CI does not care about dangling processes and setting this variable avoids killing the CI script itself on error |
8 |
| - |
9 |
| -# A self-hosted machine(s) can be used via Cirrus CI. It can be configured with |
10 |
| -# multiple users to run tasks in parallel. No sudo permission is required. |
11 |
| -# |
12 |
| -# https://cirrus-ci.org/guide/persistent-workers/ |
13 |
| -# |
14 |
| -# Generally, a persistent worker must run Ubuntu 23.04+ or Debian 12+. |
15 |
| -# |
16 |
| -# The following specific types should exist, with the following requirements: |
17 |
| -# - small: For an x86_64 machine, with at least 2 vCPUs and 8 GB of memory. |
18 |
| -# - medium: For an x86_64 machine, with at least 4 vCPUs and 16 GB of memory. |
19 |
| -# - arm64: For an aarch64 machine, with at least 2 vCPUs and 8 GB of memory. |
20 |
| -# |
21 |
| -# CI jobs for the latter configuration can be run on x86_64 hardware |
22 |
| -# by installing qemu-user-static, which works out of the box with |
23 |
| -# podman or docker. Background: https://stackoverflow.com/a/72890225/313633 |
24 |
| -# |
25 |
| -# The above machine types are matched to each task by their label. Refer to the |
26 |
| -# Cirrus CI docs for more details. |
27 |
| -# |
28 |
| -# When a contributor maintains a fork of the repo, any pull request they make |
29 |
| -# to their own fork, or to the main repository, will trigger two CI runs: |
30 |
| -# one for the branch push and one for the pull request. |
31 |
| -# This can be avoided by setting SKIP_BRANCH_PUSH=true as a custom env variable |
32 |
| -# in Cirrus repository settings, accessible from |
33 |
| -# https://cirrus-ci.com/github/my-organization/my-repository |
34 |
| -# |
35 |
| -# On machines that are persisted between CI jobs, RESTART_CI_DOCKER_BEFORE_RUN=1 |
36 |
| -# ensures that previous containers and artifacts are cleared before each run. |
37 |
| -# This requires installing Podman instead of Docker. |
38 |
| -# |
39 |
| -# Futhermore: |
40 |
| -# - podman-docker-4.1+ is required due to the bugfix in 4.1 |
41 |
| -# (https://github.com/bitcoin/bitcoin/pull/21652#issuecomment-1657098200) |
42 |
| -# - The ./ci/ dependencies (with cirrus-cli) should be installed. One-liner example |
43 |
| -# for a single user setup with sudo permission: |
44 |
| -# |
45 |
| -# ``` |
46 |
| -# apt update && apt install git screen python3 bash podman-docker uidmap slirp4netns curl -y && curl -L -o cirrus "https://github.com/cirruslabs/cirrus-cli/releases/latest/download/cirrus-linux-$(dpkg --print-architecture)" && mv cirrus /usr/local/bin/cirrus && chmod +x /usr/local/bin/cirrus |
47 |
| -# ``` |
48 |
| -# |
49 |
| -# - There are no strict requirements on the hardware. Having fewer CPU threads |
50 |
| -# than recommended merely causes the CI script to run slower. |
51 |
| -# To avoid rare and intermittent OOM due to short memory usage spikes, |
52 |
| -# it is recommended to add (and persist) swap: |
53 |
| -# |
54 |
| -# ``` |
55 |
| -# fallocate -l 16G /swapfile_ci && chmod 600 /swapfile_ci && mkswap /swapfile_ci && swapon /swapfile_ci && ( echo '/swapfile_ci none swap sw 0 0' | tee -a /etc/fstab ) |
56 |
| -# ``` |
57 |
| -# |
58 |
| -# - To register the persistent worker, open a `screen` session and run: |
59 |
| -# |
60 |
| -# ``` |
61 |
| -# RESTART_CI_DOCKER_BEFORE_RUN=1 screen cirrus worker run --labels type=todo_fill_in_type --token todo_fill_in_token |
62 |
| -# ``` |
63 |
| - |
64 |
| -# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks |
65 |
| -filter_template: &FILTER_TEMPLATE |
66 |
| - # Allow forks to specify SKIP_BRANCH_PUSH=true and skip CI runs when a branch is pushed, |
67 |
| - # but still run CI when a PR is created. |
68 |
| - # https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution |
69 |
| - skip: $SKIP_BRANCH_PUSH == "true" && $CIRRUS_PR == "" |
70 |
| - stateful: false # https://cirrus-ci.org/guide/writing-tasks/#stateful-tasks |
71 |
| - |
72 |
| -base_template: &BASE_TEMPLATE |
73 |
| - << : *FILTER_TEMPLATE |
74 |
| - merge_base_script: |
75 |
| - # Require git (used in fingerprint_script). |
76 |
| - - git --version || ( apt-get update && apt-get install -y git ) |
77 |
| - - if [ "$CIRRUS_PR" = "" ]; then exit 0; fi |
78 |
| - - git fetch $CIRRUS_REPO_CLONE_URL $CIRRUS_BASE_BRANCH |
79 |
| - - git config --global user.email "[email protected]" |
80 |
| - - git config --global user.name "ci" |
81 |
| - - git merge FETCH_HEAD # Merge base to detect silent merge conflicts |
82 |
| - |
83 |
| -env_matrix_snippet: &ENV_MATRIX_VALGRIND |
84 |
| - - env: |
85 |
| - ENABLE_FIELDS: "7,32,58" |
86 |
| - - env: |
87 |
| - BUILD: distcheck |
88 |
| - - env: |
89 |
| - EXEC_CMD: valgrind --error-exitcode=42 |
90 |
| - TESTRUNS: 1 |
91 |
| - BUILD: |
92 |
| - |
93 |
| -env_matrix_snippet: &ENV_MATRIX_SAN_VALGRIND |
94 |
| - - env: |
95 |
| - ENABLE_FIELDS: "11,64,37" |
96 |
| - - env: |
97 |
| - BUILD: distcheck |
98 |
| - - env: |
99 |
| - EXEC_CMD: valgrind --error-exitcode=42 |
100 |
| - TESTRUNS: 1 |
101 |
| - BUILD: |
102 |
| - - env: |
103 |
| - CXXFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer" |
104 |
| - LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer" |
105 |
| - UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1" |
106 |
| - BENCH: no |
107 |
| - |
108 |
| -task: |
109 |
| - name: 'lint' |
110 |
| - << : *BASE_TEMPLATE |
111 |
| - container: |
112 |
| - dockerfile: ci/linux-debian.Dockerfile |
113 |
| - memory: 2G |
114 |
| - cpu: 4 |
115 |
| - matrix: |
116 |
| - << : *ENV_MATRIX_SAN_VALGRIND |
117 |
| - matrix: |
118 |
| - - env: |
119 |
| - CXX: g++ |
120 |
| - - env: |
121 |
| - CXX: clang++ -gdwarf-4 |
122 |
| - << : *MERGE_BASE |
| 4 | + ### compiler options |
| 5 | + HOST: |
| 6 | + WRAPPER_CMD: |
| 7 | + # Specific warnings can be disabled with -Wno-error=foo. |
| 8 | + # -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual. |
| 9 | + WERROR_CFLAGS: -Werror -pedantic-errors |
| 10 | + MAKEFLAGS: -j4 |
| 11 | + BUILD: check |
| 12 | + ### secp256k1 config |
| 13 | + ECMULTWINDOW: 15 |
| 14 | + ECMULTGENKB: 22 |
| 15 | + ASM: no |
| 16 | + WIDEMUL: auto |
| 17 | + WITH_VALGRIND: yes |
| 18 | + EXTRAFLAGS: |
| 19 | + ### secp256k1 modules |
| 20 | + EXPERIMENTAL: no |
| 21 | + ECDH: no |
| 22 | + RECOVERY: no |
| 23 | + EXTRAKEYS: no |
| 24 | + SCHNORRSIG: no |
| 25 | + MUSIG: no |
| 26 | + ELLSWIFT: no |
| 27 | + ### test options |
| 28 | + SECP256K1_TEST_ITERS: 64 |
| 29 | + BENCH: yes |
| 30 | + SECP256K1_BENCH_ITERS: 2 |
| 31 | + CTIMETESTS: yes |
| 32 | + # Compile and run the tests |
| 33 | + EXAMPLES: yes |
| 34 | + |
| 35 | +cat_logs_snippet: &CAT_LOGS |
| 36 | + always: |
| 37 | + cat_tests_log_script: |
| 38 | + - cat tests.log || true |
| 39 | + cat_noverify_tests_log_script: |
| 40 | + - cat noverify_tests.log || true |
| 41 | + cat_exhaustive_tests_log_script: |
| 42 | + - cat exhaustive_tests.log || true |
| 43 | + cat_ctime_tests_log_script: |
| 44 | + - cat ctime_tests.log || true |
| 45 | + cat_bench_log_script: |
| 46 | + - cat bench.log || true |
| 47 | + cat_config_log_script: |
| 48 | + - cat config.log || true |
| 49 | + cat_test_env_script: |
| 50 | + - cat test_env.log || true |
| 51 | + cat_ci_env_script: |
| 52 | + - env |
| 53 | + |
| 54 | +linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER |
| 55 | + env_script: |
| 56 | + - env | tee /tmp/env |
| 57 | + build_script: |
| 58 | + - DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm" |
| 59 | + - docker image prune --force # Cleanup stale layers |
123 | 60 | test_script:
|
124 | 61 | - ./ci/cirrus.sh
|
125 | 62 | << : *CAT_LOGS
|
|
135 | 72 | RECOVERY: yes
|
136 | 73 | EXTRAKEYS: yes
|
137 | 74 | SCHNORRSIG: yes
|
| 75 | + MUSIG: yes |
138 | 76 | ELLSWIFT: yes
|
139 | 77 | matrix:
|
140 | 78 | << : *ENV_MATRIX_VALGRIND
|
@@ -195,6 +133,7 @@ task:
|
195 | 133 | RECOVERY: yes
|
196 | 134 | EXTRAKEYS: yes
|
197 | 135 | SCHNORRSIG: yes
|
| 136 | + MUSIG: yes |
198 | 137 | ELLSWIFT: yes
|
199 | 138 | WRAPPER_CMD: 'valgrind --error-exitcode=42'
|
200 | 139 | SECP256K1_TEST_ITERS: 2
|
|
0 commit comments