Skip to content

Commit d76ece4

Browse files
committed
fix(ci): add verification step for downloaded build artifacts
Add explicit verification that bootstrap and dependency artifacts were successfully downloaded before proceeding with builds. This will catch artifact download issues early with clear error messages. Verification steps check: - build-smol.yml: bootstrap-smol.js (required by smol builder) - build-sea.yml: bootstrap-npm.js, socket/dist, cli/dist (required by SEA) If artifacts are missing, build fails immediately with descriptive error instead of failing later with cryptic MODULE_NOT_FOUND errors. Related to previous fix (1d8f676) which made bootstrap copy failures explicit in the build script.
1 parent 1d8f676 commit d76ece4

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/build-sea.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,30 @@ jobs:
139139
name: build-deps-${{ github.sha }}
140140
path: packages/
141141

142+
- name: Verify build artifacts
143+
shell: bash
144+
run: |
145+
echo "=== Verifying downloaded build artifacts ==="
146+
ls -lh packages/bootstrap/dist/ || echo "⚠️ bootstrap/dist/ not found"
147+
ls -lh packages/socket/dist/ || echo "⚠️ socket/dist/ not found"
148+
ls -lh packages/cli/dist/ || echo "⚠️ cli/dist/ not found"
149+
150+
# Check critical files
151+
if [ ! -f packages/bootstrap/dist/bootstrap-npm.js ]; then
152+
echo "❌ ERROR: bootstrap-npm.js not found!"
153+
exit 1
154+
fi
155+
if [ ! -f packages/socket/dist/index.mjs ]; then
156+
echo "❌ ERROR: socket package not built!"
157+
exit 1
158+
fi
159+
if [ ! -f packages/cli/dist/cli.mjs ]; then
160+
echo "❌ ERROR: CLI not built!"
161+
exit 1
162+
fi
163+
164+
echo "✓ Build artifacts verified"
165+
142166
- name: Setup Node.js
143167
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
144168
with:

.github/workflows/build-smol.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,21 @@ jobs:
131131
name: build-deps-smol-${{ github.sha }}
132132
path: packages/
133133

134+
- name: Verify bootstrap artifacts
135+
shell: bash
136+
run: |
137+
echo "=== Verifying downloaded bootstrap artifacts ==="
138+
ls -lh packages/bootstrap/dist/ || echo "⚠️ bootstrap/dist/ not found"
139+
ls -lh packages/socket/dist/ || echo "⚠️ socket/dist/ not found"
140+
141+
if [ ! -f packages/bootstrap/dist/bootstrap-smol.js ]; then
142+
echo "❌ ERROR: bootstrap-smol.js not found!"
143+
echo "This file is required by the smol builder."
144+
exit 1
145+
fi
146+
147+
echo "✓ Bootstrap artifacts verified"
148+
134149
- name: Setup Node.js
135150
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
136151
with:

0 commit comments

Comments
 (0)