CI #954
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: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 2 * * *' | |
env: | |
RUSTFLAGS: -Dwarnings | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update stable | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- run: cargo hack build --feature-powerset --optional-deps --no-dev-deps | |
- run: cargo test --all-features | |
minrust: | |
strategy: | |
matrix: | |
rust: | |
# This is the minimum supported Rust version of this crate. | |
- 1.31.0 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | |
- run: cargo build | |
no-std: | |
strategy: | |
matrix: | |
rust: | |
# This is the minimum supported Rust version for "no_std" | |
- 1.36.0 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | |
- run: rustup target add thumbv7m-none-eabi | |
- run: cargo build --no-default-features --target thumbv7m-none-eabi | |
miri: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup toolchain install nightly --component miri && rustup default nightly | |
- run: cargo miri test --workspace --all-features | |
env: | |
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-disable-isolation | |
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update stable | |
- run: cargo clippy --all-features | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update stable | |
- run: cargo fmt --all -- --check | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
run: rustup update nightly && rustup default nightly | |
- run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: -Dwarnings |