27
27
matrix : ${{ steps.matrix.outputs.matrix }}
28
28
steps :
29
29
- uses : actions/checkout@v4
30
+ - uses : dtolnay/rust-toolchain@stable
31
+ with :
32
+ components : rustfmt, clippy
30
33
- uses : dorny/paths-filter@v3
31
34
id : changes
32
35
if : github.event_name == 'pull_request'
37
40
- added|modified: '**/steel/**'
38
41
workflow:
39
42
- added|modified: '.github/workflows/steel.yml'
43
+
44
+ - name : Run fmt and clippy
45
+ run : |
46
+ readarray -t all_projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]?')
47
+ for project in "${all_projects[@]}"; do
48
+ echo "::group::Checking ${project}"
49
+ if [ ! -f "${project}/Cargo.toml" ]; then
50
+ echo "::error::No Cargo.toml found in ${project}"
51
+ exit 1
52
+ fi
53
+ cd "${project}"
54
+ cargo fmt --check
55
+ cargo clippy --all-features -- -D warnings
56
+ cd - > /dev/null
57
+ echo "::endgroup::"
58
+ done
59
+
40
60
- name : Analyze Changes
41
61
id : analyze
42
62
run : |
@@ -146,9 +166,6 @@ jobs:
146
166
run : |
147
167
npm install --global pnpm
148
168
149
- # Install Steel CLI
150
- cargo install --quiet steel-cli
151
-
152
169
# Create the build and test function
153
170
cat << 'EOF' > build_and_test.sh
154
171
function build_and_test() {
@@ -237,7 +254,7 @@ jobs:
237
254
chmod +x build_and_test.sh
238
255
239
256
- name : Setup Solana Stable
240
- uses : heyAyushh/setup-solana@v2
257
+ uses : heyAyushh/setup-solana@v2.01
241
258
with :
242
259
solana-cli-version : stable
243
260
- name : Build and Test with Stable
@@ -246,9 +263,10 @@ jobs:
246
263
solana -V
247
264
rustc -V
248
265
solana-keygen new --no-bip39-passphrase --force
266
+ cargo install --quiet steel-cli
249
267
process_projects "stable"
250
268
- name : Setup Solana Beta
251
- uses : heyAyushh/setup-solana@v2
269
+ uses : heyAyushh/setup-solana@v2.01
252
270
with :
253
271
solana-cli-version : beta
254
272
- name : Build and Test with Beta
@@ -257,6 +275,7 @@ jobs:
257
275
solana -V
258
276
rustc -V
259
277
solana-keygen new --no-bip39-passphrase --force
278
+ cargo install --quiet steel-cli
260
279
process_projects "beta"
261
280
262
281
- name : Set failed projects output
0 commit comments