Skip to content

Commit

Permalink
github actions with multiple rust versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrichard committed Jul 6, 2023
1 parent de23c65 commit 07a9131
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,42 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
rust:
- 1.69.0 # new release
- 1.63.0 # debian
- 1.57.0 # MSRV
features:
- default

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions-rs/toolchain@v1
with:
toolchain ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt, clippy
- name: Build
run: cargo build
run: cargo build --no-default-features --features ${{ matrix.features }}
- name: Run tests
run: cargo test
- name: Build without default features
run: cargo build --no-default-features
- name: Run tests without default features
run: cargo test --no-default-features
run: cargo test --no-default-features --features ${{ matrix.features }}
- name: Clippy
run: cargo clippy -- -D warnings

fmt:
name: Rust fmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, clippy
- name: Check fmt
run: cargo fmt --all -- --check

0 comments on commit 07a9131

Please sign in to comment.