cargo: MSRV and GitHub Actions #82
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: Cargo | ||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
| jobs: | ||
| build: | ||
| name: MSRV | ||
| strategy: | ||
| matrix: | ||
| os: ['ubuntu-latest', 'macos-latest'] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@1.79.0 | ||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo/registry | ||
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
| - name: Build | ||
| run: cargo build --verbose | ||
| env: | ||
| RUSTFLAGS: -D warnings | ||
| - name: Clippy | ||
| run: cargo clippy --all --tests | ||
| env: | ||
| RUSTFLAGS: -D warnings | ||
| - name: Test | ||
| run: cargo test --all --verbose | ||
| - name: Formatting | ||
| run: cargo fmt --all -- --check | ||
| - name: Docs | ||
| run: cargo doc --workspace --no-deps | ||
| env: | ||
| RUSTFLAGS: -D warnings | ||
| build-serde: | ||
| name: Serde Build | ||
| strategy: | ||
| matrix: | ||
| os: ['ubuntu-latest', 'macos-latest'] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@1.81.0 | ||
| - name: Build | ||
| run: cargo build --verbose --features serialize | ||
| env: | ||
| RUSTFLAGS: -D warnings | ||
| - name: Test | ||
| run: cargo test --all --verbose --features serialize,arbitrary | ||
| build-bincode: | ||
| name: Bincode Build | ||
| strategy: | ||
| matrix: | ||
| os: ['ubuntu-latest', 'macos-latest'] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@1.85.1 | ||
| - name: Build | ||
| run: cargo build --verbose --features serialize | ||
| env: | ||
| RUSTFLAGS: -D warnings | ||
| - name: Test | ||
| run: cargo test --all --verbose --features bincode,arbitrary | ||
| no-std: | ||
| name: no-std build and test | ||
| strategy: | ||
| matrix: | ||
| os: ['ubuntu-latest', 'macos-latest'] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@1.79.0 | ||
| - name: Build | ||
| run: cargo build --verbose --no-default-features | ||
| env: | ||
| RUSTFLAGS: -D warnings | ||
| - name: Test | ||
| run: cargo test --all --verbose --no-default-features | ||