Commit Graph

70 Commits

Author SHA1 Message Date
Hennadii Stepanov
1decc49a1f ci: Use YAML anchor and aliases for repeated "CI script" steps 2025-10-14 12:24:25 +01:00
Hennadii Stepanov
dff1bc107d ci, refactor: Generalize use of matrix.configuration.env_vars 2025-10-14 12:23:54 +01:00
Hennadii Stepanov
4b644da199 ci: Use YAML anchor and aliases for repeated "Print logs" steps 2025-10-14 11:51:22 +01:00
Hennadii Stepanov
a889cd93df ci: Bump actions/checkout version
See https://github.com/actions/checkout/releases.
2025-10-14 11:49:05 +01:00
Hennadii Stepanov
574c2f3080 ci: Use YAML anchor and aliases for repeated "Checkout" steps 2025-10-14 11:47:23 +01:00
Hennadii Stepanov
70ae177ca0 ci: Bump docker/build-push-action version
See https://github.com/docker/build-push-action/releases.
2025-10-13 15:54:37 +01:00
Hennadii Stepanov
b2a95a420f ci: Drop tags input for docker/build-push-action
The `tags` input is unused for caching.
2025-10-13 15:54:24 +01:00
Hennadii Stepanov
122014edb3 ci: Add scope parameter to cache-{to,from} options
This change fixes an issue where only the latest image cache was
available.
2025-10-13 15:08:09 +01:00
merge-script
03fb60ad2e Merge bitcoin-core/secp256k1#1681: doc: Recommend clang-cl when building on Windows
737912430d ci: Add more tests for clang-cl (Hennadii Stepanov)
7379a5bed3 doc: Recommend clang-cl when building on Windows (Hennadii Stepanov)

