Skip to content

Commit 2e504a6

Browse files
authored
Update ci.yml
1 parent 633b96b commit 2e504a6

1 file changed

Lines changed: 22 additions & 35 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -46,38 +46,29 @@ jobs:
4646
steps:
4747
- uses: actions/checkout@v4
4848

49-
- name: Install Rust
50-
uses: dtolnay/rust-toolchain@stable
49+
- name: Install latest ${{ matrix.toolchain }}
50+
uses: dtolnay/rust-toolchain@master
5151
with:
5252
toolchain: ${{ matrix.toolchain }}
5353
target: ${{ matrix.target }}
54-
54+
5555
- name: Build
56-
shell: pwsh
57-
run: |
58-
if ("${{ matrix.toolchain }}" -eq "stable") {
59-
cargo build --target "${{ matrix.target }}" --no-default-features
60-
} else {
61-
cargo build --target "${{ matrix.target }}" --all-features
62-
}
63-
56+
shell: cargo build --target "${{ matrix.target }}"
57+
6458
- name: Test
65-
shell: pwsh
66-
run: |
67-
if ("${{ matrix.toolchain }}" -eq "stable") {
68-
cargo test --target "${{ matrix.target }}" --no-default-features
69-
} else {
70-
cargo test --target "${{ matrix.target }}" --all-features
71-
}
59+
run: cargo test --target "${{ matrix.target }}"
7260

7361
documentation:
7462
runs-on: ubuntu-latest
63+
strategy:
64+
matrix:
65+
toolchain: [nightly, stable]
7566
steps:
7667
- uses: actions/checkout@v4
77-
- name: Install latest nightly
78-
uses: dtolnay/rust-toolchain@stable
68+
- name: Install latest ${{ matrix.toolchain }}
69+
uses: dtolnay/rust-toolchain@master
7970
with:
80-
toolchain: nightly
71+
toolchain: ${{ matrix.toolchain }}
8172
- name: Generate documentation
8273
run: cargo doc --all-features
8374
- name: Install cargo-deadlinks
@@ -86,36 +77,32 @@ jobs:
8677
run: cargo deadlinks
8778

8879
clippy:
89-
runs-on: ${{ matrix.os }}-latest
80+
runs-on: ubuntu-latest
9081
strategy:
9182
matrix:
92-
include:
93-
- os: ubuntu
94-
- os: windows
83+
toolchain: [nightly, stable]
9584
steps:
9685
- uses: actions/checkout@v4
97-
- name: Install latest nightly
98-
uses: dtolnay/rust-toolchain@stable
86+
- name: Install latest ${{ matrix.toolchain }}
87+
uses: dtolnay/rust-toolchain@master
9988
with:
100-
toolchain: nightly
89+
toolchain: ${{ matrix.toolchain }}
10190
components: clippy
10291

10392
- name: Clippy check
10493
run: cargo clippy --all-features
10594

10695
fmt:
107-
runs-on: ${{ matrix.os }}-latest
96+
runs-on: ubuntu-latest
10897
strategy:
10998
matrix:
110-
include:
111-
- os: ubuntu
112-
- os: windows
99+
toolchain: [nightly, stable]
113100
steps:
114101
- uses: actions/checkout@v4
115-
- name: Install latest nightly
116-
uses: dtolnay/rust-toolchain@stable
102+
- name: Install latest ${{ matrix.toolchain }}
103+
uses: dtolnay/rust-toolchain@master
117104
with:
118-
toolchain: nightly
105+
toolchain: ${{ matrix.toolchain }}
119106
components: rustfmt
120107

121108
- name: Format check

0 commit comments

Comments
 (0)