Skip to content

Commit e395585

Browse files
committed
fixes returns
1 parent cda04aa commit e395585

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

.github/workflows/steel.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,16 @@ jobs:
112112
run: |
113113
readarray -t all_projects < <(echo '${{ needs.changes.outputs.changed_projects }}' | jq -r '.[]?')
114114
for project in "${all_projects[@]}"; do
115-
if [ -f "${project}/Cargo.toml" ]; then
116-
echo "::group::Checking ${project}"
117-
cd "${project}"
118-
cargo fmt --check
119-
cargo clippy --all-features -- -D warnings
120-
cd - > /dev/null
121-
echo "::endgroup::"
115+
echo "::group::Checking ${project}"
116+
if [ ! -f "${project}/Cargo.toml" ]; then
117+
echo "::error::No Cargo.toml found in ${project}"
118+
exit 1
122119
fi
120+
cd "${project}"
121+
cargo fmt --check
122+
cargo clippy --all-features -- -D warnings
123+
cd - > /dev/null
124+
echo "::endgroup::"
123125
done
124126
125127
build-and-test:
@@ -157,6 +159,7 @@ jobs:
157159
id: setup
158160
run: |
159161
npm install --global pnpm
162+
160163
# Create the build and test function
161164
cat << 'EOF' > build_and_test.sh
162165
function build_and_test() {
@@ -197,7 +200,7 @@ jobs:
197200
cd - > /dev/null
198201
return 1
199202
fi
200-
203+
201204
# Build
202205
if ! steel build; then
203206
echo "::error::steel build failed for $project"
@@ -214,7 +217,7 @@ jobs:
214217
return 1
215218
fi
216219
fi
217-
220+
218221
echo "Build and tests succeeded for $project with $solana_version version."
219222
cd - > /dev/null
220223
return 0

basics/hello-solana/steel/cargo.toml renamed to basics/hello-solana/steel/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "2"
3-
members = ["program"]
3+
members = ["api", "program"]
44

55
[workspace.package]
66
version = "0.1.0"
@@ -13,9 +13,10 @@ readme = "./README.md"
1313
keywords = ["solana"]
1414

1515
[workspace.dependencies]
16+
hello-solana-api = { path = "./api", version = "0.1.0" }
1617
bytemuck = "1.14"
1718
num_enum = "0.7"
1819
solana-program = "1.18"
1920
steel = "2.0"
2021
thiserror = "1.0"
21-
solana-sdk = "1.18"
22+
solana-sdk = "1.18"

0 commit comments

Comments
 (0)