Pull request description:

  There are several reasons to prefer clang-cl over MSVC, such as improved [security](https://github.com/bitcoin-core/secp256k1/issues/1164) and performance.

  Below are the benchmark results for the master branch @ 201b2b8f06:
  - using [MSVC](https://github.com/bitcoin-core/secp256k1/actions/runs/15439981265/job/43455271726):
  ```
  Benchmark                     ,    Min(us)    ,    Avg(us)    ,    Max(us)

  ecdsa_verify                  ,    66.0       ,    71.0       ,   113.0
  ecdsa_sign                    ,    37.0       ,    37.1       ,    37.5
  ec_keygen                     ,    28.5       ,    28.9       ,    29.0
  ecdh                          ,    66.0       ,    66.2       ,    67.0
  ecdsa_recover                 ,    67.0       ,    74.9       ,   123.0
  schnorrsig_sign               ,    30.0       ,    30.3       ,    30.5
  schnorrsig_verify             ,    66.5       ,    70.6       ,   104.0
  ellswift_encode               ,    17.5       ,    17.9       ,    18.0
  ellswift_decode               ,    14.5       ,    15.3       ,    19.0
  ellswift_keygen               ,    55.0       ,    56.4       ,    63.5
  ellswift_ecdh                 ,    72.5       ,    73.5       ,    79.5
  ```

  - using [clang-cl](https://github.com/bitcoin-core/secp256k1/actions/runs/15439981265/job/43455271749):
  ```
  Benchmark                     ,    Min(us)    ,    Avg(us)    ,    Max(us)

  ecdsa_verify                  ,    41.0       ,    47.5       ,   100.0
  ecdsa_sign                    ,    27.0       ,    27.2       ,    27.5
  ec_keygen                     ,    19.0       ,    19.3       ,    19.5
  ecdh                          ,    42.0       ,    42.4       ,    43.0
  ecdsa_recover                 ,    41.5       ,    45.7       ,    80.0
  schnorrsig_sign               ,    20.0       ,    20.5       ,    20.5
  schnorrsig_verify             ,    41.5       ,    45.5       ,    77.5
  ellswift_encode               ,    13.0       ,    13.0       ,    13.0
  ellswift_decode               ,    10.0       ,    10.4       ,    10.5
  ellswift_keygen               ,    38.5       ,    39.1       ,    41.5
  ellswift_ecdh                 ,    47.0       ,    48.5       ,    59.0
  ```

  On my local machine, the "Release" build configuration:
  - using MSVC:
  ```
  > .\build-msvc\bin\Release\bench.exe
  Benchmark                     ,    Min(us)    ,    Avg(us)    ,    Max(us)

  ecdsa_verify                  ,    81.2       ,    90.6       ,   102.0
  ecdsa_sign                    ,    46.5       ,    48.6       ,    52.9
  ec_keygen                     ,    31.6       ,    34.8       ,    36.2
  ecdh                          ,    73.0       ,    76.4       ,    79.5
  schnorrsig_sign               ,    32.1       ,    34.4       ,    35.8
  schnorrsig_verify             ,    74.6       ,    76.2       ,    79.8
  ellswift_encode               ,    33.4       ,    34.0       ,    34.8
  ellswift_decode               ,    14.9       ,    15.5       ,    17.1
  ellswift_keygen               ,    64.5       ,    65.6       ,    67.1
  ellswift_ecdh                 ,    78.3       ,    80.7       ,    90.1
  ```

  - using clang-cl:
  ```
  > .\build-clangcl\bin\Release\bench.exe
  Benchmark                     ,    Min(us)    ,    Avg(us)    ,    Max(us)

  ecdsa_verify                  ,    40.3       ,    40.6       ,    40.9
  ecdsa_sign                    ,    30.6       ,    30.9       ,    31.3
  ec_keygen                     ,    21.2       ,    21.3       ,    21.5
  ecdh                          ,    41.5       ,    42.4       ,    44.8
  schnorrsig_sign               ,    22.5       ,    22.7       ,    22.8
  schnorrsig_verify             ,    41.2       ,    41.4       ,    41.7
  ellswift_encode               ,    20.3       ,    20.6       ,    20.8
  ellswift_decode               ,     8.50      ,     8.64      ,     8.76
  ellswift_keygen               ,    41.7       ,    42.0       ,    42.4
  ellswift_ecdh                 ,    45.1       ,    45.5       ,    46.3
  ```

ACKs for top commit:
  real-or-random:
    utACK 737912430d

Tree-SHA512: b0a4219cf24208e875a9757a490376af021dd3771911a670d80bb4979713bf1bbdbe206b8e121a3c4d1913c58f4b4593047410aa8104eff19aa3d3f359fd94af
2025-09-02 22:55:03 +02:00
Hennadii Stepanov
737912430d ci: Add more tests for clang-cl 2025-08-24 11:11:55 +01:00
Tim Ruffing
f67b0ac1a0 ci: Don't hardcode ABI version 2025-07-21 17:22:05 +02:00
Sebastian Falbesoner
3352f9d667 ci: enable musig module for native macOS arm64 job 2025-07-10 17:46:51 +02:00
Hennadii Stepanov
004f57fcd8 ci: Move Valgrind build for arm64 from Cirrus to GHA 2025-06-19 20:09:36 +01:00
Hennadii Stepanov
5fafdfc30f ci: Move gcc-snapshot build for arm64 from Cirrus to GHA 2025-06-19 20:09:01 +01:00
Hennadii Stepanov
e814b79a8b ci: Switch arm64_debian from QEMU to native arm64 Docker image 2025-06-19 20:08:32 +01:00
Hennadii Stepanov
bcf77346b9 ci: Add arm64 architecture to docker_cache job 2025-06-19 19:09:18 +01:00
Hennadii Stepanov
b77aae9226 ci: Rename Docker image tag to reflect architecture 2025-06-19 18:57:48 +01:00
Hennadii Stepanov
8ed1d83d92 ci: Run tools/symbol-check.py 2025-03-11 21:59:35 +00:00
merge-script
03bbe8c615 Merge bitcoin-core/secp256k1#1655: gha: Print all *.log files, in a separate action
59860bcc24 gha: Print all *.log files, in a separate action (Tim Ruffing)

Pull request description:

  Before this commit, we didn't print *_example.log files and
  test_suite.log.

  Printing is now handled in a separate action, which avoids code
  duplication and makes the ci.yml file more readable. This changes the
  folding/grouping of the log output in the GitHub Actions CI, but I
  think the new variant is as good as the old one.

  Furthermore, the condition for printing the logs is changed from
  "always()" to "!cancelled()". This ensures that logs will still be
  printed if previous steps such as the CI script failed, but that they
  won't be printed if the entire run is cancelled (e.g., by clicking a
  button in the UI or through a force-push to the PR). This is in line
  with a recommendation in the GHA docs:
  https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#always

ACKs for top commit:
  hebasto:
    ACK 59860bcc24.
  sipa:
    ACK 59860bcc24

Tree-SHA512: ca11f5e5f01660964276b9c2e11c22caeed8492e9c7ffaa2078aaaa733005c63242fc93a1056124fb8f1f83019d46818c12b10142fb10f43270a8562fd10885a
2025-03-11 22:08:45 +01:00
Tim Ruffing
59860bcc24 gha: Print all *.log files, in a separate action
Before this commit, we didn't print *_example.log files and
test_suite.log.

Printing is now handled in a separate action, which avoids code
duplication and makes the ci.yml file more readable. This changes the
folding/grouping of the log output in the GitHub Actions CI, but I
think the new variant is as good as the old one.

Furthermore, the condition for printing the logs is changed from
"always()" to "!cancelled()". This ensures that logs will still be
printed if previous steps such as the CI script failed, but that they
won't be printed if the entire run is cancelled (e.g., by clicking a
button in the UI or through a force-push to the PR). This is in line
with a recommendation in the GHA docs:
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#always
2025-03-10 21:09:07 +01:00
Hennadii Stepanov
4c50d73dd9 ci: Add new "Windows (clang-cl)" job 2024-12-13 09:35:55 +00:00
merge-script
7d48f5ed02 Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16
0f73caf7c6 test, ci: Lower default iteration count to 16 (Hennadii Stepanov)

Pull request description:

  The number of test iterations in the CI remains the same.

  Resolves https://github.com/bitcoin-core/secp256k1/issues/1561.

  ```
  $ ./build/src/tests
  test count = 16
  random seed = 59ea2b21267ec0ef0b4d13821292489f
  random run = 2936c044f82c7598a866869b9d954d42
  no problems found
  ```

ACKs for top commit:
  sipa:
    utACK 0f73caf7c6
  jonasnick:
    ACK 0f73caf7c6

Tree-SHA512: 84b265dc5d2780b3ea0a38f50ac8871d850ef2c97f33a0a5816baf20ac71c01db8b85696b343b089d7116d9cdb9450a6ca668229d95e54a39920d0e91a3127b3
2024-11-01 16:44:40 +01:00
Hennadii Stepanov
0f73caf7c6 test, ci: Lower default iteration count to 16
The number of test iterations in the CI remains unchanged.

Additionally, the minimum iteration counts to enable the
`test_ecmult_constants_2bit` test is adjusted from 35 to 16, so it is
run by default.
2024-10-30 14:30:55 +00:00
Hennadii Stepanov
096e3e23f6 ci: Update macOS image
The macOS 12 GHA image has been deprecated since 2024-10-07.
See: https://github.com/actions/runner-images/issues/10721
2024-10-25 08:18:02 +01:00
merge-script
e59158b6eb Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
c232486d84 Revert "cmake: Set `ENVIRONMENT` property for examples on Windows" (Hennadii Stepanov)
26e4a7c214 cmake: Set top-level target output locations (Hennadii Stepanov)

Pull request description:

  While testing https://github.com/bitcoin-core/secp256k1/pull/1551, I noticed that when cross-compiling a shared library with examples for Windows, the `ctest` fails to run examples with Wine. Adjusting the `PATH` variable in 4af241b320/examples/CMakeLists.txt (L16-L18) does not help because `WINEPATH` is expected.

  Another issue with the current implementation is that the examples cannot run individually on Windows.

  This PR resolves both issues by reverting the implementation from https://github.com/bitcoin-core/secp256k1/pull/1290 in favour of the reworked and improved implementation from https://github.com/bitcoin-core/secp256k1/pull/1233.

ACKs for top commit:
  theuni:
    Concept ACK and utACK c232486d84.
  real-or-random:
    utACK c232486d84

Tree-SHA512: 479b71d15d5d5670f6f69da3da599240c345711003383ca805c821b67065c9baaf269f987792cf1029211cdbfe799aecd401e6940a471539e3929b4a90e0781d
2024-10-15 13:37:21 +02:00
Jonas Nick
f411841a46 Add module "musig" that implements MuSig2 multi-signatures (BIP 327) 2024-10-07 14:03:42 +00:00
Hennadii Stepanov
26e4a7c214 cmake: Set top-level target output locations
This change:
1. Collects build artifacts in dedicated locations.
2. Allows to run individual examples with a shared library on Windows.
3. Is compatible with Wine when testing cross-compiled Windows binaries
   on Linux.
4. Is compatible with integration the project into a larger project
   hierarchy.
2024-09-18 18:13:37 +01:00
Hennadii Stepanov
7057d3c9af ci: Silent Homebrew's noisy reinstall warnings 2024-08-02 14:03:44 +01:00
Jonas Nick
763d938cf0 ci: only enable extrakeys module when schnorrsig is enabled 2024-07-24 06:57:42 +00:00
Hennadii Stepanov
e2af491263 ci: Switch to the new default value of the precomputed table for signing 2024-07-03 14:04:18 +01:00
Hennadii Stepanov
9420eece24 cmake: Bump CMake minimum required version up to 3.16 2024-07-03 08:23:20 +01:00
merge-script
4af241b320 Merge bitcoin-core/secp256k1#1535: build: Replace hardcoded "auto" value with default one
4d9645bee0 cmake: Remove "AUTO" value of `SECP256K1_ECMULT_GEN_KB` option (Hennadii Stepanov)
a06805ee74 cmake: Remove "AUTO" value of `SECP256K1_ECMULT_WINDOW_SIZE` option (Hennadii Stepanov)
26b94ee92a autotools: Remove "auto" value of `--with-ecmult-gen-kb` option (Hennadii Stepanov)
122dbaeb37 autotools: Remove "auto" value of `--with-ecmult-window` option (Hennadii Stepanov)

Pull request description:

  "auto" implies that a value is being chosen based on build system introspection or host system capabilities. However, for the `--with-ecmult-window` and `--with-ecmult-gen-kb` options, the values "auto" are hardcoded, which might lead to confusion.

  This PR replaces "auto" with more appropriate default values.

  If Concept ACKed, I'll add equivalent commits for CMake.

ACKs for top commit:
  sipa:
    utACK 4d9645bee0
  real-or-random:
    utACK 4d9645bee0 good from my side, but let's see if we can get more (Concept) ACKs

Tree-SHA512: 9e68f73682c5310c68d2337594f13b99a52bfc365564e39df2e412b576635c90cccd2298406a4281f014916c4a1710e19c7390f05a4b0acbd09869bfb56f36ac
2024-06-25 15:59:41 +02:00
merge-script
bedffd53d8 Merge bitcoin-core/secp256k1#1488: ci: Add native macOS arm64 job
218f0cc93b ci: Add native macOS arm64 job (Hennadii Stepanov)

Pull request description:

  This PR starts using the [new](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/) M1 macOS runner.

  The alternative approach might be using a matrix, but it is not trivial to implement.

ACKs for top commit:
  real-or-random:
    ACK 218f0cc93b

Tree-SHA512: 709e836909fa2a90248f689f4c57192d1daecc53abd3d2d1b8b892a7deb6fdd008bf8f7270ab39da5b0f994d0ea4cf0767dab3a07c6dfc2109a9735af1072f3f
2024-06-10 18:11:12 +02:00
Hennadii Stepanov
26b94ee92a autotools: Remove "auto" value of --with-ecmult-gen-kb option
"auto" implies that a value is being chosen based on build system
introspection or host system capabilities. However, for the
`--with-ecmult-gen-kb` option, the value "auto" is hardcoded, which
might lead to confusion.

This change replaces "auto" with a more appropriate default value.
2024-05-27 10:57:30 +01:00
Hennadii Stepanov
122dbaeb37 autotools: Remove "auto" value of --with-ecmult-window option
"auto" implies that a value is being chosen based on build system
introspection or host system capabilities. However, for the
`--with-ecmult-window` option, the value "auto" is hardcoded, which
might lead to confusion.

This change replaces "auto" with a more appropriate default value.
2024-05-27 10:56:37 +01:00
Tim Ruffing
ebfb82ee2f ci: Add job with -fsanitize-memory-param-retval 2024-05-26 14:01:14 +02:00
Pieter Wuille
ed2a056f3d Provide 3 configurations accessible through ./configure 2024-04-19 11:43:26 -04:00
Hennadii Stepanov
218f0cc93b ci: Add native macOS arm64 job 2024-01-31 20:51:50 +00:00
Tim Ruffing
ba9cb6f378 Merge bitcoin-core/secp256k1#1424: ci: Bump major versions for docker actions
d9d80fd155 ci: Bump major versions for docker actions (Hennadii Stepanov)

Pull request description:

  See:
  - https://github.com/docker/build-push-action/releases/tag/v5.0.0
  - https://github.com/docker/setup-buildx-action/releases/tag/v3.0.0

ACKs for top commit:
  real-or-random:
    ACK d9d80fd155

Tree-SHA512: b1266e46cd02f8e893b4ce3b4bf51f7fb2ea7c6ae54a5c24a4bc5df4f6e97e99afaf90cf598d4321e8b83a250ba5fd7d43c34d53a8cc71f70f6c6e05cc973d6f
2023-09-13 14:49:13 +02:00
Hennadii Stepanov
d9d80fd155 ci: Bump major versions for docker actions
https://github.com/docker/build-push-action/releases/tag/v5.0.0
https://github.com/docker/setup-buildx-action/releases/tag/v3.0.0
2023-09-12 10:18:39 +01:00
Hennadii Stepanov
421d84855a ci: Align Autotools/CMake CI_INSTALL directory names 2023-09-07 20:58:28 +01:00
Hennadii Stepanov
8659a01714 ci: Add release job
The new job runs checks outlined in the `doc/release-process.md`.
2023-09-04 15:04:37 +01:00
Hennadii Stepanov
f9b38894ba ci: Update actions/checkout version 2023-09-04 14:58:01 +01:00
Tim Ruffing
2635068abf ci/gha: Let MSan continue checking after errors in all jobs 2023-09-03 11:31:35 +02:00
Tim Ruffing
4b8a647ad3 ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot 2023-09-03 11:31:35 +02:00
Hennadii Stepanov
c223d7e33d ci: Switch macOS from Ventura to Monterey and add Valgrind 2023-08-28 17:49:45 +01:00
Hennadii Stepanov
cce0456304 ci: Make repetitive command the default one 2023-08-23 21:31:57 +01:00
Hennadii Stepanov
317a4c48f0 ci: Move git config ... to run-in-docker-action 2023-08-23 21:18:53 +01:00
Hennadii Stepanov
676ed8f9cf ci: Move "C++ (public headers)" from Cirrus to GitHub Actions 2023-08-23 10:59:26 +01:00
Hennadii Stepanov
61fc3a2dc8 ci: Move "C++ -fpermissive..." from Cirrus to GitHub Actions 2023-08-23 10:24:24 +01:00