From 98aadc121f4e62de8386fd53349d2c15fc336347 Mon Sep 17 00:00:00 2001 From: Kgothatso Ngako Date: Fri, 4 Sep 2026 10:30:21 +0200 Subject: [PATCH] build: give the experimental modules CMake coverage in CI Closes the last gap the review listed, and the one the plan left as optional: no CI job built any experimental module through CMake, so the src/CMakeLists.txt wiring for frost, chilldkg, iceberg, prefractal and frost_enrollment was guarded only by developers running it locally. The plan suggested "adding the experimental modules to one existing CMake job". There are two candidates and they are not equivalent: - win64-native is the only job that RUNS CMake tests, but it builds with MSVC and clang-cl under CFLAGS="/WX". None of the five modules has ever been compiled by MSVC. Turning them on there would be a porting exercise whose first result is a wall of warnings-as-errors from code unrelated to any regression -- and it would land that on four modules this branch does not otherwise touch. - The release job's "Check installation with CMake" step is gcc on Linux, the same compiler and platform where all five are known to build. It configures, builds and installs. The second is where the flags go. It does not run ctest, which is fine: the tests already run under autotools in 45 job contexts. What was unguarded was the WIRING, and this step exercises exactly that -- the SECP256K1_EXPERIMENTAL gate, the dependent-module block ordering, and the PUBLIC_HEADER appends, which the install step then confirms landed by listing the installed tree. Verified that the guard is not decorative. Moving the frost_enrollment block in src/CMakeLists.txt from before the FROST block to after it -- the exact trap the module's commit message describes, where a block that force-enables a dependency runs too late for the block that emits its compile definition -- makes this step fail with undefined references to secp256k1_frost_derive_pubshare_at and friends. Before this change, that mistake reached main with nothing complaining. Also verified the command as written: configure, build and install with all five modules on succeeds on gcc/Linux, the installed include directory carries secp256k1_frost.h, secp256k1_chilldkg.h, secp256k1_iceberg.h, secp256k1_prefractal.h and secp256k1_frost_enrollment.h, and the step's follow-up compile of examples/ecdsa.c against the installed library still links and runs. The workflow parses, and the step really does carry all five module flags plus the experimental gate. This deliberately changes CI coverage for four modules beyond the one this branch adds. It only adds coverage -- no existing job loses anything -- but it is a one-line revert if the wider scope is unwanted. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd1bb555..0fa84ce0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -837,10 +837,20 @@ jobs: ./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 + # The experimental module flags are the only CMake coverage this fork's + # modules get. Every other CMake invocation in this workflow is the + # win64-native job, which builds with MSVC and /WX and has never + # compiled any of them; turning them on there would be a first port, + # not a regression guard. This step is gcc on Linux, so it exercises + # what actually needs guarding: the SECP256K1_EXPERIMENTAL gate, the + # dependent-module block ordering in src/CMakeLists.txt (where a block + # placed after the one it force-enables silently produces a library + # whose secp256k1.c never included the module), and the PUBLIC_HEADER + # appends, which the install step then checks landed. - 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 }} + cmake -B ${{ env.CI_BUILD }} -DCMAKE_INSTALL_PREFIX=${{ env.CI_INSTALL }} -DSECP256K1_EXPERIMENTAL=ON -DSECP256K1_ENABLE_MODULE_FROST=ON -DSECP256K1_ENABLE_MODULE_CHILLDKG=ON -DSECP256K1_ENABLE_MODULE_ICEBERG=ON -DSECP256K1_ENABLE_MODULE_PREFRACTAL=ON -DSECP256K1_ENABLE_MODULE_FROST_ENROLLMENT=ON && 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