Skip to content

Commit aae08c7

Browse files
authored
Merge pull request #57 from SaschaOnTour/ci/faster-pipeline
ci: prebuilt tool install + drop redundant build steps
2 parents b804f88 + 3bccbcc commit aae08c7

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
components: rustfmt, clippy
2323
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
2424

25+
# Prebuilt binaries for tooling instead of `cargo install …` from
26+
# source — saves ~3 min per run. Falls back to cargo install if a
27+
# tool doesn't publish prebuilts.
28+
- uses: taiki-e/install-action@v2
29+
with:
30+
tool: cargo-audit,rustqual
31+
2532
- name: Format check
2633
run: cargo fmt --check
2734

@@ -35,11 +42,8 @@ jobs:
3542
env:
3643
RUSTFLAGS: "-Dwarnings"
3744

38-
- name: Build
39-
run: cargo build
40-
41-
- name: Build (candle)
42-
run: cargo build --features candle
45+
# `cargo test` compiles as part of running — no separate build step
46+
# needed. Clippy above already validates that the crate type-checks.
4347

4448
- name: Test
4549
run: cargo test
@@ -48,10 +52,7 @@ jobs:
4852
run: cargo test --features candle
4953

5054
- name: Security audit
51-
run: cargo install cargo-audit --locked && cargo audit
52-
53-
- name: Install rustqual
54-
run: cargo install rustqual
55+
run: cargo audit
5556

5657
- name: Quality analysis
5758
# Scan the whole repository (src/, tests/, benches/, examples/)

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ jobs:
4949
components: rustfmt, clippy
5050
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
5151

52+
# Prebuilt binaries for tooling instead of `cargo install …` from
53+
# source — saves ~3 min per run. Falls back to cargo install if a
54+
# tool doesn't publish prebuilts.
55+
- uses: taiki-e/install-action@v2
56+
with:
57+
tool: cargo-audit,rustqual
58+
5259
- name: Format check
5360
run: cargo fmt --check
5461

@@ -61,10 +68,7 @@ jobs:
6168
run: cargo test
6269

6370
- name: Security audit
64-
run: cargo install cargo-audit --locked && cargo audit
65-
66-
- name: Install rustqual
67-
run: cargo install rustqual
71+
run: cargo audit
6872

6973
- name: Quality analysis
7074
# Scan the whole repository (src/, tests/, benches/, examples/) —

0 commit comments

Comments
 (0)