Convert todo!
to assert!
where appropriate
#8
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
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
name: CI | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: [lints, docs] | |
env: | |
RUSTFLAGS: "-D warnings" | |
strategy: | |
matrix: | |
target: | |
- aarch64-unknown-linux-gnu | |
- x86_64-pc-windows-gnu | |
- x86_64-unknown-linux-gnu | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install cross | |
uses: taiki-e/install-action@cross | |
- name: Build | |
run: cross build --all-features --all-targets --release --target=${{ matrix.target }} | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
needs: [lints, docs] | |
env: | |
RUSTFLAGS: "-D warnings" | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
#- uses: Swatinem/rust-cache@v1 | |
- name: Run cargo test | |
run: cargo test -- --test-threads 1 | |
demo: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
needs: [lints, docs] | |
env: | |
RUSTFLAGS: "-D warnings" | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
#- uses: Swatinem/rust-cache@v1 | |
- name: Run cargo test | |
run: cd demo && cargo run | |
msrv: | |
name: Minimum Supported Rust Version | |
runs-on: ubuntu-latest | |
needs: [lints, docs] | |
env: | |
RUSTFLAGS: "-D warnings" | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install cargo-binstall | |
uses: taiki-e/install-action@cargo-binstall | |
- name: Install cargo-msrv | |
run: cargo binstall --version 0.16.0-beta.17 --no-confirm cargo-msrv | |
#- uses: Swatinem/rust-cache@v1 | |
- name: Check MSRV | |
run: cargo msrv verify --log-target=stdout --output-format=json | |
semver: | |
name: Semantic Versioning | |
runs-on: ubuntu-latest | |
needs: [lints, docs] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: cargo clippy --all-features --all-targets -- -D warnings | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run cargo doc | |
env: | |
RUSTDOCFLAGS: "-Dwarnings" | |
run: cargo doc --no-deps |