Merge pull request #324 from KodrAus/feat/arbitrary #254
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: Rust | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
permissions: | |
contents: read | |
jobs: | |
check: | |
name: "Tests / OS: ${{ matrix.os }} - ${{ matrix.channel }}-${{ matrix.rust_target }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
exclude: | |
- os: macos-10.15 | |
rust_target: x86_64-gnu | |
- os: macos-10.15 | |
rust_target: x86_64-msvc | |
- os: windows-2019 | |
rust_target: x86_64-apple-darwin | |
- os: ubuntu-20.04 | |
rust_target: x86_64-msvc | |
- os: ubuntu-20.04 | |
rust_target: x86_64-apple-darwin | |
channel: | |
- stable | |
- beta | |
- nightly | |
os: | |
- macos-10.15 | |
- windows-2019 | |
- ubuntu-20.04 | |
rust_target: | |
- x86_64-gnu | |
- x86_64-msvc | |
- x86_64-apple-darwin | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust Toolchain | |
run: rustup default ${{ matrix.channel }}-${{ matrix.rust_target }} | |
- name: Install cargo-hack | |
run: cargo install cargo-hack | |
- name: Powerset | |
run: cargo hack test --feature-powerset --lib --optional-deps --depth 3 --skip "compiler_builtins core rustc-dep-of-std" | |
- name: Docs | |
run: cargo doc --features example_generated | |
- name: Smoke test | |
run: cargo run --manifest-path tests/smoke-test/Cargo.toml | |
benches: | |
name: Benches | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
run: rustup default nightly | |
- name: Default features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: bench | |
args: --no-run | |
msrv: | |
name: MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install tombl | |
run: cargo install tombl | |
- name: Smoke test | |
run: | | |
eval $(tombl -e msrv=package.rust-version Cargo.toml) | |
rustup update $msrv | |
cd ./tests/smoke-test | |
cargo +$msrv build | |
embedded: | |
name: Build (embedded) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
run: | | |
rustup default nightly | |
rustup target add thumbv6m-none-eabi | |
- name: Default features | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: -Z avoid-dev-deps --features example_generated --target thumbv6m-none-eabi |