Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
deduplicate job count
Browse files Browse the repository at this point in the history
  • Loading branch information
Sky9x committed Nov 21, 2023
1 parent 4c763fd commit 014a94f
Showing 1 changed file with 41 additions and 24 deletions.
65 changes: 41 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,51 +14,68 @@ env:

jobs:
clippy:
name: Clippy ${{matrix.rust-channel}} ${{matrix.os == 'windows' && '(windows)' || ''}}
name: Clippy ${{matrix.os == 'windows' && '(windows)' || ''}}
runs-on: ${{matrix.os}}-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
rust-channel: [stable, beta, nightly]
os: [ubuntu, windows]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Install Rust Beta
uses: dtolnay/rust-toolchain@beta
with:
components: clippy

- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{matrix.rust-channel}}
components: clippy

- name: Clippy, Default Features
run: cargo clippy --all-targets
- name: Clippy, All Features
run: cargo clippy --all-features --all-targets
- name: Clippy, No Features
run: cargo clippy --no-default-features --all-targets
- name: Clippy (stable)
run: cargo +stable clippy --all-features --all-targets --workspace && cargo clean
- name: Clippy (beta)
run: cargo +beta clippy --all-features --all-targets --workspace && cargo clean
- name: Clippy (nightly)
run: cargo +nightly clippy --all-features --all-targets --workspace && cargo clean

fmt:
name: Rustfmt ${{matrix.rust-channel}}
name: Rustfmt
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
rust-channel: [stable, beta, nightly]
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Install Rust Beta
uses: dtolnay/rust-toolchain@beta
with:
components: rustfmt

- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{matrix.rust-channel}}
components: rustfmt

- name: Check Formatting
run: cargo fmt --all --check
- name: Check Formatting (stable)
run: cargo +stable fmt --all --check
- name: Check Formatting (beta)
run: cargo +beta fmt --all --check
- name: Check Formatting (nightly)
run: cargo +nightly fmt --all --check

test:
name: Test ${{matrix.rust-channel}} ${{matrix.os == 'windows' && '(windows)' || ''}}
Expand All @@ -79,8 +96,8 @@ jobs:
toolchain: ${{matrix.rust-channel}}

- name: Test Default Features
run: cargo test --all-targets
run: cargo test --all-targets --workspace
- name: Test All Features
run: cargo test --all-features --all-targets
run: cargo test --all-features --all-targets --workspace
- name: Test No Features
run: cargo test --no-default-features --all-targets
run: cargo test --no-default-features --all-targets --workspace

0 comments on commit 014a94f

Please sign in to comment.