Skip to content

Commit 37e1994

Browse files
committed
.github/rust: split out arch-independent checks
Signed-off-by: Nathan Perry <nathan@tailscale.com> Change-Id: I1d975f98598941e2d3aba23d4cd49d096a6a6964
1 parent d31eca1 commit 37e1994

1 file changed

Lines changed: 28 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,6 @@ jobs:
5151
toolchain-version: ${{ matrix.toolchain.version }}
5252
builder-triple: ${{ matrix.target.triple }}
5353
components: clippy
54-
- name: Install nightly Rust toolchain
55-
id: install-nightly-toolchain
56-
if: steps.setup-rust.outputs.toolchain_cache_hit != 'true'
57-
uses: dtolnay/rust-toolchain@master
58-
with:
59-
toolchain: nightly
60-
components: rustfmt
61-
- name: binstall
62-
uses: cargo-bins/cargo-binstall@main
63-
- name: Install cargo-deny
64-
if: steps.setup-rust.outputs.toolchain_cache_hit != 'true'
65-
run: cargo binstall --no-confirm cargo-deny
66-
- name: Check for unused dependencies (cargo machete)
67-
uses: bnjbvr/cargo-machete@main
68-
with:
69-
args: "--with-metadata"
70-
- name: Dependency audit (cargo deny)
71-
run: cargo deny --workspace --all-features check all
72-
- name: Check formatting (cargo fmt)
73-
run: cargo +nightly fmt --check
74-
- name: Custom workspace checks
75-
run: cargo +${{ matrix.toolchain.version }} run -p checks
7654
- name: Lint lib targets (cargo clippy)
7755
run: |-
7856
cargo +${{ matrix.toolchain.version }} clippy \
@@ -97,3 +75,31 @@ jobs:
9775
run: cargo +${{ matrix.toolchain.version }} build --all-features --workspace --release --verbose --all-targets --target ${{ matrix.target.triple }}
9876
- name: Docs (cargo doc)
9977
run: cargo +${{ matrix.toolchain.version }} doc --workspace --no-deps --all-features --target ${{ matrix.target.triple }}
78+
79+
arch_independent:
80+
name: arch-independent checks
81+
runs-on: linux-x86_64-16cpu
82+
steps:
83+
- name: Checkout
84+
uses: actions/checkout@v6
85+
- name: Setup rust
86+
id: setup-rust
87+
uses: ./.github/actions/setup-rust
88+
with:
89+
toolchain-version: nightly
90+
builder-triple: x86_64-unknown-linux-gnu
91+
components: rustfmt
92+
- name: binstall
93+
uses: cargo-bins/cargo-binstall@main
94+
- name: Install cargo-deny
95+
run: command -v cargo-deny || cargo binstall --no-confirm cargo-deny
96+
- name: Check for unused dependencies (cargo machete)
97+
uses: bnjbvr/cargo-machete@main
98+
with:
99+
args: "--with-metadata"
100+
- name: Dependency audit (cargo deny)
101+
run: cargo deny --workspace --all-features check all
102+
- name: Check formatting (cargo fmt)
103+
run: cargo +nightly fmt --check
104+
- name: Custom workspace checks
105+
run: cargo run -p checks

0 commit comments

Comments
 (0)