Add more features: allocator-api2, no_std and (de)serialization #6
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: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --verbose | |
- run: cargo test --verbose | |
- run: cargo test --features serde --verbose | |
- run: cargo test --features miniserde --verbose | |
- run: cargo test --features nanoserde --verbose | |
- run: cargo test --features borsh --verbose | |
- run: cargo test --no-default-features --verbose | |
- run: cargo test --no-default-features --features serde_no_std --verbose | |
miri: | |
name: "Miri" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Miri | |
run: | | |
rustup toolchain install nightly --component miri | |
rustup override set nightly | |
cargo miri setup | |
- name: Test with Miri | |
run: MIRIFLAGS=-Zmiri-strict-provenance cargo miri test | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: clippy | |
- run: cargo clippy --workspace --tests --examples | |
docs: | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- uses: swatinem/rust-cache@v2 | |
- run: cargo doc --workspace --no-deps | |
msrv: | |
name: Rust ${{matrix.rust}} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [1.63.0, 1.64.0] | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
- run: cargo test --verbose | |
- run: cargo test --features serde --verbose | |
- run: cargo test --features miniserde --verbose | |
- run: cargo test --features nanoserde --verbose | |
- run: cargo test --features borsh --verbose | |
- run: cargo test --no-default-features --verbose | |
- run: cargo test --no-default-features --features serde_no_std --verbose |