Skip to content
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

CI Updates #36

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
21 changes: 18 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ env:
RUSTFLAGS: -Dwarnings

jobs:
init:
name: Initialize the common variables
runs-on: ubuntu-latest
outputs:
msrv: ${{ step.rust.outputs.msrv }}
matrix: ${{ step.matrix.outputs.value }}
steps:
- id: rust
run: echo "::set-output name=msrv::${$(cat Cargo.toml | grep rust-version | tr -d '\"'):2:3}"
- id: matrix
run: echo "::set-output name=value::{\"rust\":[\"1.58.1\", \"nightly\", \"stable\"]}"

test:
name: Test on rust ${{matrix.rust}}
runs-on: ubuntu-latest
needs: init
strategy:
matrix:
rust: [1.58.1, stable, nightly]
matrix: ${{fromJSON(needs.init.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
Expand All @@ -32,7 +44,10 @@ jobs:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
- run: rustup component add clippy
- run: cargo clippy --all
# Suppress the warning generated by derive_partial_eq_without_eq lint.
# This warning appears with the nightly toolchain.
# Please, also see this GitHub issue: https://github.com/rust-lang/rust-clippy/issues/9063
- run: cargo clippy --all -- -A clippy::derive_partial_eq_without_eq

fmt:
name: Rustfmt
Expand Down