2121 MAKEFLAGS : ' -j4'
2222 BUILD : ' check'
2323 # ## secp256k1 config
24- ECMULTWINDOW : ' auto '
25- ECMULTGENPRECISION : ' auto '
24+ ECMULTWINDOW : 15
25+ ECMULTGENKB : 86
2626 ASM : ' no'
2727 WIDEMUL : ' auto'
2828 WITH_VALGRIND : ' yes'
3131 EXPERIMENTAL : ' no'
3232 ECDH : ' no'
3333 RECOVERY : ' no'
34+ EXTRAKEYS : ' no'
3435 SCHNORRSIG : ' no'
36+ MUSIG : ' no'
3537 ELLSWIFT : ' no'
3638 # ## test options
37- SECP256K1_TEST_ITERS :
39+ SECP256K1_TEST_ITERS : 64
3840 BENCH : ' yes'
3941 SECP256K1_BENCH_ITERS : 2
4042 CTIMETESTS : ' yes'
@@ -71,20 +73,20 @@ jobs:
7173 matrix :
7274 configuration :
7375 - env_vars : { WIDEMUL: 'int64', RECOVERY: 'yes' }
74- - env_vars : { WIDEMUL: 'int64', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
76+ - env_vars : { WIDEMUL: 'int64', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes' }
7577 - env_vars : { WIDEMUL: 'int128' }
76- - env_vars : { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
77- - env_vars : { WIDEMUL: 'int128', RECOVERY: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
78- - env_vars : { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes' }
79- - env_vars : { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
80- - env_vars : { RECOVERY: 'yes', SCHNORRSIG: 'yes' }
81- - env_vars : { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', CPPFLAGS: '-DVERIFY' }
78+ - env_vars : { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
79+ - env_vars : { WIDEMUL: 'int128', RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes' }
80+ - env_vars : { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes' }
81+ - env_vars : { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
82+ - env_vars : { RECOVERY: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes' }
83+ - env_vars : { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', CPPFLAGS: '-DVERIFY' }
8284 - env_vars : { BUILD: 'distcheck', WITH_VALGRIND: 'no', CTIMETESTS: 'no', BENCH: 'no' }
8385 - env_vars : { CPPFLAGS: '-DDETERMINISTIC' }
8486 - env_vars : { CFLAGS: '-O0', CTIMETESTS: 'no' }
85- - env_vars : { CFLAGS: '-O1', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
86- - env_vars : { ECMULTGENPRECISION : 2, ECMULTWINDOW: 2 }
87- - env_vars : { ECMULTGENPRECISION: 8 , ECMULTWINDOW: 4 }
87+ - env_vars : { CFLAGS: '-O1', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes' }
88+ - env_vars : { ECMULTGENKB : 2, ECMULTWINDOW: 2 }
89+ - env_vars : { ECMULTGENKB: 86 , ECMULTWINDOW: 4 }
8890 cc :
8991 - ' gcc'
9092 - ' clang'
@@ -139,7 +141,9 @@ jobs:
139141 HOST : ' i686-linux-gnu'
140142 ECDH : ' yes'
141143 RECOVERY : ' yes'
144+ EXTRAKEYS : ' yes'
142145 SCHNORRSIG : ' yes'
146+ MUSIG : ' yes'
143147 ELLSWIFT : ' yes'
144148 CC : ${{ matrix.cc }}
145149
@@ -183,7 +187,9 @@ jobs:
183187 WITH_VALGRIND : ' no'
184188 ECDH : ' yes'
185189 RECOVERY : ' yes'
190+ EXTRAKEYS : ' yes'
186191 SCHNORRSIG : ' yes'
192+ MUSIG : ' yes'
187193 ELLSWIFT : ' yes'
188194 CTIMETESTS : ' no'
189195
@@ -234,7 +240,9 @@ jobs:
234240 WITH_VALGRIND : ' no'
235241 ECDH : ' yes'
236242 RECOVERY : ' yes'
243+ EXTRAKEYS : ' yes'
237244 SCHNORRSIG : ' yes'
245+ MUSIG : ' yes'
238246 ELLSWIFT : ' yes'
239247 CTIMETESTS : ' no'
240248
@@ -279,7 +287,9 @@ jobs:
279287 WITH_VALGRIND : ' no'
280288 ECDH : ' yes'
281289 RECOVERY : ' yes'
290+ EXTRAKEYS : ' yes'
282291 SCHNORRSIG : ' yes'
292+ MUSIG : ' yes'
283293 ELLSWIFT : ' yes'
284294 CTIMETESTS : ' no'
285295
@@ -334,7 +344,9 @@ jobs:
334344 WITH_VALGRIND : ' no'
335345 ECDH : ' yes'
336346 RECOVERY : ' yes'
347+ EXTRAKEYS : ' yes'
337348 SCHNORRSIG : ' yes'
349+ MUSIG : ' yes'
338350 ELLSWIFT : ' yes'
339351 CTIMETESTS : ' no'
340352
@@ -377,16 +389,18 @@ jobs:
377389 configuration :
378390 - env_vars : { CC: 'clang', ASM: 'auto' }
379391 - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
380- - env_vars : { CC: 'clang', ASM: 'no', ECMULTGENPRECISION : 2, ECMULTWINDOW: 2 }
381- - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENPRECISION : 2, ECMULTWINDOW: 2 }
392+ - env_vars : { CC: 'clang', ASM: 'no', ECMULTGENKB : 2, ECMULTWINDOW: 2 }
393+ - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB : 2, ECMULTWINDOW: 2 }
382394
383395 env :
384396 # The `--error-exitcode` is required to make the test fail if valgrind found errors,
385397 # otherwise it will return 0 (https://www.valgrind.org/docs/manual/manual-core.html).
386398 WRAPPER_CMD : ' valgrind --error-exitcode=42'
387399 ECDH : ' yes'
388400 RECOVERY : ' yes'
401+ EXTRAKEYS : ' yes'
389402 SCHNORRSIG : ' yes'
403+ MUSIG : ' yes'
390404 ELLSWIFT : ' yes'
391405 CTIMETESTS : ' no'
392406 SECP256K1_TEST_ITERS : 2
@@ -431,13 +445,15 @@ jobs:
431445 configuration :
432446 - env_vars : { CC: 'clang', ASM: 'auto' }
433447 - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
434- - env_vars : { CC: 'clang', ASM: 'no', ECMULTGENPRECISION : 2, ECMULTWINDOW: 2 }
435- - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENPRECISION : 2, ECMULTWINDOW: 2 }
448+ - env_vars : { CC: 'clang', ASM: 'no', ECMULTGENKB : 2, ECMULTWINDOW: 2 }
449+ - env_vars : { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB : 2, ECMULTWINDOW: 2 }
436450
437451 env :
438452 ECDH : ' yes'
439453 RECOVERY : ' yes'
454+ EXTRAKEYS : ' yes'
440455 SCHNORRSIG : ' yes'
456+ MUSIG : ' yes'
441457 ELLSWIFT : ' yes'
442458 CTIMETESTS : ' no'
443459 CFLAGS : ' -fsanitize=undefined,address -g'
@@ -485,18 +501,26 @@ jobs:
485501 matrix :
486502 configuration :
487503 - env_vars :
504+ CTIMETESTS : ' yes'
488505 CFLAGS : ' -fsanitize=memory -fsanitize-recover=memory -g'
489506 - env_vars :
490- ECMULTGENPRECISION : 2
507+ ECMULTGENKB : 2
491508 ECMULTWINDOW : 2
509+ CTIMETESTS : ' yes'
492510 CFLAGS : ' -fsanitize=memory -fsanitize-recover=memory -g -O3'
511+ - env_vars :
512+ # -fsanitize-memory-param-retval is clang's default, but our build system disables it
513+ # when ctime_tests when enabled.
514+ CFLAGS : ' -fsanitize=memory -fsanitize-recover=memory -fsanitize-memory-param-retval -g'
515+ CTIMETESTS : ' no'
493516
494517 env :
495518 ECDH : ' yes'
496519 RECOVERY : ' yes'
520+ EXTRAKEYS : ' yes'
497521 SCHNORRSIG : ' yes'
522+ MUSIG : ' yes'
498523 ELLSWIFT : ' yes'
499- CTIMETESTS : ' yes'
500524 CC : ' clang'
501525 SECP256K1_TEST_ITERS : 32
502526 ASM : ' no'
@@ -541,7 +565,9 @@ jobs:
541565 WITH_VALGRIND : ' no'
542566 ECDH : ' yes'
543567 RECOVERY : ' yes'
568+ EXTRAKEYS : ' yes'
544569 SCHNORRSIG : ' yes'
570+ MUSIG : ' yes'
545571 ELLSWIFT : ' yes'
546572 CTIMETESTS : ' no'
547573
@@ -585,10 +611,10 @@ jobs:
585611 run : env
586612 if : ${{ always() }}
587613
588- macos-native :
589- name : " x86_64: macOS Monterey "
614+ x86_64- macos-native :
615+ name : " x86_64: macOS Ventura, Valgrind "
590616 # See: https://github.com/actions/runner-images#available-images.
591- runs-on : macos-12 # Use M1 once available https://github.com/github/roadmap/issues/528
617+ runs-on : macos-13
592618
593619 env :
594620 CC : ' clang'
@@ -599,15 +625,15 @@ jobs:
599625 fail-fast : false
600626 matrix :
601627 env_vars :
602- - { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
603- - { WIDEMUL: 'int128_struct', ECMULTGENPRECISION : 2, ECMULTWINDOW: 4 }
604- - { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
628+ - { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes' }
629+ - { WIDEMUL: 'int128_struct', ECMULTGENKB : 2, ECMULTWINDOW: 4 }
630+ - { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes' }
605631 - { WIDEMUL: 'int128', RECOVERY: 'yes' }
606- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
607- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
608- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
609- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
610- - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY', CTIMETESTS: 'no' }
632+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes' }
633+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
634+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
635+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes', CC: 'gcc', WRAPPER_CMD: 'valgrind --error-exitcode=42', SECP256K1_TEST_ITERS: 2 }
636+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', MUSIG : 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY', CTIMETESTS: 'no' }
611637 - BUILD : ' distcheck'
612638
613639 steps :
@@ -616,7 +642,7 @@ jobs:
616642
617643 - name : Install Homebrew packages
618644 run : |
619- brew install automake libtool gcc
645+ brew install --quiet automake libtool gcc
620646 ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
621647
622648 - name : Install and cache Valgrind
@@ -644,6 +670,62 @@ jobs:
644670 run : env
645671 if : ${{ always() }}
646672
673+ arm64-macos-native :
674+ name : " ARM64: macOS Sonoma"
675+ # See: https://github.com/actions/runner-images#available-images.
676+ runs-on : macos-14
677+
678+ env :
679+ CC : ' clang'
680+ HOMEBREW_NO_AUTO_UPDATE : 1
681+ HOMEBREW_NO_INSTALL_CLEANUP : 1
682+ WITH_VALGRIND : ' no'
683+ CTIMETESTS : ' no'
684+
685+ strategy :
686+ fail-fast : false
687+ matrix :
688+ env_vars :
689+ - { WIDEMUL: 'int64', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
690+ - { WIDEMUL: 'int128_struct', ECMULTGENPRECISION: 2, ECMULTWINDOW: 4 }
691+ - { WIDEMUL: 'int128', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
692+ - { WIDEMUL: 'int128', RECOVERY: 'yes' }
693+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
694+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CC: 'gcc' }
695+ - { WIDEMUL: 'int128', RECOVERY: 'yes', ECDH: 'yes', EXTRAKEYS: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes', CPPFLAGS: '-DVERIFY' }
696+ - BUILD : ' distcheck'
697+
698+ steps :
699+ - name : Checkout
700+ uses : actions/checkout@v4
701+
702+ - name : Install Homebrew packages
703+ run : |
704+ brew install --quiet automake libtool gcc
705+ ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
706+
707+ - name : CI script
708+ env : ${{ matrix.env_vars }}
709+ run : ./ci/ci.sh
710+
711+ - run : cat tests.log || true
712+ if : ${{ always() }}
713+ - run : cat noverify_tests.log || true
714+ if : ${{ always() }}
715+ - run : cat exhaustive_tests.log || true
716+ if : ${{ always() }}
717+ - run : cat ctime_tests.log || true
718+ if : ${{ always() }}
719+ - run : cat bench.log || true
720+ if : ${{ always() }}
721+ - run : cat config.log || true
722+ if : ${{ always() }}
723+ - run : cat test_env.log || true
724+ if : ${{ always() }}
725+ - name : CI env
726+ run : env
727+ if : ${{ always() }}
728+
647729 win64-native :
648730 name : ${{ matrix.configuration.job_name }}
649731 # See: https://github.com/actions/runner-images#available-images.
@@ -679,14 +761,14 @@ jobs:
679761 # Use the bash shell included with Git for Windows.
680762 shell : bash
681763 run : |
682- cd build/src /RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
764+ cd build/bin /RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
683765
684766 - name : Check
685767 run : |
686768 ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
687- build\src \RelWithDebInfo\bench_ecmult.exe
688- build\src \RelWithDebInfo\bench_internal.exe
689- build\src \RelWithDebInfo\bench.exe
769+ build\bin \RelWithDebInfo\bench_ecmult.exe
770+ build\bin \RelWithDebInfo\bench_internal.exe
771+ build\bin \RelWithDebInfo\bench.exe
690772
691773 win64-native-headers :
692774 name : " x64 (MSVC): C++ (public headers)"
@@ -716,7 +798,9 @@ jobs:
716798 WERROR_CFLAGS :
717799 ECDH : ' yes'
718800 RECOVERY : ' yes'
801+ EXTRAKEYS : ' yes'
719802 SCHNORRSIG : ' yes'
803+ MUSIG : ' yes'
720804 ELLSWIFT : ' yes'
721805
722806 steps :
@@ -802,5 +886,5 @@ jobs:
802886 CI_BUILD : ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}/build
803887 CI_INSTALL : ${{ runner.temp }}/${{ github.run_id }}${{ github.action }}/install
804888 run : |
805- cmake -B ${{ env.CI_BUILD }} -DCMAKE_INSTALL_PREFIX=${{ env.CI_INSTALL }} && cmake --build ${{ env.CI_BUILD }} --target install && ls -RlAh ${{ env.CI_INSTALL }}
889+ 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 }}
806890 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
0 commit comments