Merge pull request #593 from Thomasdezeeuw/extra-docs #507
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: CI | |
on: [push, pull_request] | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
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-pc-windows-msvc | |
- build: win64 | |
os: windows-latest | |
rust: stable-x86_64-pc-windows-msvc | |
- build: mingw | |
os: windows-latest | |
rust: stable-x86_64-pc-windows-gnu | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
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 | |
# log repo does not use Cargo workspaces, so `cargo fmt` will not check all the code | |
# perhaps this should be changed in the future | |
- run: cargo fmt -- --check | |
- run: cargo fmt --manifest-path test_max_level_features/Cargo.toml -- --check | |
- run: cargo fmt --manifest-path tests/Cargo.toml -- --check | |
clippy: | |
name: Clippy | |
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 clippy | |
- run: cargo clippy --verbose | |
- run: cargo clippy --verbose --manifest-path test_max_level_features/Cargo.toml | |
- run: cargo clippy --verbose --manifest-path tests/Cargo.toml | |
doc: | |
name: Check Documentation | |
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 rust-docs | |
- name: Run rustdoc | |
run: RUSTDOCFLAGS="-D warnings" cargo doc --verbose --all-features | |
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.60.0 --no-self-update | |
rustup default 1.60.0 | |
- 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 |