name: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
build: [stable, beta, nightly, macos, win32, win64, mingw] | |
include: | |
- build: stable | |
os: ubuntu-latest | |
rust: stable | |
- build: beta | |
os: ubuntu-latest | |
rust: beta | |
- build: nightly | |
os: ubuntu-latest | |
rust: nightly | |
- build: macos | |
os: macos-latest | |
rust: stable | |
- build: win32 | |
os: windows-latest | |
rust: stable-i686 | |
- build: win64 | |
os: windows-latest | |
rust: stable-x86_64 | |
- build: mingw | |
os: windows-latest | |
rust: stable-x86_64-gnu | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust (rustup) | |
run: | | |
rustup update ${{ matrix.rust }} --no-self-update | |
rustup default ${{ matrix.rust }} | |
- run: cargo test --verbose | |
- run: cargo test --verbose --no-default-features | |
- run: cargo test --verbose --all-features | |
- run: cargo test --verbose --features serde | |
- run: cargo test --verbose --features std | |
- run: cargo test --verbose --features kv_unstable | |
- run: cargo test --verbose --features kv_unstable_sval | |
- run: cargo test --verbose --features kv_unstable_serde | |
- run: cargo test --verbose --features "kv_unstable kv_unstable_std kv_unstable_sval kv_unstable_serde" | |
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml | |
- run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: | | |
rustup update stable --no-self-update | |
rustup default stable | |
rustup component add rustfmt | |
- run: cargo fmt -- --check | |
features: | |
name: Feature check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: | | |
rustup update nightly --no-self-update | |
rustup default nightly | |
- run: cargo build --verbose -Z avoid-dev-deps --features kv_unstable | |
- run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable std" | |
- run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_sval" | |
- run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_serde" | |
- run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_std" | |
- run: cargo build --verbose -Z avoid-dev-deps --features "kv_unstable kv_unstable_sval kv_unstable_serde" | |
minimalv: | |
name: Minimal versions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: | | |
rustup update nightly --no-self-update | |
rustup default nightly | |
- run: cargo build --verbose -Z minimal-versions --features kv_unstable | |
- run: cargo build --verbose -Z minimal-versions --features "kv_unstable std" | |
- run: cargo build --verbose -Z minimal-versions --features "kv_unstable kv_unstable_sval" | |
- run: cargo build --verbose -Z minimal-versions --features "kv_unstable kv_unstable_serde" | |
- run: cargo build --verbose -Z minimal-versions --features "kv_unstable kv_unstable_std" | |
- run: cargo build --verbose -Z minimal-versions --features "kv_unstable kv_unstable_sval kv_unstable_serde" | |
msrv: | |
name: MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: | | |
rustup update 1.31.0 --no-self-update | |
rustup default 1.31.0 | |
- run: cargo build --verbose | |
- run: cargo build --verbose --features serde | |
- run: cargo build --verbose --features std | |
- run: cargo test --verbose --manifest-path tests/Cargo.toml | |
embedded: | |
name: Embedded | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: | | |
rustup update stable --no-self-update | |
rustup default stable | |
- run: rustup target add thumbv6m-none-eabi riscv32imc-unknown-none-elf | |
- run: cargo build --verbose --target=thumbv6m-none-eabi | |
- run: cargo build --verbose --target=riscv32imc-unknown-none-elf |