Use rust-bitcoin-maintainer-tools and re-write CI #358
Workflow file for this run
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
on: | |
push: | |
branches: | |
- master | |
- 'test-ci/**' | |
pull_request: | |
name: Continuous integration | |
jobs: | |
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: tcharding/rust-bitcoin-maintainer-tools | |
ref: 05-02-ci | |
path: maintainer-tools | |
- name: "Select toolchain" | |
uses: dtolnay/rust-toolchain@stable | |
- name: "Copy lock file" | |
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | |
- name: "Run test script" | |
run: ./maintainer-tools/ci/run_task.sh stable | |
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: tcharding/rust-bitcoin-maintainer-tools | |
ref: 05-02-ci | |
path: maintainer-tools | |
- name: "Select toolchain" | |
uses: dtolnay/rust-toolchain@nightly | |
- name: "Copy lock file" | |
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: tcharding/rust-bitcoin-maintainer-tools | |
ref: 05-02-ci | |
path: maintainer-tools | |
- name: "Select toolchain" | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: "1.56.1" | |
- name: "Copy lock file" | |
run: cp Cargo-${{ matrix.dep }}.lock Cargo.lock | |
- name: "Run test script" | |
run: ./maintainer-tools/ci/run_task.sh msrv | |
Format: # 1 jobs, run cargo fmt directly. | |
name: Format - stable toolchain | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@v4 | |
- name: "Select toolchain" | |
uses: dtolnay/rust-toolchain@stable | |
- name: "Check formatting" | |
run: cargo fmt --all -- --check | |
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 |