Skip to content

Commit a94e8fe

Browse files
committed
fix(ci): validate yoga WASM cache instead of building on miss
Yoga-layout requires Emscripten SDK which isn't available in CI. Instead of building on cache miss, verify the cache contains the required WASM files and fail with instructions if missing. The cache should be populated from local builds committed to the repo.
1 parent bc126b5 commit a94e8fe

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/provenance.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,17 @@ jobs:
3939
key: yoga-wasm-${{ hashFiles('packages/yoga-layout/package.json', 'packages/yoga-layout/yoga/**') }}
4040
restore-keys: |
4141
yoga-wasm-
42+
- name: Verify yoga-layout WASM cache
43+
run: |
44+
if [ ! -f packages/yoga-layout/build/wasm/yoga.wasm ]; then
45+
echo "❌ yoga-layout WASM not found in cache"
46+
echo "Build yoga-layout locally and push to trigger cache update"
47+
echo "Run: pnpm --filter @socketsecurity/yoga-layout run build"
48+
exit 1
49+
fi
50+
echo "✓ yoga-layout WASM found in cache"
4251
- run: npm install -g npm@latest
4352
- run: pnpm install
44-
- name: Build yoga-layout WASM (if cache miss)
45-
if: steps.cache-yoga.outputs.cache-hit != 'true'
46-
run: pnpm --filter @socketsecurity/yoga-layout run build
4753

4854
# Build and publish 'socket' package (default).
4955
- name: Prepare socket package for publishing

0 commit comments

Comments
 (0)