Skip to content

Commit 8c74d41

Browse files
committed
clippy and fmt run fix, steel workspace check
1 parent 4e4a97a commit 8c74d41

File tree

2 files changed

+41
-19
lines changed

2 files changed

+41
-19
lines changed

.github/workflows/steel.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,19 @@ jobs:
102102
components: rustfmt
103103
- uses: mozilla-actions/[email protected]
104104
- name: Run fmt
105+
env:
106+
SCCACHE_GHA_ENABLED: "true"
107+
RUSTC_WRAPPER: "sccache"
105108
run: |
106-
readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]')
109+
echo "Checking projects: ${{ needs.changes.outputs.changed_projects }}"
110+
readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]' | sed 's/^\.//')
111+
echo "Projects to check:"
112+
printf '%s\n' "${projects[@]}"
107113
for project in "${projects[@]}"; do
108-
if [ -f "$project/Cargo.toml" ]; then
109-
cd "$project"
110-
cargo fmt --check
114+
if [ -f "${project}/Cargo.toml" ]; then
115+
echo "Running fmt check in ${project}"
116+
cd "${project}"
117+
cargo fmt --check || exit 1
111118
cd - > /dev/null
112119
fi
113120
done
@@ -124,12 +131,19 @@ jobs:
124131
components: clippy
125132
- uses: mozilla-actions/[email protected]
126133
- name: Run clippy
134+
env:
135+
SCCACHE_GHA_ENABLED: "true"
136+
RUSTC_WRAPPER: "sccache"
127137
run: |
128-
readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]')
138+
echo "Checking projects: ${{ needs.changes.outputs.changed_projects }}"
139+
readarray -t projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]' | sed 's/^\.//')
140+
echo "Projects to check:"
141+
printf '%s\n' "${projects[@]}"
129142
for project in "${projects[@]}"; do
130-
if [ -f "$project/Cargo.toml" ]; then
131-
cd "$project"
132-
cargo clippy -- -D warnings
143+
if [ -f "${project}/Cargo.toml" ]; then
144+
echo "Running clippy in ${project}"
145+
cd "${project}"
146+
cargo clippy --all-features -- -D warnings || exit 1
133147
cd - > /dev/null
134148
fi
135149
done
@@ -146,12 +160,7 @@ jobs:
146160
outputs:
147161
failed_projects: ${{ steps.set-failed.outputs.failed_projects }}
148162
steps:
149-
- uses: actions/checkout@v4
150-
- name: Use Node.js
151-
uses: actions/setup-node@v4
152-
with:
153-
node-version: 20.x
154-
check-latest: true
163+
155164
- name: Setup build environment
156165
id: setup
157166
run: |
@@ -332,3 +341,4 @@ jobs:
332341
else
333342
echo "## :warning: Build and test job was skipped or canceled" >> $GITHUB_STEP_SUMMARY
334343
fi
344+
Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
[workspace]
2-
members = [
3-
"program",
4-
]
52
resolver = "2"
3+
members = ["program"]
64

7-
[profile.release]
8-
overflow-checks = true
5+
[workspace.package]
6+
version = "0.1.0"
7+
edition = "2021"
8+
license = "Apache-2.0"
9+
homepage = ""
10+
documentation = ""
11+
repository = ""
12+
readme = "./README.md"
13+
keywords = ["solana"]
14+
15+
[workspace.dependencies]
16+
bytemuck = "1.14"
17+
num_enum = "0.7"
18+
solana-program = "1.18"
19+
steel = "2.0"
20+
thiserror = "1.0"

0 commit comments

Comments
 (0)