Update test.yml #7
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: Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
toolchain: nightly | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
toolchain: 1.65.0 # MSRV | |
- os: ubuntu-latest | |
deps: sudo apt-get update ; sudo apt install gcc-multilib | |
target: i686-unknown-linux-gnu | |
toolchain: stable | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
toolchain: nightly | |
variant: minimal_versions | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
target: ${{ matrix.target }} | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- name: Install dependencies (if necessary) | |
run: ${{ matrix.deps }} | |
- name: Minimal versions (if necessary) | |
if: ${{ matrix.variant == 'minimal_versions' }} | |
run: cargo generate-lockfile -Z minimal-versions | |
- name: Test nightly (if possible) | |
if: ${{ matrix.toolchain == 'nightly' }} | |
run: | | |
cargo test --target ${{ matrix.target }} --features=nightly | |
cargo test --target ${{ matrix.target }} --all-features | |
cargo test --target ${{ matrix.target }} --benches --all-features | |
- name: Test | |
run: | | |
cargo test --target ${{ matrix.target }} | |
# doctests don't work without `libm` or `std` | |
cargo test --target ${{ matrix.target }} --tests --no-default-features | |
# all stable features: | |
cargo test --target ${{ matrix.target }} --features=std,serde1,rayon | |
test-no-std: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
target: thumbv6m-none-eabi | |
override: true | |
- name: Build top-level only | |
run: | | |
cargo build --target=thumbv6m-none-eabi --no-default-features | |
cargo build --target=thumbv6m-none-eabi | |
cargo build --target=thumbv6m-none-eabi --features serde1 | |
cargo build --target=thumbv6m-none-eabi --no-default-features --features serde1 | |
verify-msrv: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Install cargo-msrv | |
run: cargo install cargo-msrv | |
- name: Verify MSRV | |
run: cargo msrv verify |