-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #348: Use rust-bitcoin-maintainer-tools and re-write CI
93602a9 CI: Use script from rust-bitcoin-maintainer-tools (Tobin C. Harding) 41c457e CI: Reduce indentation (Tobin C. Harding) Pull request description: Use the new maintainer tools test script we created in rust-bitcoin/rust-bitcoin-maintainer-tools#4 For this repo usage of the script is a big change, the coverage does not change that much except we run one example instead of just building it and we run cargo using `cargo --locked` whereas currently for stable and nightly the dependencies used are much more recent. FTR: - We do not format (exists in current ci but is not enforced because of bug is `test.sh`) - We just build the examples (same as current behaviour) - We do not lint (same as current behaviour) - We do not pin, instead we commit a lock file with working dependency versions. Please note that there are two lock files as is customary but in this repo I was unable to get a set of more recent dependencies to build so both files are the same. This replaces #338 ACKs for top commit: apoelstra: ACK 93602a9 Tree-SHA512: 67a298fddb670714fd27736341b2aa922208d45baadffefc7a9b8dc2ebd48d551b8fc36426bea06d89cddd901ae7feeaf0ebe16ec4668cc3066056f9bb6cd580
- Loading branch information
Showing
12 changed files
with
1,259 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# rust-miniscript workflow notes | ||
|
||
We are attempting to run max 20 parallel jobs using GitHub actions (usage limit for free tier). | ||
|
||
ref: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration | ||
|
||
The minimal/recent lock files are handled by CI (`rust.yml`). | ||
|
||
## Jobs | ||
|
||
Run from `rust.yml` unless stated otherwise. Total 11 jobs. | ||
|
||
1. `Stable - minimal` | ||
2. `Stable - recent` | ||
3. `Nightly - minimal` | ||
4. `Nightly - recent` | ||
5. `MSRV - minimal` | ||
6. `Integration - 0.18.0` | ||
7. `Integration - 0.18.1` | ||
8. `Integration - 0.19.0.1` | ||
9. `Integration - 0.19.1` | ||
10. `Integration - 0.20.0` | ||
11. `Integration - 0.21.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,107 @@ | ||
on: [push, pull_request] | ||
--- # rust-bitcoincore-rpc CI: If you edit this file please update README.md | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
- 'test-ci/**' | ||
pull_request: | ||
|
||
name: Continuous integration | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- rust: stable | ||
env: | ||
RUSTFMTCHK: true | ||
- rust: nightly | ||
env: | ||
RUSTFMTCHK: false | ||
- rust: 1.56.1 | ||
env: | ||
RUSTFMTCHK: false | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v2 | ||
- name: Checkout Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Running test script | ||
env: ${{ matrix.env }} | ||
run: ./contrib/test.sh | ||
Stable: # 2 jobs, one per lock file. | ||
name: Test - stable toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [minimal, recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: rust-bitcoin/rust-bitcoin-maintainer-tools | ||
rev: b2ac115 | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: "Set dependencies" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh stable | ||
|
||
integrations-tests: | ||
name: Integration Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [stable] | ||
bitcoinversion: | ||
[ | ||
"0.18.0", | ||
"0.18.1", | ||
"0.19.0.1", | ||
"0.19.1", | ||
"0.20.0", | ||
"0.20.1", | ||
"0.21.0", | ||
] | ||
steps: | ||
- name: Checkout Crate | ||
uses: actions/checkout@v2 | ||
- name: Checkout Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Running test script | ||
env: | ||
BITCOINVERSION: ${{ matrix.bitcoinversion }} | ||
run: ./contrib/test.sh | ||
Nightly: # 2 jobs, one per lock file. | ||
name: Test - nightly toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [minimal, recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: rust-bitcoin/rust-bitcoin-maintainer-tools | ||
rev: b2ac115 | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: "Set dependencies" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh nightly | ||
|
||
MSRV: # 2 jobs, one per lock file. | ||
name: Test - 1.56.1 toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dep: [minimal, recent] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Checkout maintainer tools" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: rust-bitcoin/rust-bitcoin-maintainer-tools | ||
rev: b2ac115 | ||
path: maintainer-tools | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: "1.56.1" | ||
- name: "Set dependencies" | ||
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | ||
- name: "Run test script" | ||
run: ./maintainer-tools/ci/run_task.sh msrv | ||
|
||
Integration: # 1 job for each Bitcoin Core version. | ||
name: Integration tests - stable toolchain | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
bitcoinversion: | ||
[ | ||
"0.18.0", | ||
"0.18.1", | ||
"0.19.0.1", | ||
"0.19.1", | ||
"0.20.0", | ||
"0.20.1", | ||
"0.21.0", | ||
] | ||
steps: | ||
- name: "Checkout repo" | ||
uses: actions/checkout@v4 | ||
- name: "Select toolchain" | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: "Run integration tests" | ||
env: | ||
BITCOINVERSION: ${{ matrix.bitcoinversion }} | ||
run: ./contrib/integration_test.sh |
Oops, something went wrong.