Skip to content

Commit 10eda43

Browse files
authored
run clippy as part of rust cache (#1345)
* run clippy as part of rust cache * don't bother building desktop if no desktop changes * run clippy on windows too
1 parent 79aa1ba commit 10eda43

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,29 @@ jobs:
9898
runs-on: macos-latest
9999
needs: changes
100100
if: needs.changes.outputs.rust == 'true'
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
settings:
105+
- target: aarch64-apple-darwin
106+
runner: macos-latest
107+
- target: x86_64-pc-windows-msvc
108+
runner: windows-latest
101109
permissions:
102110
contents: read
103-
env:
104-
target: aarch64-apple-darwin
105111
steps:
106112
- name: Checkout repository
107113
uses: actions/checkout@v4
108114

109115
- name: Rust setup
110116
uses: dtolnay/rust-toolchain@stable
111117
with:
112-
targets: ${{ env.target }}
118+
targets: ${{ matrix.settings.target }}
113119
components: clippy
114120

115121
- uses: ./.github/actions/setup-rust-cache
116122
with:
117-
target: ${{ env.target }}
123+
target: ${{ matrix.settings.target }}
118124

119125
- name: Create .env file in root
120126
run: |
@@ -157,7 +163,7 @@ jobs:
157163
build-desktop:
158164
name: Build Desktop
159165
needs: changes
160-
if: needs.changes.outputs.rust == 'true' || needs.changes.outputs.desktop == 'true'
166+
if: needs.changes.outputs.desktop == 'true'
161167
strategy:
162168
fail-fast: false
163169
matrix:
@@ -270,3 +276,9 @@ jobs:
270276

271277
- name: Build release
272278
run: cargo check --all --release
279+
280+
- name: Run Clippy
281+
if: ${{ matrix.settings.target == 'aarch64-apple-darwin' || matrix.settings.target == 'x86_64-pc-windows-msvc' }}
282+
uses: actions-rs-plus/clippy-check@v2
283+
with:
284+
args: --workspace --all-features --locked

0 commit comments

Comments
 (0)