Add MSRV build to CI #180
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
name: Build & Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
jobs: | ||
# Proxy application is not as strict as protocol library. | ||
proxy: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: [stable, beta, nightly] | ||
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 | ||
run: | | ||
cargo clippy --package bip324-proxy --all-targets | ||
- name: Format | ||
run: | | ||
cargo fmt --package bip324-proxy -- --check | ||
- name: Build | ||
run: | | ||
cargo build --package bip324-proxy --verbose | ||
cargo build --all --verbose --no-default-features | ||
cargo build --all --verbose --all-features | ||
- name: Test | ||
run: | | ||
cargo test --package bip324-proxy --verbose | ||
protocol: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# Minumum Supported Rust Version (MSRV) is 1.56.1. | ||
toolchain: [1.56.1, stable, beta, nightly] | ||
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 | ||
run: | | ||
cargo clippy --package bip324 --all-targets | ||
- name: Format | ||
run: | | ||
cargo fmt --package bip324 -- --check | ||
- name: Build | ||
# Build with default features, all, and none. | ||
# Then build with specific feature sub-sets. | ||
run: | | ||
cargo build --package bip324 --verbose | ||
cargo build --package bip324 --verbose --all-features | ||
cargo build --package bip324 --verbose --no-default-features | ||
cargo build --package bip324 --verbose --no-default-features --features alloc | ||
- name: Test | ||
# Test with default features, all, and none. | ||
# Then test with specific feature sub-sets. | ||
run: | | ||
cargo test --package bip324 --verbose | ||
cargo test --package bip324 --verbose --all-features | ||
cargo test --package bip324 --verbose --no-default-features | ||
cargo test --package bip324 --verbose --no-default-features --features alloc | ||
- name: Check No Standard Library Support | ||
if: toolchain == 'stable' | ||
Check failure on line 76 in .github/workflows/ci.yml GitHub Actions / Build & TestInvalid workflow file
|
||
run: | | ||
rustup target add --toolchain ${{ matrix.toolchain }} thumbv7m-none-eabi | ||
cargo install cross --locked | ||
cross build --package bip324 --target thumbv7m-none-eabi --no-default-features --features alloc | ||