2221 Commits

Author SHA1 Message Date
Jonas Nick
0922a047fb
docs: move coverage report instructions to CONTRIBUTING 2023-12-04 20:08:33 +00:00
Jonas Nick
76880e4015
Add CONTRIBUTING.md including scope and guidelines for new code 2023-12-04 20:08:25 +00:00
Jonas Nick
b10ddd2bd2
Merge bitcoin-core/secp256k1#1416: doc: Align documented scripts with CI ones
b0f7bfedc9fcb4f49fe965b16ae49d0e36c1d32b doc: Do not mention soname in CHANGELOG.md "ABI Compatibility" section (Hennadii Stepanov)
bd9d98d353e169eadb9b2fdba074417407442230 doc: Align documented scripts with CI ones (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  sipa:
    ACK b0f7bfedc9fcb4f49fe965b16ae49d0e36c1d32b
  real-or-random:
    ACK b0f7bfedc9fcb4f49fe965b16ae49d0e36c1d32b

Tree-SHA512: 99cbc065cf9610923a863bac34e607ce4f2b1fe71fc32cb96fed33203e42c914ef29924cd9eade89859f63fdd95ffb214c5a2a1066bfca9c202e85aec5f7c16e
2023-09-04 17:27:23 +00:00
Tim Ruffing
49be5be9e8
Merge bitcoin-core/secp256k1#1390: tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID
70303643cf42d18acbf1c020480c6bb23072dbd9 tests: add CHECK_ERROR_VOID and use it in scratch tests (Jonas Nick)
f8d7ea68dfb1a3cad1fbec2242e9affdf803fbbe tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID (Jonas Nick)
a1d52e3e125bb46dac2cf6daa699e9f15167e8d4 tests: remove unnecessary test in run_ec_pubkey_parse_test (Jonas Nick)
875b0ada2526be92100034c4c7de045203de7e3f tests: remove unnecessary set_illegal_callback (Jonas Nick)

Pull request description:

  Fixes #1167

ACKs for top commit:
  siv2r:
    reACK 7030364 (tests pass locally)
  real-or-random:
    reACK 70303643cf42d18acbf1c020480c6bb23072dbd9

Tree-SHA512: 0ca1f1c92a1c3a93b412433e53e882be56f3c7c55d4cbf12683ab7d9b8a916231b6508270099bfed0bfaa9d0af19cb8fdf0fe3274112ab48d33a0bd2356f2fa7
2023-09-04 18:58:57 +02:00
Tim Ruffing
cbf3053ff1
Merge bitcoin-core/secp256k1#1417: release cleanup: bump version after 0.4.0
9b118bc7fb12203e9bf98eb23bfdd5746adde2b3 release cleanup: bump version after 0.4.0 (Jonas Nick)

Pull request description:

  based on #1415

ACKs for top commit:
  sipa:
    ACK 9b118bc7fb12203e9bf98eb23bfdd5746adde2b3
  hebasto:
    ACK 9b118bc7fb12203e9bf98eb23bfdd5746adde2b3
  real-or-random:
    ACK 9b118bc7fb12203e9bf98eb23bfdd5746adde2b3

Tree-SHA512: 76df87c41bdc3379df4e88619645f5110010d7713ebe20bad3e7c99472bd62b90f4bd3c6b558ad5a23119acc4734e39383d96a9800e4a43dfadc086ef66fd0ab
2023-09-04 18:37:41 +02:00
Jonas Nick
9b118bc7fb
release cleanup: bump version after 0.4.0 2023-09-04 16:27:38 +00:00
Jonas Nick
199d27cea3
Merge bitcoin-core/secp256k1#1415: release: Prepare for 0.4.0
16339804c906a99a0b9bbe192d3de9fde021ff19 release: Prepare for 0.4.0 (Tim Ruffing)
d9a85065a91d07660559b4be3388139dccb39e1d changelog: Catch up in preparation of release (Tim Ruffing)

Pull request description:

ACKs for top commit:
  hebasto:
    re-ACK 16339804c906a99a0b9bbe192d3de9fde021ff19.
  sipa:
    ACK 16339804c906a99a0b9bbe192d3de9fde021ff19
  jonasnick:
    ACK 16339804c906a99a0b9bbe192d3de9fde021ff19

Tree-SHA512: 9b29edc8beece44cb8456de9844bf22e13f41b43bb5567b3f37dcbdcb7cd5ca6a976a0f805973ddfa7666509aa452247a4d8297e3cfb362acaf4f0fa942daa21
2023-09-04 16:26:47 +00:00
Jonas Nick
70303643cf
tests: add CHECK_ERROR_VOID and use it in scratch tests 2023-09-04 16:19:49 +00:00
Jonas Nick
f8d7ea68df
tests: Replace counting_illegal_callbacks with CHECK_ILLEGAL_VOID
This commit also explicitly initializes shortpubkey. For some reason, removing
surrounding, unrelated lines results in gcc warnings when configured with
--enable-ctime-tests=no --with-valgrind=no.
2023-09-04 16:19:40 +00:00
Tim Ruffing
16339804c9 release: Prepare for 0.4.0 2023-09-04 18:18:24 +02:00
Tim Ruffing
d9a85065a9 changelog: Catch up in preparation of release 2023-09-04 18:18:19 +02:00
Hennadii Stepanov
b0f7bfedc9
doc: Do not mention soname in CHANGELOG.md "ABI Compatibility" section
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
2023-09-04 17:05:53 +01:00
Hennadii Stepanov
bd9d98d353
doc: Align documented scripts with CI ones 2023-09-04 16:05:29 +01:00
Tim Ruffing
0b4640aedd
Merge bitcoin-core/secp256k1#1413: ci: Add release job
8659a01714c1b4fcd349ee1a7d733f6934c5d184 ci: Add `release` job (Hennadii Stepanov)
f9b38894baee6b726217e28a4d4591ffdf233e47 ci: Update `actions/checkout` version (Hennadii Stepanov)

Pull request description:

  This PR introduces a new "Release" job that conducts sanity checks as defined in [`doc/release-process.md`](https://github.com/bitcoin-core/secp256k1/blob/master/doc/release-process.md#sanity-checks).

ACKs for top commit:
  sipa:
    ACK 8659a01714c1b4fcd349ee1a7d733f6934c5d184
  real-or-random:
    ACK 8659a01714c1b4fcd349ee1a7d733f6934c5d184

Tree-SHA512: 84e03fa07f8c41aec0f6d1ccb4ac3643e85d370ef7e388b335365deadb555f2d9ef7e5d80e1255a18e790a774e04ca66f265b9441402b183d4c535a97688f20f
2023-09-04 16:27:14 +02: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
Jonas Nick
a1d52e3e12
tests: remove unnecessary test in run_ec_pubkey_parse_test
This test tested whether setting the callback works correctly which should be
tested in the context tests.
2023-09-04 12:52:19 +00:00
Jonas Nick
875b0ada25
tests: remove unnecessary set_illegal_callback 2023-09-04 12:50:32 +00:00
Tim Ruffing
727bec5bc2
Merge bitcoin-core/secp256k1#1414: ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot
2635068abf93ebcf7f200eef14acafc3300e32f7 ci/gha: Let MSan continue checking after errors in all jobs (Tim Ruffing)
e78c7b68eb7e91cf9b88408c053867f148d62ffa ci/Dockerfile: Reduce size of Docker image further (Tim Ruffing)
2f0d3bbffb288621f4232c90424f77d44cc69166 ci/Dockerfile: Warn if `ulimit -n` is too high when running Docker (Tim Ruffing)
4b8a647ad3a59c2421d1d4c6e653f21d453e2612 ci/gha: Add ARM64 QEMU jobs for clang and clang-snapshot (Tim Ruffing)
6ebe7d2bb39978e70d85a718919d4af31cc00bc2 ci/Dockerfile: Always use versioned clang packages (Tim Ruffing)

Pull request description:

  Solves one item in https://github.com/bitcoin-core/secp256k1/issues/1392.

  This PR also has a few tweaks to the Dockerfile, see individual commits.

  ---

  I'll follow up soon with a PR for ARM64/gcc. This will rely on Cirrus CI.

ACKs for top commit:
  hebasto:
    ACK 2635068abf93ebcf7f200eef14acafc3300e32f7.

Tree-SHA512: d290bdd8e8e2a2a2b6ccb1b25ecdc9662c51dab745068a98044b9abed75232d13cb9d2ddc2c63c908dcff6a12317f0c7a35db3288c57bc3b814793f7fce059fd
2023-09-04 08:59:14 +02: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
e78c7b68eb ci/Dockerfile: Reduce size of Docker image further
- No need to have wget installed
 - Clean up rm -rf /var/lib/apt/lists/, see
   https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get
2023-09-03 11:31:35 +02:00
Tim Ruffing
2f0d3bbffb ci/Dockerfile: Warn if ulimit -n is too high when running Docker
The underlying issue does not affect our CI hosts, but is an issue on my
development machine (Arch Linux). In particular, this affects the vanilla
configuration of Docker on systemd, which has effectively no limit:
11400a3f5a/pkg/docker-engine/common/systemd/docker.service (L31)

I hope this saves future generations some precious hours of their life.
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
Tim Ruffing
6ebe7d2bb3 ci/Dockerfile: Always use versioned clang packages
This commit switches to a new strategy to make sure we're installing the
most recent LLVM packages. Before this commit, we used the unversioned
LLVM packages (e.g., `clang` instead of `clang-18`), which are supposed
to provide the latest snapshot, but this is broken for arm64 [1],
which we want to add in a later PR.

Anyway, the new approach is cleaner because it does not require us to
fiddle with the installed `clang` package by removing a symlink.

[1] https://github.com/llvm/llvm-project/issues/64790

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2023-09-03 11:29:44 +02:00
Tim Ruffing
65c79fe2d0
Merge bitcoin-core/secp256k1#1412: ci: Switch macOS from Ventura to Monterey and add Valgrind
c223d7e33d50b1da0b3ba617c83534185428b3d5 ci: Switch macOS from Ventura to Monterey and add Valgrind (Hennadii Stepanov)

Pull request description:

  This PR switches the macOS native job from Ventura to Monterey, which allows to support Valgrind.

  Both runners--`macos-12` and `macos-13`--have the same clang compilers installed:
  - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
  - https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md

  But Valgrind works fine on macOS Monterey, but not on Ventura.

  See: https://github.com/bitcoin-core/secp256k1/issues/1392#issuecomment-1693685610.

  The Homebrew's Valgrind package is cached once it has been built (as it was before https://github.com/bitcoin-core/secp256k1/pull/1152). Therefore, the `actions/cache@*` action is needed to be added to the list of the allowed actions.

  https://github.com/bitcoin-core/secp256k1/pull/1412#issuecomment-1695716350:
  > By the way, this solves #1151.

ACKs for top commit:
  real-or-random:
    ACK c223d7e33d50b1da0b3ba617c83534185428b3d5 I tested that a cttest failure makes CI fail: https://github.com/real-or-random/secp256k1/actions/runs/6010365844

Tree-SHA512: 5e72d89fd4d82acbda8adeda7106db0dad85162cca03abe8eae9a40393997ba36a84ad7b12c4b32aec5e9230f275738ef12169994cd530952e2b0b963449b231
2023-08-29 14:59:47 +02:00
Hennadii Stepanov
c223d7e33d
ci: Switch macOS from Ventura to Monterey and add Valgrind 2023-08-28 17:49:45 +01:00
Tim Ruffing
ea26b71c3a
Merge bitcoin-core/secp256k1#1411: ci: Make repetitive command the default one
cce045630407e662c90279abb2b0e71161f24e74 ci: Make repetitive command the default one (Hennadii Stepanov)
317a4c48f058755019475de79896230dadc6474c ci: Move `git config ...` to `run-in-docker-action` (Hennadii Stepanov)

Pull request description:

  This PR addresses the https://github.com/bitcoin-core/secp256k1/pull/1409#discussion_r1301767281:
  > couldn't we add this to `run-in-docker-action` to avoid duplication?

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

Tree-SHA512: 793cec3d99853a23e06680fe35a7cae2dc8771f22e3940c4a4f36357273164f2d92e196768118d146e956ffca9ef59d4e5f86e1cba5576ebfdc59343581c9924
2023-08-24 10:46:07 +02: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
Tim Ruffing
4d7fe60905
Merge bitcoin-core/secp256k1#1409: ci: Move remained task from Cirrus to GitHub Actions
676ed8f9cf001ebaadf53d5c11e32f7a6b1e5649 ci: Move "C++ (public headers)" from Cirrus to GitHub Actions (Hennadii Stepanov)
61fc3a2dc883a5ffda43658337ec94d3306eb77f ci: Move "C++ -fpermissive..." from Cirrus to GitHub Actions (Hennadii Stepanov)
d51fb0a533e5ae34b216527ea32281ff498310dc ci: Move "MSan" from Cirrus to GitHub Actions (Hennadii Stepanov)
c22ac27529003e828d8a873ca6439f6978e2e1be ci: Move sanitizers task from Cirrus to GitHub Actions (Hennadii Stepanov)

Pull request description:

  This PR concludes the migration from Cirrus CI to GitHub Actions.

ACKs for top commit:
  real-or-random:
    ACK 676ed8f9cf001ebaadf53d5c11e32f7a6b1e5649

Tree-SHA512: d8ea91a20297ff4c2c11a02c0a52f19413fde442c71e2e8b660737c09d62e55e4ae3f9bdbdeb0d967f6720a3dffa1566b7f94e0e32bcd490ac052819d5427c84
2023-08-23 14:57:52 +02: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
Hennadii Stepanov
d51fb0a533
ci: Move "MSan" from Cirrus to GitHub Actions 2023-08-23 10:24:15 +01:00
Hennadii Stepanov
c22ac27529
ci: Move sanitizers task from Cirrus to GitHub Actions 2023-08-23 10:24:05 +01:00
Tim Ruffing
26a989924b
Merge bitcoin-core/secp256k1#1410: ci: Use concurrency for pull requests only
ee1be62d84bf6d81e0ed574ef98e980d61a19227 ci: Use concurrency for pull requests only (Hennadii Stepanov)

Pull request description:

  This PR is an amendment for https://github.com/bitcoin-core/secp256k1/pull/1403.

  It avoids skipping builds when some pushes were done consequentially.

  From GitHub Actions [docs](https://docs.github.com/en/actions/using-jobs/using-concurrency):

  > When a concurrent ... workflow is queued, if another ... workflow using the same concurrency group in the repository is in progress, the queued ... workflow will be pending. **Any previously pending ... workflow in the concurrency group will be canceled.**

  No behavior change for pull requests.

  Same as https://github.com/bitcoin/bitcoin/pull/28322.

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

Tree-SHA512: ce26378c3224a7647eb3b351d19e9308650ad49b933a68d37a0eca8516767a63f55580a33b02864caa539392c9aab0b4b54ecbace85bea6082bf533539a37c9c
2023-08-23 11:02:52 +02:00
Hennadii Stepanov
ee1be62d84
ci: Use concurrency for pull requests only
Otherwise, any previously pending workflow will be canceled on the
following push.
2023-08-22 15:02:30 +01:00
Tim Ruffing
6ee14550c8
Merge bitcoin-core/secp256k1#1406: ci, gha: Move more non-x86_64 tasks from Cirrus CI to GitHub Actions
fc3dea29eacc46926fed6428caf8355f732bdf5b ci: Move "ppc64le: Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
7782dc827657288e90fd4fdca5fbf077e50b06c5 ci: Move "ARM64: Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
0a16de671c0cb15cbdd31d56635d21ec95ed788d ci: Move "ARM32: Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
ea33914e00ef1d4117cdb608c96dd3d2d969aa72 ci: Move "s390x (big-endian): Linux..." from Cirrus to GitHub Actions (Hennadii Stepanov)
880be8af99480e36f3af77b1ee1da17465a91df5 ci: Move "i686: Linux (Debian stable)" from Cirrus to GiHub Actions (Hennadii Stepanov)

Pull request description:

  Move more non-x86_64 tasks from Cirrus CI to GitHub Actions.

  Solves one item in https://github.com/bitcoin-core/secp256k1/issues/1392 partially.

ACKs for top commit:
  real-or-random:
    ACK fc3dea29eacc46926fed6428caf8355f732bdf5b but still waiting for Cirrus

Tree-SHA512: 9a910b3ee500aa34fc4db827f8b2a50bcfb637a9e59f4ad32545634772b397ce80b31a18723f4605dc42aa19a5632292943102099f7720f87de1da454da068b0
2023-08-22 11:10:43 +02:00
Hennadii Stepanov
fc3dea29ea
ci: Move "ppc64le: Linux..." from Cirrus to GitHub Actions 2023-08-21 15:33:27 +01:00
Hennadii Stepanov
7782dc8276
ci: Move "ARM64: Linux..." from Cirrus to GitHub Actions 2023-08-21 15:33:19 +01:00
Hennadii Stepanov
0a16de671c
ci: Move "ARM32: Linux..." from Cirrus to GitHub Actions 2023-08-21 15:33:08 +01:00
Hennadii Stepanov
ea33914e00
ci: Move "s390x (big-endian): Linux..." from Cirrus to GitHub Actions 2023-08-21 15:32:56 +01:00
Hennadii Stepanov
880be8af99
ci: Move "i686: Linux (Debian stable)" from Cirrus to GiHub Actions 2023-08-21 15:32:20 +01:00
Tim Ruffing
2e6cf9bae5
Merge bitcoin-core/secp256k1#1396: ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job
e10878f58e4022dbac6e215a89c980a17b95044b ci, gha: Drop `driver-opts.network` input for `setup-buildx-action` (Hennadii Stepanov)
4ad4914bd15bd856eddb306d86588bdacabb1184 ci, gha: Add `retry_builder` Docker image builder (Hennadii Stepanov)
6617a620d95743f51486daf6c33be9cead89a32a ci: Remove "x86_64: Linux (Debian stable)" task from Cirrus CI (Hennadii Stepanov)
03c9e6508ccfaf2ed4150caa5d2d7e92abca5d5d ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job (Hennadii Stepanov)
ad3e65d9fed5ad65391447781c7997f137c8e3a7 ci: Remove GCC build files and sage to reduce size of Docker image (Tim Ruffing)

Pull request description:

  Solves one item in https://github.com/bitcoin-core/secp256k1/issues/1392 partially.

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

Tree-SHA512: 1e685b1a6a41b4be97b9b5bb0fe546c3f1f7daac9374146ca05ab29803d5945a038294ce3ab77489bd971ffce9789ece722e0e0f268b6a7e6483a3aa782d532d
2023-08-21 16:06:50 +02:00
Tim Ruffing
5373693e45
Merge bitcoin-core/secp256k1#1405: ci: Drop no longer needed workaround
ef9fe959deb638228bca8f1068f078e87e271b02 ci: Drop no longer needed workaround (Hennadii Stepanov)

Pull request description:

  The https://sourceware.org/bugzilla/show_bug.cgi?id=27008 bug has been resolved since libc 2.33.

  Debian Bookworm has [libc](https://packages.debian.org/bookworm/libc6) 2.36.

  I've separated this change from moving CI tasks to GitHub Actions intentionally.

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

Tree-SHA512: 4e8ce1232fcb581fa4700da75e5f63ff3da359416e5c5c1966f6aae079219fd697554db03d0b1729ea62cca42aae74bd36621a85d6ec7e4ee18e2c20b879cfa6
2023-08-21 16:06:04 +02:00
Hennadii Stepanov
ef9fe959de
ci: Drop no longer needed workaround
The https://sourceware.org/bugzilla/show_bug.cgi?id=27008 bug has been
resolved since libc 2.33.

Debian Bookworm has libc 2.36.
2023-08-20 11:15:45 +01:00
Hennadii Stepanov
e10878f58e
ci, gha: Drop driver-opts.network input for setup-buildx-action 2023-08-19 18:02:08 +01:00
Hennadii Stepanov
4ad4914bd1
ci, gha: Add retry_builder Docker image builder
This change is aimed at significantly reducing the frequency of failures
caused by intermittent network timeouts.
2023-08-18 17:05:25 +01:00
Hennadii Stepanov
6617a620d9
ci: Remove "x86_64: Linux (Debian stable)" task from Cirrus CI 2023-08-18 13:58:46 +01:00
Hennadii Stepanov
03c9e6508c
ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job 2023-08-18 13:57:50 +01:00
Tim Ruffing
ad3e65d9fe
ci: Remove GCC build files and sage to reduce size of Docker image 2023-08-18 13:52:28 +01:00