Recently we tried to make the rustfmt bot remove trailing whitespace but
wrote the `sed` command incorrectly - it only removes a single
character.
Tested by running the new command on #4600.
e3f409e3c4 ci: update Kani GitHub Actions runners to ubuntu-24.04 (Erick Cestari)
Pull request description:
GitHub is deprecating the ubuntu-20.04 runner, with removal scheduled for 2025-04-01 (see [GitHub Issue #11101](https://github.com/actions/runner-images/issues/11101)).
This PR updates the CI/CD workflows to use ubuntu-24.04 instead of ubuntu-20.04 for the following workflows:
- cron-daily-kani.yml
- rust.yml (Kani codegen job)
This change should resolve the CI/CD error in the Kani codegen - stable toolchain job triggered by pull requests.
ACKs for top commit:
Kixunil:
ACK e3f409e3c4
apoelstra:
ACK e3f409e3c4327c647b64416caa401c883b459c86; successfully ran local tests
Tree-SHA512: 7e235b68226042937e7269cccae4850cd33cc09c1546a068542903bf9756aaf77155fce3991f899b8470bc97a7115c7ed22e4f09a4c4f4061897a0b18a993487
It has been argued that the API files provide value for verifying that
code changes produce API changes in the expected way. This helps devs
and reviewers.
It has also been argued that the CI job adds friction and forces devs
to configure their environment unnecessarily.
Both viewpoints have some merit.
Lets remove the API files for now, and when we start doing 1.0-alpha
releases and can start to expect minimal API breaking changes (and
therefore minimal need to use the tooling).
78f61f55de Automated update to Github CI to cargo-semver-checks version-0.37.0 (Update cargo-semver-checks Bot)
Pull request description:
Automated update to Github CI workflow `semver-checks.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
ACKs for top commit:
tcharding:
ACK 78f61f55de
Tree-SHA512: 1765aa338b5e86320702f0c27430853e072152358a179db106354c71c371c91499e712b0595407fff47cbb4ca1d8ccfc8e28b050ac1b3bcd9875037a95ad6a7c
Add a script to generate API files using `cargo public-api` for the
crates that we are trying to stabalise (the so called 'leaf crates').
- hashes
- io
- primitives
- units
We already ran the script and committed the files last patch. The fact
that this patch does not include any changes to the `api/` directory and
that CI passes is enough to convince us that last patch was valid.
Add a CI job that runs the script and checks there are no changes to
the committed text files thereby proving no API changes are made in a
PR without explicitly modifying the API text files.
Add documentation to `CONTRIBUTING.md` on what is expected of devs.
Merging the nightly update PRs is boring and annoying. We can just do it
once a week without too much risk of falling behind.
This does mean that I (Tobin) can't be lazy and skip merging the bot's
PRs (which I find myself doing when its twice a week).
The only reason we need `hex-conservative` is to parse strings and
format them as hex. For users that do not require this functionality we
can make the `hex-conservative` crate an optional dependency.
The `serde` feature requires `Display` so we enable `hex` from the
`serde` feature.
If `hex` feature is not enabled we still need to be able to debug so
provide `fmt::Debug` functionality by way of macros.
Close: #2654
Recently we discovered a bug in the `run_task` script where we forgot to
use `--no-default-features` in a subset of test runs (the feature matrix
stuff).
Upgrade to use the latest version of `run_task.sh`.
Currently we run the job at midnight here and in `sepc256k1`, this led
recently to one using the nightly toolchain from the 10th of Sep and the
other using the toolchain from 11th of Sep.
Update to run at 5 past so this doesn't happen again.
bd8ad1f5e2 Add basic `miri` checks (Martin Habovstiak)
fb5971cc2b Fix UB in `siphash24` (Martin Habovstiak)
Pull request description:
We have a bit of `unsafe` code in the crates which should really be checked with `miri`. Thus this adds a basic CI check that automatically determines which crates need `miri` checking and checks them. It also makes sure to enable all target features so that SIMD code can be checked as well.
This doesn't try to do anything fancy with maintainer tools or run task for now, since I just want to test the basic idea.
Closes#3192
ACKs for top commit:
storopoli:
ACK bd8ad1f5e2
tcharding:
ACK bd8ad1f5e2
sanket1729:
ACK bd8ad1f5e2
apoelstra:
ACK bd8ad1f5e2 successfully ran local tests; wow, good find!
Tree-SHA512: a0d33c7851d6d6b288ca8cc1a902f187814dd82e3528c6f8169fdc0ba71991b99451276aaba5e3b6cde6029e09158063d65e48a71d1e01ee20302b9f653584ef
We have a bit of `unsafe` code in the crates which should really be
checked with `miri`. Thus this adds a basic CI check that automatically
determines which crates need `miri` checking and checks them. It also
makes sure to enable all target features so that SIMD code can be
checked as well.
Instead of manually setting the crates list it is less error prone to do
so mechanically. This required some changes to the `run_task` script
which have now merged, so we update to use the new commit hash at the
same time.
- Use shell to set the `CRATES` env var used by `run_task.sh`.
- Use latest revision of rust-bitcoin-maintainer-tools
83831e6363 Show output of failed semver checks (Martin Habovstiak)
Pull request description:
Debugging the API breaks without seeing what failed is pretty much impossible. This simply prints the output when a check fails.
ACKs for top commit:
tcharding:
ACK 83831e6363
apoelstra:
ACK 83831e6363 successfully ran local tests
Tree-SHA512: d3acd41ef745e8e19c0be8ca9c205f038a72d6d66c459564f6ea35cdef9402c07026e497e6ff6c8e1b80b4856fedfbf1d6f74adb40789b30bffd6e2a1ee76a2b
Apparently the `checkout` action will just grab random shit in the case
that you configure it with an unknown key. There is a warning in the
middle of the CI output so ok, I guess there's that.
This commit does not change the pinned version of
rust-bitcoin-maintainer-tools, though we do want to update the pin,
because I want to make sure that the pin is actually working.
c72069e921 Bump MSRV to 1.63 (Martin Habovstiak)
Pull request description:
The version 1.63 satisfies our requirements for MSRV and provides significant benefits so this commit bumps it. This commit also starts using some advantages of the new MSRV, namely namespaced features, weak dependencies and the ability to use trait bounds in `const` context.
This however does not yet migrade the `rand-std` feature because that requires a release of `secp256k1` with the same kind of change - bumping MSRV to 1.63 and removing `rand-std` in favor of weak dependency. (Accompanying PR to secp256k1: https://github.com/rust-bitcoin/rust-secp256k1/pull/709 )
Suggested plan:
* merge both PRs
* at some point release `hashes` and `secp256k`
* remove `rand-std` from `bitcoin`
* release the rest of the crates
ACKs for top commit:
apoelstra:
ACK c72069e921
tcharding:
ACK c72069e921
Tree-SHA512: 0b301ef8145f01967318d3ed1c738d33e6cf9e44f835f3762122b460a536f926916dbd6ea39d6f80b4f95402cd845e924401e75427dbb0731ca5b12b4fa6915e
The version 1.63 satisfies our requirements for MSRV and provides
significant benefits so this commit bumps it. This commit also starts
using some advantages of the new MSRV, namely namespaced features, weak
dependencies and the ability to use trait bounds in `const` context.
This however does not yet migrade the `rand-std` feature because that
requires a release of `secp256k1` with the same kind of change - bumping
MSRV to 1.63 and removing `rand-std` in favor of weak dependency.