Skip to content

parallelize CI, check on MSRV and test on stable #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 54 additions & 26 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,67 @@ on:
- master

jobs:
test:
check:
name: Check
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
rustup:
- toolchain: stable
components: "clippy, rustfmt"
- toolchain: nightly
components: ""
- toolchain: 1.40.0
components: ""
rustc: [1.40.0, stable] # MSVR and current stable rustc
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rustc }}
override: true
- uses: actions-rs/cargo@v1
with:
command: check

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
name: Install Rust
with:
toolchain: ${{ matrix.rustup.toolchain }}
profile: minimal
components: ${{ matrix.rustup.components }}
default: true
- name: Clippy
run: cargo clippy
if: contains(matrix.rustup.components, 'clippy')
- name: Format
run: cargo fmt -- --check
if: contains(matrix.rustup.components, 'rustfmt')
- name: Test
run: cargo test
- name: Test (No features)
run: cargo test --no-default-features
if: matrix.rustup.toolchain == 'nightly'
- name: Benchmark
run: cargo bench
if: matrix.rustup.toolchain == 'nightly'
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Run cargo clippy
uses: actions-rs/clippy-check@v1
with:
args: --all-features