Add more feature checks to CI #17
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: test suite | |
on: [push, pull_request] | |
jobs: | |
check_and_test: | |
name: check and test workspace with ${{matrix.toolchain}} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- 1.74.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.toolchain}} | |
components: clippy | |
- uses: arduino/setup-protoc@v3 | |
- run: cargo clippy --workspace --tests --no-default-features --exclude arm-app -- -Dwarnings | |
- run: cargo clippy --workspace --tests --all-features --exclude arm-app -- -Dwarnings | |
- run: cargo test --workspace --exclude arm-app | |
build: | |
name: build workspace with ${{matrix.toolchain}} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- 1.74.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.toolchain}} | |
- uses: arduino/setup-protoc@v3 | |
- run: cargo build --workspace --exclude no-panicking --exclude arm-app | |
- run: cargo build -p no-panicking --profile release-lto | |
build-arm-app: | |
name: build arm-app with ${{matrix.toolchain}} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- 1.74.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.toolchain}} | |
target: thumbv7em-none-eabihf | |
- uses: arduino/setup-protoc@v3 | |
- run: cd examples/arm-app && cargo build --profile release-lto --target thumbv7em-none-eabihf | |
miri: | |
name: miri testing on unsafe code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: miri | |
- uses: arduino/setup-protoc@v3 | |
- run: MIRIFLAGS=-"Zmiri-tree-borrows" cargo +nightly miri test -p micropb -p basic-proto | |
documentation: | |
name: document released packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: RUSTDOCFLAGS="-D warnings" cargo doc -p micropb -p micropb-gen |