build: new msrv job to isolate build tools #675
Workflow file for this run
This file contains hidden or 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
| name: Build & Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| platform: [ubuntu-latest, macos-latest, windows-latest] | |
| toolchain: [stable, beta, nightly] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Update Toolchain | |
| run: | | |
| rustup default ${{ matrix.toolchain }} | |
| rustup component add --toolchain ${{ matrix.toolchain }} rustfmt | |
| rustup component add --toolchain ${{ matrix.toolchain }} clippy | |
| rustup update ${{ matrix.toolchain }} | |
| - name: Lint all targets | |
| run: cargo clippy --all-targets | |
| - name: Format | |
| run: cargo fmt -- --check | |
| - name: Build with defeault features | |
| run: cargo build --verbose | |
| - name: Check release build on Rust ${{ matrix.toolchain }} | |
| run: cargo check --release --verbose --color always | |
| - name: Unit test | |
| run: cargo test --verbose --lib | |
| - name: Doc test | |
| run: cargo test --verbose --doc | |
| # Check that library code can be compiled with MSRV 1.63.0. | |
| msrv: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # Modify build tools just for MSRV testing. | |
| # This avoids us having to bump our MSRV just for tooling. Tooling | |
| # doesn't effect consumers so not a risk. | |
| - name: Prepare build for MSRV | |
| run: | | |
| # Remove resolver = "3" line for MSRV compatibility, standard in rust 1.85. | |
| sed -i '/resolver = "3"/d' Cargo.toml | |
| - name: Install MSRV toolchain | |
| run: | | |
| rustup toolchain install 1.63.0 | |
| rustup default 1.63.0 | |
| - name: Build with MSRV compiler | |
| run: cargo build --verbose | |
| signet: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Sync signet | |
| run: cargo test --verbose signet_syncs | |
| bitcoind: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Integration test | |
| run: cargo test -- --test-threads 1 --skip signet_syncs --nocapture |