Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit aa11088

Browse files
bowlofarugulaclaude
andcommitted
fix(ci): update workflows for split Cargo workspaces
- Update build-wasm to build in components/ directory - Update rust lint/test to run in both sdk/ and components/ - Update prepare-release cargo commands to use correct directories - Fix paths for WASM size checks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent db62c00 commit aa11088

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,14 @@ jobs:
186186
toolchain: ${{ env.RUST_VERSION }}
187187

188188
- name: Check formatting
189-
run: cargo fmt --all -- --check
189+
run: |
190+
cd sdk && cargo fmt --all -- --check
191+
cd ../components && cargo fmt --all -- --check
190192
191193
- name: Run Clippy
192-
run: cargo clippy --workspace --all-targets -- -D warnings
194+
run: |
195+
cd sdk && cargo clippy --workspace --all-targets -- -D warnings
196+
cd ../components && cargo clippy --workspace --all-targets -- -D warnings
193197
194198
rust-test:
195199
name: Rust Test
@@ -217,9 +221,9 @@ jobs:
217221

218222
- name: Generate coverage
219223
run: |
220-
cargo llvm-cov --workspace --all-features \
224+
cd sdk && cargo llvm-cov --workspace --all-features \
221225
--target x86_64-unknown-linux-gnu \
222-
--lcov --output-path lcov.info || true
226+
--lcov --output-path ../lcov.info || true
223227
224228
225229
@@ -239,16 +243,16 @@ jobs:
239243

240244
- name: Build all WASM components
241245
run: |
242-
cargo build --workspace --release --target wasm32-wasip1
246+
cd components && cargo build --workspace --release --target wasm32-wasip1
243247
244248
- name: Check WASM file sizes
245249
run: |
246250
echo "WASM Component Sizes:"
247251
echo "====================="
248-
ls -lh target/wasm32-wasip1/release/*.wasm | awk '{print $5, $9}'
252+
ls -lh components/target/wasm32-wasip1/release/*.wasm | awk '{print $5, $9}'
249253
250254
# Fail if any WASM is over 10MB
251-
for wasm in target/wasm32-wasip1/release/*.wasm; do
255+
for wasm in components/target/wasm32-wasip1/release/*.wasm; do
252256
size=$(stat -c%s "$wasm" 2>/dev/null || stat -f%z "$wasm" 2>/dev/null)
253257
if [ "$size" -gt 10485760 ]; then
254258
echo "::error::$(basename $wasm) is over 10MB ($size bytes)"

.github/workflows/prepare-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ jobs:
206206
echo "Updated ftl-sdk dependency on ftl-sdk-macros to $NEW_VERSION"
207207
fi
208208
209-
# Update Cargo.lock - use workspace flag to avoid scanning subdirectories
210-
cargo update --workspace -p ftl-sdk --precise "$NEW_VERSION" || true
211-
cargo update --workspace -p ftl-sdk-macros --precise "$NEW_VERSION" || true
209+
# Update Cargo.lock
210+
cd sdk && cargo update --workspace -p ftl-sdk --precise "$NEW_VERSION" || true
211+
cd sdk && cargo update --workspace -p ftl-sdk-macros --precise "$NEW_VERSION" || true
212212
213-
git add "$VERSIONS_FILE" sdk/rust/Cargo.toml sdk/rust-macros/Cargo.toml Cargo.lock
213+
git add "$VERSIONS_FILE" sdk/rust/Cargo.toml sdk/rust-macros/Cargo.toml sdk/Cargo.lock
214214
;;
215215
sdk-typescript)
216216
# Update manifest
@@ -266,9 +266,9 @@ jobs:
266266
sed -i "s/^version = \".*\"/version = \"$NEW_VERSION\"/" "components/${COMPONENT}/Cargo.toml"
267267
268268
# Update Cargo.lock - components use ftl- prefix in package names
269-
cargo update --workspace -p "ftl-${COMPONENT}" --precise "$NEW_VERSION" || cargo update --workspace -p "ftl-${COMPONENT}" || true
269+
cd components && cargo update --workspace -p "ftl-${COMPONENT}" --precise "$NEW_VERSION" || cargo update --workspace -p "ftl-${COMPONENT}" || true
270270
271-
git add "$VERSIONS_FILE" "components/${COMPONENT}/Cargo.toml" Cargo.lock
271+
git add "$VERSIONS_FILE" "components/${COMPONENT}/Cargo.toml" components/Cargo.lock
272272
273273
# Update component versions in examples if they exist
274274
echo "Updating component references in examples..."

0 commit comments

Comments
 (0)