Skip to content

Commit 9c802b0

Browse files
committed
fix(ci): continue building remaining targets when one fails
Track failed targets and report all failures at the end instead of stopping at the first build failure. This lets CI validate as many packages as possible in a single run.
1 parent 6053256 commit 9c802b0

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,14 @@ jobs:
150150
echo "Building changed targets: $TARGETS"
151151
fi
152152
153+
FAILED=""
153154
for target in $TARGETS; do
154155
echo "=== Building $target ==="
155-
xmake build -P . -y "$target"
156+
if ! xmake build -P . -y "$target"; then
157+
echo "FAILED to build $target"
158+
FAILED="$FAILED $target"
159+
continue
160+
fi
156161
157162
if [ "$target" = "llmapi_test" ]; then
158163
echo "Skipping run for $target (requires API key)"
@@ -167,6 +172,11 @@ jobs:
167172
fi
168173
done
169174
175+
if [ -n "$FAILED" ]; then
176+
echo "::error::Failed targets:$FAILED"
177+
exit 1
178+
fi
179+
170180
- name: Build and test (windows)
171181
if: runner.os == 'Windows'
172182
working-directory: tests
@@ -196,9 +206,15 @@ jobs:
196206
Write-Host "Building changed targets: $($targets -join ', ')"
197207
}
198208
209+
$failed = @()
199210
foreach ($target in $targets) {
200211
Write-Host "=== Building $target ==="
201212
xmake build -P . -y $target
213+
if ($LASTEXITCODE -ne 0) {
214+
Write-Host "FAILED to build $target"
215+
$failed += $target
216+
continue
217+
}
202218
203219
if ($target -eq "llmapi_test") {
204220
Write-Host "Skipping run for $target (requires API key)"
@@ -212,3 +228,8 @@ jobs:
212228
xmake run -P . $target
213229
}
214230
}
231+
232+
if ($failed.Count -gt 0) {
233+
Write-Error "Failed targets: $($failed -join ', ')"
234+
exit 1
235+
}

0 commit comments

Comments
 (0)