Second of six commits adding the frost_enrollment module. This one is scaffolding only: the five entry points are stubs that validate their pointer arguments, zero their outputs and return 0. What is being verified here is that the module configures, compiles, links, exports its symbols and registers its test module in both build systems -- so that the next commit changes nothing but arithmetic. Ordering is the one thing in this commit that can go silently wrong, and it goes wrong in opposite directions in the two build systems: - configure.ac executes its `if` blocks in file order, and enable_module_frost defaults to no (configure.ac:243). A block placed after the frost block at :601 that sets enable_module_frost=yes flips the variable too late: AM_CONDITIONAL goes true, so the header is installed and the Makefile fragment is pulled in, but -DENABLE_MODULE_FROST=1 is never appended, so src/secp256k1.c never includes frost's implementation and every secp256k1_frost_* symbol fails to link. The new block therefore goes ahead of both the frost block and prefractal's, which documents the same trap. - src/CMakeLists.txt processes dependents FIRST, so the same block goes above the FROST block there, beside prefractal's. Verified rather than assumed: configuring with ONLY --enable-module-frost-enrollment emits -DENABLE_MODULE_FROST=1 alongside -DENABLE_MODULE_FROST_ENROLLMENT=1, and the CMake summary prints "frost ON" for the same configuration -- the latter is what the PARENT_SCOPE lift buys, since the summary runs after add_subdirectory(src) and would otherwise report a module it is compiling in as OFF. The dependency guard is prefractal's implies-frost idiom, copied verbatim along with its reasoning. frost is default-OFF, so the `test x"$enable_module_frost" = x"no"` / `DEFINED X AND NOT X` guard every other module uses -- which reads as "the user disabled it explicitly" for a default-ON dependency -- is true by default here and cannot tell an explicit --disable-module-frost from the default once both are in the cache. Enabling frost-enrollment simply implies frost, with no error. The one frost-module change in the whole series is in this commit: src/modules/frost/session.h gains a declaration for secp256k1_frost_sort_ids, which is defined at session_impl.h:517 and declared nowhere. The params hash needs it to canonicalize identifier order. Prefractal reaches frost's statics through translation-unit ordering alone; rather than inherit reuse-by-link-order, this declares the function where keygen.h:48 already declares derive_pubshare_at, so the reuse goes through an interface. No behavior change: it is a declaration for an existing static definition in the same TU. CI wiring is two files, and skipping either half fails quietly: - ci/ci.sh gets FROST_ENROLLMENT in the reproduction header's variable list and --enable-module-frost-enrollment="$FROST_ENROLLMENT" after the prefractal line. - .github/workflows/ci.yml gets FROST_ENROLLMENT at every PREFRACTAL site: the global default, 11 inline matrix entries and 10 job-level env blocks. Without the default, ci.sh runs under set -eux with an empty $FROST_ENROLLMENT, passes --enable-module-frost-enrollment="", `test x"" = x"yes"` is false, and the module is off in all of CI while ci.sh visibly has the plumbing. Verified programmatically over the parsed workflow: across the 106 effective job contexts, PREFRACTAL and FROST_ENROLLMENT now agree in every single one (45 set to yes, no mismatches), no context sets FROST_ENROLLMENT without FROST or without EXPERIMENTAL, and no context leaves it undefined. ci.sh passes sh -n. The stub test is not a placeholder that has to be deleted later: every entry point must reject an empty helper set and leave its output zeroed, which is true of the stubs and stays true of the finished implementation, so it doubles as the check that all five symbols are reachable from the test binary. Verification. Autotools: ./autogen.sh, then a frost-enrollment-only configure and a full configure with frost, chilldkg, iceberg, prefractal and frost-enrollment all on -- both build with zero warnings under the project's -Werror-grade flag set, ./tests and ./exhaustive_tests exit 0, and `./tests -l` lists the frost_enrollment module. CMake: configure with -DSECP256K1_EXPERIMENTAL=ON -DSECP256K1_ENABLE_MODULE_FROST_ENROLLMENT=ON builds clean and ctest passes 391 tests. nm shows the five new symbols exported from libsecp256k1.so; tools/symbol-check.py could not be run here because python3-lief is not installed in this environment, but all five carry the required secp256k1_ prefix. make dist succeeds and the tarball carries src/modules/frost_enrollment/frost_enrollment.md alongside the other module documents. One unrelated observation from this build: a stale src/ctime_tests-ctime_tests.o left over from an earlier configure with a different module set will fail to link, because automake does not track CPPFLAGS changes across reconfigures. make clean between configurations with different module sets, not a fault in this change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
847 lines
29 KiB
YAML
847 lines
29 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags-ignore:
|
|
- '**'
|
|
schedule:
|
|
# Run on the default branch every Monday morning.
|
|
# This also warms the Docker caches after key rotation.
|
|
- cron: '22 2 * * 1'
|
|
|
|
concurrency:
|
|
group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
### 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: 15
|
|
ECMULTGENKB: 86
|
|
ASM: 'no'
|
|
WIDEMUL: 'auto'
|
|
WITH_VALGRIND: 'yes'
|
|
EXTRAFLAGS:
|
|
### secp256k1 modules
|
|
EXPERIMENTAL: 'no'
|
|
ECDH: 'no'
|
|
RECOVERY: 'no'
|
|
EXTRAKEYS: 'no'
|
|
SCHNORRSIG: 'no'
|
|
MUSIG: 'no'
|
|
ELLSWIFT: 'no'
|
|
ECDSA_S2C: 'no'
|
|
GENERATOR: 'no'
|
|
RANGEPROOF: 'no'
|
|
SURJECTIONPROOF: 'no'
|
|
WHITELIST: 'no'
|
|
ECDSAADAPTOR: 'no'
|
|
BPPP: 'no'
|
|
SCHNORRSIG_HALFAGG: 'no'
|
|
FROST: 'no'
|
|
CHILLDKG: 'no'
|
|
ICEBERG: 'no'
|
|
PREFRACTAL: 'no'
|
|
FROST_ENROLLMENT: 'no'
|
|
### test options
|
|
SECP256K1_TEST_ITERS: 64
|
|
BENCH: 'yes'
|
|
SECP256K1_BENCH_ITERS: 2
|
|
CTIMETESTS: 'yes'
|
|
SYMBOL_CHECK: 'yes'
|
|
# Compile and run the examples.
|
|
EXAMPLES: 'yes'
|
|
# Disable Docker build summary generation.
|
|
# See https://github.com/docker/build-push-action/blob/master/README.md#environment-variables.
|
|
DOCKER_BUILD_SUMMARY: false
|
|
|
|
jobs:
|
|
docker_cache:
|
|
name: "Build ${{ matrix.arch }} Docker image"
|
|
runs-on: ${{ matrix.runner }}
|
|
outputs:
|
|
cache_scope: ${{ steps.cache_timestamp.outputs.period }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: x64
|
|
runner: ubuntu-latest
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
|
|
steps:
|
|
- name: Get cache validity period
|
|
id: cache_timestamp
|
|
run: echo "period=$((10#$(date +%V) / 4))" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
with:
|
|
# See: https://github.com/moby/buildkit/issues/3969.
|
|
driver-opts: |
|
|
network=host
|
|
|
|
- name: Build container
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
file: ./ci/linux-debian.Dockerfile
|
|
cache-from: type=gha,scope=${{ runner.arch }}-${{ steps.cache_timestamp.outputs.period }}
|
|
cache-to: type=gha,scope=${{ runner.arch }}-${{ steps.cache_timestamp.outputs.period }},mode=min
|
|
|
|
x86_64-debian:
|
|
name: "x86_64: Linux (Debian stable)"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- env_vars: { WIDEMUL: 'int64', RECOVERY: 'yes' }
|
|
- env_vars: { WIDEMUL: 'int64', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes'}
|
|
- env_vars: { WIDEMUL: 'int128' }
|
|
- env_vars: { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
|
|
- env_vars: { WIDEMUL: 'int128', RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes' }
|
|
- env_vars: { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes'}
|
|
- env_vars: { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
|
|
- env_vars: { RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes'}
|
|
- env_vars: { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes', CPPFLAGS: '-DVERIFY' }
|
|
- env_vars: { BUILD: 'distcheck', WITH_VALGRIND: 'no', CTIMETESTS: 'no', BENCH: 'no' }
|
|
- env_vars: { CPPFLAGS: '-DDETERMINISTIC' }
|
|
- env_vars: { CFLAGS: '-O0', CTIMETESTS: 'no' }
|
|
- env_vars: { CFLAGS: '-O1', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes' }
|
|
- env_vars: { ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
|
- env_vars: { ECMULTGENKB: 86, ECMULTWINDOW: 4 }
|
|
cc:
|
|
- 'gcc'
|
|
- 'clang'
|
|
- 'gcc-snapshot'
|
|
- 'clang-snapshot'
|
|
|
|
env:
|
|
CC: ${{ matrix.cc }}
|
|
|
|
steps:
|
|
- &CHECKOUT
|
|
name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- &CI_SCRIPT_IN_DOCKER
|
|
name: CI script
|
|
env: ${{ matrix.configuration.env_vars }}
|
|
uses: ./.github/actions/run-in-docker-action
|
|
with:
|
|
dockerfile: ./ci/linux-debian.Dockerfile
|
|
scope: ${{ runner.arch }}-${{ needs.docker_cache.outputs.cache_scope }}
|
|
command: ./ci/ci.sh
|
|
|
|
- &PRINT_LOGS
|
|
name: Print logs
|
|
uses: ./.github/actions/print-logs
|
|
if: ${{ !cancelled() }}
|
|
|
|
i686_debian:
|
|
name: "i686: Linux (Debian stable)"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- env_vars: {}
|
|
cc:
|
|
- 'i686-linux-gnu-gcc'
|
|
- 'clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include'
|
|
|
|
env:
|
|
HOST: 'i686-linux-gnu'
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
GENERATOR: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CC: ${{ matrix.cc }}
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
s390x_debian:
|
|
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
matrix:
|
|
configuration:
|
|
- env_vars: {}
|
|
|
|
env:
|
|
WRAPPER_CMD: 'qemu-s390x'
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: 's390x-linux-gnu'
|
|
WITH_VALGRIND: 'no'
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
GENERATOR: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CTIMETESTS: 'no'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
arm32_debian:
|
|
name: "ARM32: Linux (Debian stable, QEMU)"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- env_vars: {}
|
|
- env_vars: { EXPERIMENTAL: 'yes', ASM: 'arm32' }
|
|
|
|
env:
|
|
WRAPPER_CMD: 'qemu-arm'
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: 'arm-linux-gnueabihf'
|
|
WITH_VALGRIND: 'no'
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CTIMETESTS: 'no'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
arm64-debian:
|
|
name: "arm64: Linux (Debian stable)"
|
|
runs-on: ubuntu-24.04-arm
|
|
needs: docker_cache
|
|
|
|
env:
|
|
SECP256K1_TEST_ITERS: 16
|
|
WITH_VALGRIND: 'no'
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CTIMETESTS: 'no'
|
|
CC: ${{ matrix.cc }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- env_vars: {}
|
|
cc:
|
|
- 'gcc'
|
|
- 'clang'
|
|
- 'gcc-snapshot'
|
|
- 'clang-snapshot'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
ppc64le_debian:
|
|
name: "ppc64le: Linux (Debian stable, QEMU)"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
matrix:
|
|
configuration:
|
|
- env_vars: {}
|
|
|
|
env:
|
|
WRAPPER_CMD: 'qemu-ppc64le'
|
|
SECP256K1_TEST_ITERS: 16
|
|
HOST: 'powerpc64le-linux-gnu'
|
|
WITH_VALGRIND: 'no'
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CTIMETESTS: 'no'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
valgrind_debian:
|
|
name: "Valgrind ${{ matrix.configuration.binary_arch }} (memcheck)"
|
|
runs-on: ${{ matrix.configuration.runner }}
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- runner: ubuntu-latest
|
|
binary_arch: x64
|
|
env_vars: { CC: 'clang', ASM: 'auto' }
|
|
- runner: ubuntu-latest
|
|
binary_arch: i686
|
|
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
|
|
- runner: ubuntu-24.04-arm
|
|
binary_arch: arm64
|
|
env_vars: { CC: 'clang', ASM: 'auto' }
|
|
- runner: ubuntu-latest
|
|
binary_arch: x64
|
|
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
|
- runner: ubuntu-latest
|
|
binary_arch: i686
|
|
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
|
- runner: ubuntu-24.04-arm
|
|
binary_arch: arm64
|
|
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
|
|
|
env:
|
|
# The `--error-exitcode` is required to make the test fail if valgrind found errors,
|
|
# otherwise it will return 0 (https://www.valgrind.org/docs/manual/manual-core.html).
|
|
WRAPPER_CMD: 'valgrind --error-exitcode=42'
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CTIMETESTS: 'no'
|
|
SECP256K1_TEST_ITERS: 2
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
sanitizers_debian:
|
|
name: "UBSan, ASan, LSan"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- env_vars: { CC: 'clang', ASM: 'auto' }
|
|
- env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
|
|
- env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
|
- env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
|
|
|
env:
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CTIMETESTS: 'no'
|
|
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
|
|
SYMBOL_CHECK: 'no'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
msan_debian:
|
|
name: "MSan"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- env_vars:
|
|
CTIMETESTS: 'yes'
|
|
CFLAGS: '-fsanitize=memory -fsanitize-recover=memory -g'
|
|
- env_vars:
|
|
ECMULTGENKB: 2
|
|
ECMULTWINDOW: 2
|
|
CTIMETESTS: 'yes'
|
|
CFLAGS: '-fsanitize=memory -fsanitize-recover=memory -g -O3'
|
|
- env_vars:
|
|
# -fsanitize-memory-param-retval is clang's default, but our build system disables it
|
|
# when ctime_tests when enabled.
|
|
CFLAGS: '-fsanitize=memory -fsanitize-recover=memory -fsanitize-memory-param-retval -g'
|
|
CTIMETESTS: 'no'
|
|
cc:
|
|
- 'clang'
|
|
- 'clang-snapshot'
|
|
|
|
env:
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CC: ${{ matrix.cc }}
|
|
SECP256K1_TEST_ITERS: 32
|
|
ASM: 'no'
|
|
WITH_VALGRIND: 'no'
|
|
SYMBOL_CHECK: 'no'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
mingw_debian:
|
|
name: ${{ matrix.configuration.job_name }}
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
env:
|
|
WRAPPER_CMD: 'wine'
|
|
WITH_VALGRIND: 'no'
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
CTIMETESTS: 'no'
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- job_name: 'x86_64 (mingw32-w64): Windows (Debian stable, Wine)'
|
|
env_vars:
|
|
HOST: 'x86_64-w64-mingw32'
|
|
- job_name: 'i686 (mingw32-w64): Windows (Debian stable, Wine)'
|
|
env_vars:
|
|
HOST: 'i686-w64-mingw32'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
x86_64-macos-native:
|
|
name: "x86_64: macOS Sequoia, Valgrind"
|
|
runs-on: macos-15-intel
|
|
|
|
env:
|
|
CC: 'clang'
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
SYMBOL_CHECK: 'no'
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
env_vars:
|
|
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes' }
|
|
- { WIDEMUL: 'int128_struct', ECMULTGENKB: 2, ECMULTWINDOW: 4 }
|
|
- { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes', CC: 'gcc' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes', CC: 'gcc', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', FROST: 'yes', CHILLDKG: 'yes', ICEBERG: 'yes', PREFRACTAL: 'yes', FROST_ENROLLMENT: 'yes', CPPFLAGS: '-DVERIFY', CTIMETESTS: 'no' }
|
|
- BUILD: 'distcheck'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
|
|
- name: Install Homebrew packages
|
|
run: |
|
|
brew install --quiet automake libtool gcc
|
|
ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
|
|
|
|
- name: Install and cache Valgrind
|
|
uses: ./.github/actions/install-homebrew-valgrind
|
|
|
|
- &CI_SCRIPT_ON_HOST
|
|
name: CI script
|
|
env: ${{ matrix.env_vars }}
|
|
run: ./ci/ci.sh
|
|
|
|
- &SYMBOL_CHECK_MACOS
|
|
name: Symbol check
|
|
env:
|
|
VIRTUAL_ENV: '${{ github.workspace }}/venv'
|
|
run: |
|
|
python3 --version
|
|
python3 -m venv $VIRTUAL_ENV
|
|
export PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
python3 -m pip install lief
|
|
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
|
|
|
|
- *PRINT_LOGS
|
|
|
|
arm64-macos-native:
|
|
name: "ARM64: macOS Sonoma"
|
|
# See: https://github.com/actions/runner-images#available-images.
|
|
runs-on: macos-14
|
|
|
|
env:
|
|
CC: 'clang'
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
|
WITH_VALGRIND: 'no'
|
|
CTIMETESTS: 'no'
|
|
SYMBOL_CHECK: 'no'
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
env_vars:
|
|
- { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
|
|
- { WIDEMUL: 'int128_struct', ECMULTGENKB: 2, ECMULTWINDOW: 4 }
|
|
- { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', CC: 'gcc' }
|
|
- { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG: 'yes', ELLSWIFT: 'yes', EXPERIMENTAL: 'yes', ECDSA_S2C: 'yes', RANGEPROOF: 'yes', SURJECTIONPROOF: 'yes', WHITELIST: 'yes', GENERATOR: 'yes', ECDSAADAPTOR: 'yes', BPPP: 'yes', SCHNORRSIG_HALFAGG: 'yes', CPPFLAGS: '-DVERIFY' }
|
|
- BUILD: 'distcheck'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
|
|
- name: Install Homebrew packages
|
|
run: |
|
|
brew install --quiet automake libtool gcc
|
|
ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
|
|
|
|
- *CI_SCRIPT_ON_HOST
|
|
- *SYMBOL_CHECK_MACOS
|
|
- *PRINT_LOGS
|
|
|
|
win64-native:
|
|
name: ${{ matrix.configuration.job_name }}
|
|
# See: https://github.com/actions/runner-images#available-images.
|
|
runs-on: windows-2022
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
|
|
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=ON'
|
|
symbol_check: 'true'
|
|
- job_name: 'x64 (MSVC): Windows (VS 2022, static)'
|
|
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=OFF'
|
|
- job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct)'
|
|
cmake_options: '-A x64 -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
|
|
- job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct with __(u)mulh)'
|
|
cmake_options: '-A x64 -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
|
|
cpp_flags: '/DSECP256K1_MSVC_MULH_TEST_OVERRIDE'
|
|
- job_name: 'x86 (MSVC): Windows (VS 2022)'
|
|
cmake_options: '-A Win32'
|
|
- job_name: 'x64 (clang-cl): Windows (VS 2022, shared)'
|
|
cmake_options: '-T ClangCL -DBUILD_SHARED_LIBS=ON'
|
|
symbol_check: 'true'
|
|
- job_name: 'x64 (clang-cl): Windows (VS 2022, static)'
|
|
cmake_options: '-T ClangCL -DBUILD_SHARED_LIBS=OFF'
|
|
- job_name: 'x64 (clang-cl): Windows (VS 2022, int128_struct)'
|
|
cmake_options: '-T ClangCL -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
|
|
- job_name: 'x64 (clang-cl): Windows (VS 2022, int128_struct with __(u)mulh)'
|
|
cmake_options: '-T ClangCL -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
|
|
cpp_flags: '/DSECP256K1_MSVC_MULH_TEST_OVERRIDE'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
|
|
- name: Generate buildsystem
|
|
run: cmake -E env CFLAGS="/WX ${{ matrix.configuration.cpp_flags }}" cmake -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON ${{ matrix.configuration.cmake_options }}
|
|
|
|
- name: Build
|
|
run: cmake --build build --config RelWithDebInfo -- /p:UseMultiToolTask=true /maxCpuCount
|
|
|
|
- name: Binaries info
|
|
# Use the bash shell included with Git for Windows.
|
|
shell: bash
|
|
run: |
|
|
cd build/bin/RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
|
|
|
|
- name: Symbol check
|
|
if: ${{ matrix.configuration.symbol_check }}
|
|
shell: bash
|
|
run: |
|
|
py -3 --version
|
|
py -3 -m pip install lief
|
|
py -3 ./tools/symbol-check.py build/bin/RelWithDebInfo/libsecp256k1-*.dll
|
|
|
|
- name: Check
|
|
run: |
|
|
ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
|
|
build\bin\RelWithDebInfo\bench_ecmult.exe
|
|
build\bin\RelWithDebInfo\bench_internal.exe
|
|
build\bin\RelWithDebInfo\bench.exe
|
|
|
|
win64-native-headers:
|
|
name: "x64 (MSVC): C++ (public headers)"
|
|
# See: https://github.com/actions/runner-images#available-images.
|
|
runs-on: windows-2022
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
|
|
- name: C++ (public headers)
|
|
shell: cmd
|
|
run: |
|
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
|
cl.exe -c -WX -TP include/*.h
|
|
|
|
cxx_fpermissive_debian:
|
|
name: "C++ -fpermissive (entire project)"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
strategy:
|
|
matrix:
|
|
configuration:
|
|
- env_vars: {}
|
|
|
|
env:
|
|
CC: 'g++'
|
|
CFLAGS: '-fpermissive -g'
|
|
CPPFLAGS: '-DSECP256K1_CPLUSPLUS_TEST_OVERRIDE'
|
|
WERROR_CFLAGS:
|
|
ECDH: 'yes'
|
|
RECOVERY: 'yes'
|
|
EXTRAKEYS: 'yes'
|
|
SCHNORRSIG: 'yes'
|
|
MUSIG: 'yes'
|
|
ELLSWIFT: 'yes'
|
|
EXPERIMENTAL: 'yes'
|
|
ECDSA_S2C: 'yes'
|
|
GENERATOR: 'yes'
|
|
RANGEPROOF: 'yes'
|
|
SURJECTIONPROOF: 'yes'
|
|
WHITELIST: 'yes'
|
|
ECDSAADAPTOR: 'yes'
|
|
BPPP: 'yes'
|
|
SCHNORRSIG_HALFAGG: 'yes'
|
|
FROST: 'yes'
|
|
CHILLDKG: 'yes'
|
|
ICEBERG: 'yes'
|
|
PREFRACTAL: 'yes'
|
|
FROST_ENROLLMENT: 'yes'
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
- *CI_SCRIPT_IN_DOCKER
|
|
- *PRINT_LOGS
|
|
|
|
cxx_headers_debian:
|
|
name: "C++ (public headers)"
|
|
runs-on: ubuntu-latest
|
|
needs: docker_cache
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
|
|
- name: CI script
|
|
uses: ./.github/actions/run-in-docker-action
|
|
with:
|
|
dockerfile: ./ci/linux-debian.Dockerfile
|
|
scope: ${{ runner.arch }}-${{ needs.docker_cache.outputs.cache_scope }}
|
|
command: |
|
|
g++ -Werror include/*.h
|
|
clang -Werror -x c++-header include/*.h
|
|
|
|
sage:
|
|
name: "SageMath prover"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: sagemath/sagemath:latest
|
|
options: --user root
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
|
|
- name: CI script
|
|
run: |
|
|
cd sage
|
|
sage prove_group_implementations.sage
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- *CHECKOUT
|
|
|
|
- run: ./autogen.sh && ./configure --enable-dev-mode && make distcheck
|
|
|
|
- name: Check installation with Autotools
|
|
env:
|
|
CI_INSTALL: ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}/install
|
|
run: |
|
|
./autogen.sh && ./configure --prefix=${{ env.CI_INSTALL }} && make clean && make install && ls -RlAh ${{ env.CI_INSTALL }}
|
|
gcc -o ecdsa examples/ecdsa.c $(PKG_CONFIG_PATH=${{ env.CI_INSTALL }}/lib/pkgconfig pkg-config --cflags --libs libsecp256k1) -Wl,-rpath,"${{ env.CI_INSTALL }}/lib" && ./ecdsa
|
|
|
|
- name: Check installation with CMake
|
|
env:
|
|
CI_BUILD: ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}/build
|
|
CI_INSTALL: ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}/install
|
|
run: |
|
|
cmake -B ${{ env.CI_BUILD }} -DCMAKE_INSTALL_PREFIX=${{ env.CI_INSTALL }} && cmake --build ${{ env.CI_BUILD }} && cmake --install ${{ env.CI_BUILD }} && ls -RlAh ${{ env.CI_INSTALL }}
|
|
gcc -o ecdsa examples/ecdsa.c -I ${{ env.CI_INSTALL }}/include -L ${{ env.CI_INSTALL }}/lib*/ -l secp256k1 -Wl,-rpath,"${{ env.CI_INSTALL }}/lib",-rpath,"${{ env.CI_INSTALL }}/lib64" && ./ecdsa
|