Commit Graph

113 Commits

Author SHA1 Message Date
Tobin C. Harding 1a85eac01b
Move nightly_version file to crate root
The nightly pinning is used by a bunch of different tools outside of
github actions, move the config file to the crate root.

Update the path in the justfile.

Done in preparation for fixing the git pre-commit hook.
2024-04-04 15:42:12 +11:00
Tobin C. Harding 6ab0110964
Run fuzzer daily
Waiting for the fuzzer slows down the dev feedback loop because it makes
CI slow. We still want fuzz coverage but not in a way that slows down
devs.

Instead of running the fuzzer on every PR just run it once a nightly.

As we do for other daily jobs, rename the yaml file to make explicit
what it does.

Open questions:

- This should run for 30 minutes but I can't work out why the current
  set up only runs for a shorter time than that?
- Is this less fuzzing i.e., is 30 minutes once a day better or worse that 1
  minute 30 times?
2024-03-27 04:35:23 +11:00
Andrew Poelstra 50e772fe79
Revert "ci: introduce `classify-pr.sh` script which determines whether a PR should have CI run"
This reverts commit 9aca8a18c7.
2024-03-20 14:08:17 +00:00
Andrew Poelstra ae381fcc01
Revert "ci: gate CI workflow on source being changed"
This reverts commit 09f7fc3cff.
2024-03-20 14:08:16 +00:00
Andrew Poelstra 495d7e8acd
Revert "ci: gate fuzztesting on whether source code changed"
This reverts commit 2203c02347.
2024-03-20 14:08:15 +00:00
Andrew Poelstra ec3e4e8801
Revert "ci: gate coverage analysis on whether source code changed"
This reverts commit 32f9b1a231.
2024-03-20 14:08:14 +00:00
Andrew Poelstra f495bd9681
Merge rust-bitcoin/rust-bitcoin#2525: ci: skip CI for things that modify only markdown files
32f9b1a231 ci: gate coverage analysis on whether source code changed (Andrew Poelstra)
2203c02347 ci: gate fuzztesting on whether source code changed (Andrew Poelstra)
09f7fc3cff ci: gate CI workflow on source being changed (Andrew Poelstra)
9aca8a18c7 ci: introduce `classify-pr.sh` script which determines whether a PR should have CI run (Andrew Poelstra)

Pull request description:

  Fixes #2523

ACKs for top commit:
  tcharding:
    ACK 32f9b1a231

Tree-SHA512: 7d53365bdf4e8ae5480221e43b4c515d4b16048ec1a00cb62ab65b2d2b91a37f8945c39b619a82bfe4ca74f3508176d9879481b908bb8d3fe8d214b173d3bf18
2024-03-20 14:01:32 +00:00
Andrew Poelstra 9641e2d731
Merge rust-bitcoin/rust-bitcoin#2548: tweak nightly CI update
6b3c8b9f6b ci: use personal access token for daily nightly update (Andrew Poelstra)
775d0c74cd ci: change automatic CI bot committer name to something without special characters (Andrew Poelstra)
aa8655552b ci: change branch of nightly bot to not conflict with rustfmt bot (Andrew Poelstra)

Pull request description:

  Rename the bot's committer name to not have special characters, which causes some problem in tcharding's locale; also change the branch name to not overlap with the "weekly CI" job, since it's causing the two jobs to overwrite each others' PRs.

  Was part of #2531 but pulled out here to be in a branch that isn't getting clobbered every 24 hours :).

ACKs for top commit:
  tcharding:
    ACK 6b3c8b9f6b

Tree-SHA512: 2e605991132eb36543d8fb2636bc70c7cc834db6078d2cc6242c65c0f8c5fd270fc9881e6a5c28f5d87a03551fa4f1e0ad3e87c86c226db5e5b8a4c21270ef8c
2024-03-08 14:53:05 +00:00
Andrew Poelstra 6b3c8b9f6b
ci: use personal access token for daily nightly update
The chatbot says this should cause CI to trigger on the nightly update
PRs. With the default token this does not happen because it has the
potential to cause recursive CI actions. (How this is avoided by using a
PAT, I don't know, but whatever.)
2024-03-07 14:46:16 +00:00
Andrew Poelstra 775d0c74cd
ci: change automatic CI bot committer name to something without special characters 2024-03-07 13:51:40 +00:00
Andrew Poelstra aa8655552b
ci: change branch of nightly bot to not conflict with rustfmt bot 2024-03-07 13:51:40 +00:00
Update Nightly Rustc Bot de264c0c55 Automated update to Github CI to rustc nightly-2024-03-05 2024-03-07 00:52:39 +00:00
Andrew Poelstra 32f9b1a231
ci: gate coverage analysis on whether source code changed 2024-03-01 16:13:40 +00:00
Andrew Poelstra 2203c02347
ci: gate fuzztesting on whether source code changed 2024-03-01 16:12:23 +00:00
Andrew Poelstra 09f7fc3cff
ci: gate CI workflow on source being changed 2024-03-01 16:12:23 +00:00
Andrew Poelstra 9aca8a18c7
ci: introduce `classify-pr.sh` script which determines whether a PR should have CI run 2024-03-01 16:12:19 +00:00
Andrew Poelstra ee113aa91f
ci: add daily job to update nightly rustc 2024-02-28 20:47:39 +00:00
Andrew Poelstra f82567fda4
ci: rename a couple .yml files to indicate that they're scheduled
A small attempt to organize the various github workflows
2024-02-28 20:47:39 +00:00
Andrew Poelstra 85ead84a99
ci: pin nightly in current CI 2024-02-28 20:47:39 +00:00
Andrew Poelstra e386cbfadf
ci: delete *test.sh files
These are not run in CI since #2353 and are likely to go out of date. If
we want a script that users can run locally then we should create a new
script that wraps our current CI.
2024-02-28 20:45:56 +00:00
dependabot[bot] d61bb3816f
Bump peter-evans/create-pull-request from 5 to 6
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 10:29:03 +00:00
Martin Habovstiak 5c15ed5441
CI: Epic overhaul
Re-write the whole CI pipeline.

Co-developed-by: Martin Habovstiak <martin.habovstiak@gmail.com>
2024-02-02 05:57:23 +11:00
Tobin C. Harding 4383202f23
CI: Add a job to build kani proofs
Currently we do not build the code in the kani tests when PRs are
pushed, instead we run the verifier once a day. We should at least check
the code builds on each PR. One way to do this is to build the proofs
without running them, `kani --only-codegen` does that.
2024-02-01 15:44:38 +11:00
Tobin C. Harding 1fe90223aa
Remove DO_COV
We have test coverage by way of `coveralls` now. Remove the old stale
`DO_COV` stuff.

Fix: #1853
2024-01-23 14:27:10 +11:00
Andrew Poelstra 8b9c2ae9cc
Merge rust-bitcoin/rust-bitcoin#2365: Add automated labeler job
c6c5f07880 Add automated labeler job (Martin Habovstiak)

Pull request description:

  Rather than modifying the labels manually, which we often forget, we can label the PRs automatically. This will make it easier to search PRs.

ACKs for top commit:
  apoelstra:
    ACK c6c5f07880
  tcharding:
    ACK c6c5f07880

Tree-SHA512: d3f7ca8c69cc8734d914f871675568ca293e28c3dc7351ee54b9237645204b87d1b47db02863b27d930900ae4b41d6f169f130ed9f4c750d4afbb765921cfb66
2024-01-22 17:41:34 +00:00
dependabot[bot] bc3dd7c36e
Bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 10:53:21 +00:00
Martin Habovstiak c6c5f07880 Add automated labeler job
Rather than modifying the labels manually, which we often forget, we can
label the PRs automatically. This will make it easier to search PRs.
2024-01-20 16:35:37 +01:00
pool2win 47b476ec5b
Ignore fuzz dir from coverage reports 2024-01-19 18:09:59 +01:00
pool2win 50ff68550c
Add github action for llvm-cov coverage
The action reports the generated report to coveralls.
2024-01-19 11:06:25 +01:00
dependabot[bot] 9cbe348c9a
Bump model-checking/kani-github-action from 1.0 to 1.1
Bumps [model-checking/kani-github-action](https://github.com/model-checking/kani-github-action) from 1.0 to 1.1.
- [Release notes](https://github.com/model-checking/kani-github-action/releases)
- [Commits](https://github.com/model-checking/kani-github-action/compare/v1.0...v1.1)

---
updated-dependencies:
- dependency-name: model-checking/kani-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 10:43:18 +00:00
Andrew Poelstra 504f77adca
ci: revert #2301 "update download-artifact to v4" 2023-12-19 19:28:44 +00:00
dependabot[bot] 7e2321de75
Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 10:36:58 +00:00
Andrew Poelstra 4777ec9a90
Merge rust-bitcoin/rust-bitcoin#1225: Add `bitcoin-units` crate
396e049a7a Use InputString instead of String (Tobin C. Harding)
acacf45edf Add ParseDenominationError (Tobin C. Harding)
69e56a64ed Add bitcoin-units crate (Tobin C. Harding)
4ecb1fe7da internals: Add docs to InputString (Tobin C. Harding)
fa8d3002cd internals: Fix docs typo (Tobin C. Harding)

Pull request description:

  Create a new  `bitcoin-units` crate as described [here](https://github.com/rust-bitcoin/rust-bitcoin/issues/550#issuecomment-1012103022).

  Only the `amount` module is currently included.

  I've resolved the `Encodale/Decodable` issue by keeping the `amount` module in `bitcoin`.

ACKs for top commit:
  Kixunil:
    ACK 396e049a7a
  apoelstra:
    ACK 396e049a7a

Tree-SHA512: caf5e9da0458435ab19d00d4506896257e898525a4472d435fdac1d1a37bb747befd56993b106673f938475e5777d952a13ba04a2d3cb710d7afe7f5faebb7b8
2023-12-11 17:54:30 +00:00
Tobin C. Harding 69e56a64ed
Add bitcoin-units crate
Add a new crate `bitcoin-units`, move the `amount` module over to it and
re-export all types from `bitcoin::amount` so this as not a breaking
change.
2023-12-11 08:52:31 +11:00
Martin Habovstiak bb0f839c2f Lint with nightly
While `clippy` now allows `TBD` to be used in `since` parameter of
`deprecated` attribute it is only available in the newest, nightly,
version. Switch `clippy` version to nightly to enable the `TBD` value.
2023-12-08 13:22:41 +01:00
Tobin C. Harding 48879e7ad9
Remove no-std feature
Currently `bitcoin` cannot be built with no features enabled, it must
have either "no-std" or "std" enabled. This is an artifact from when
we depended on `core2` for "no-std", now that we have our own `io` crate
and we unconditionally depend on it we can remove the "no-std" feature.
2023-12-06 09:54:33 +11:00
Andrew Poelstra 3ddf60ffd4
Merge rust-bitcoin/rust-bitcoin#2204: Add author for the format bot
6a9713a0cc Add author for the format bot (Tobin C. Harding)

Pull request description:

  The format bot defaults to using the person who triggered the workflow. We can use the `author` option to configure a dummy bot author.

ACKs for top commit:
  Kixunil:
    ACK 6a9713a0cc
  apoelstra:
    ACK 6a9713a0cc

Tree-SHA512: 8b2c419767d217ddb499032497f46588f939d92a01694b611ad44d872541871da28cfe3e9edd0c917bfdea02e86f8ed3a4fdfef60b59d0be5b7c0c2814a5db7b
2023-12-03 17:14:34 +00:00
Tobin C. Harding 6a9713a0cc
Add author for the format bot
The format bot defaults to using the person who triggered the workflow.
We can use the `author` option to configure a dummy bot author.
2023-12-02 06:23:46 +11:00
Tobin C. Harding d9cc724187
Bump MSRV to Rust version 1.56.1
Rust version 1.56.0 introduced edition 2021. Shortly afterwards, on
October 21 2021 Rust version 1.56.1 was released.

Debian stable is currently shipping `rustc 1.63.0`.

Our stated MSRV policy is: In Debian stable and at least 2 years old.

Therefore our MSRV policy is met by Rust version 1.56.1 and we can strat
to bump our MSRV org wide.

Start by bumping the `rust-bitcoin` and `hashes` MSRV to Rust 1.56.1,
includes:

- Update docs.
- Update CI and remove pinning.
- Update the build files and remove now stale cfg attributes rust_v_1_x
  for values less than the new MSRV.
- Use new `IntoIterator` for arrays so we no longer need to allocate a
  vector to iterate.

Links:

- https://blog.rust-lang.org/2021/11/01/Rust-1.56.1.html
- https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html
- https://packages.debian.org/stable/rust/rustc
2023-11-23 06:20:02 +11:00
Einherjar d391ada5b8
ci: nightly rustfmt PR scheduled/manual 2023-10-22 05:34:16 -03:00
Andrew Poelstra 539f4ba64c
apoelstra run of generate-files.sh 2023-10-10 14:39:15 -03:00
Einherjar 20f3a05d2a
ci: replace fuzz toolchain
old: `actions-rs/toolchain`
new: `dtolnay/rust-toolchain`

fix

ci(fuzz): change runner to ubuntu-latest

ci: update run syntax in fuzz job

ci: update and run fuzz/generate-files.sh
2023-10-10 14:39:15 -03:00
Einherjar 3e6021bbc6
ci: fuzz test YAML toolchain future-proof
To avoid YAML automatic parsing of inputs as floats,
e.g. [`1.60` being parsed as `1.6`](https://github.com/rust-bitcoin/rust-bitcoin/pull/2109#issuecomment-1751392327),
it is best to future-proof the `toolchain` input in CI fuzz testing
as a string.
2023-10-07 14:30:29 -03:00
Vincenzo Palazzo 4537634e7e ci: bump rustc to 1.60 for fuzz test
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-10-07 11:19:47 +02:00
dependabot[bot] f949fedb6d
Bump model-checking/kani-github-action from 0.37 to 1.0
Bumps [model-checking/kani-github-action](https://github.com/model-checking/kani-github-action) from 0.37 to 1.0.
- [Release notes](https://github.com/model-checking/kani-github-action/releases)
- [Commits](https://github.com/model-checking/kani-github-action/compare/v0.37...v1.0)

---
updated-dependencies:
- dependency-name: model-checking/kani-github-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 10:26:25 +00:00
Andrew Poelstra 6b9d76db7a
Merge rust-bitcoin/rust-bitcoin#2050: CI: add an automated github releases on new tags
c34c709681 CI: add an automated github releases on new tags (Einherjar)

Pull request description:

  Creates a `gh-release.yml` that runs on every new tag using the [`ncipollo/release-action`](https://github.com/ncipollo/release-action), which is one of the recommended actions after [GitHub's official `actions/create-release`](https://github.com/actions/create-release) was archived.

  The idea is to just have a release with the source code, no binary (although if wanted I can add that as well).
  A little bit of context: tcharding told me yesterday at TABConf that he copied manually all commits titles to the release notes somewhere (I think in crates.io?).
  This is an easy way to do it, just copy from the GitHub release.
  Finally, it is also positive to generate Releases from Tags since this increases the exposure of the repo (GitHub is highly social) while also signaling maturity.

  Here's an [example](https://github.com/oven-sh/bun/releases/tag/bun-v0.8.1) that I've found in a non-related repo that has the same `generateReleaseNotes: true` as this PR proposes

  <img width="857" alt="image" src="https://github.com/realeinherjar/rust-bitcoin/assets/136860407/41789514-8abf-4f58-b7ca-d2c352346923">

ACKs for top commit:
  apoelstra:
    ACK c34c709681
  tcharding:
    ACK c34c709681

Tree-SHA512: 06bc0276b5aca95e19965eadb79d0a4cf8606b222dce37f095247196fcac023458c34e35cf34fa2344bc274063e642b93b05dc796a27179567052c58ac4bc27a
2023-09-27 13:55:46 +00:00
dependabot[bot] 9fa2111c12
Bump model-checking/kani-github-action from 0.36 to 0.37
Bumps [model-checking/kani-github-action](https://github.com/model-checking/kani-github-action) from 0.36 to 0.37.
- [Release notes](https://github.com/model-checking/kani-github-action/releases)
- [Commits](https://github.com/model-checking/kani-github-action/compare/v0.36...v0.37)

---
updated-dependencies:
- dependency-name: model-checking/kani-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 10:34:39 +00:00
dependabot[bot] 0f77afdef0
Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 10:17:32 +00:00
Einherjar c34c709681
CI: add an automated github releases on new tags
Creates a `gh-release.yml` that runs on every new tag using the [`ncipollo/release-action`](https://github.com/ncipollo/release-action),
which is one of the recommended actions after [GitHub's official `actions/create-release`](https://github.com/actions/create-release) was archived.

fix: remove the write permissions
2023-09-10 19:21:22 -03:00
Andrew Poelstra 26c27d9071
Merge rust-bitcoin/rust-bitcoin#2060: fix(CI): `rust-toolchain` stable
c2f3c1fa11 fix(CI): rust-toolchain stable (Einherjar)

Pull request description:

  - sets `dtolnay/rust-toolchain` to `stable`
  - delegates the `toolchain` to `1.48.0` as GitHub action input

  This will make the rust-toolchain to always run in the `stable` branch with the toolchain version being handled in the action. It will appease dependabot and we can change at any time the `toolchain` action input.

  Discussed in https://github.com/rust-bitcoin/rust-bitcoin/pull/2055

ACKs for top commit:
  apoelstra:
    ACK c2f3c1fa11
  tcharding:
    ACK c2f3c1fa11

Tree-SHA512: 83637bcd73aed1210ff67376c9f99047293dd22c2b863dd5f39ba5efb65081ff2d0cce4e375abb79b33918101a12f1780c3bde78b76a29331733f5cf515d1ac7
2023-09-10 21:10:17 +00:00