fix(ci): retry compiler crashes
CI and Deploy / test (push) Successful in 5m58s
CI and Deploy / deploy (push) Successful in 7m4s

This commit is contained in:
cesnimda
2026-08-27 20:27:31 +02:00
parent 61befc16d8
commit 6b3acf7b07
+15 -2
View File
@@ -63,7 +63,15 @@ jobs:
run: python3 scripts/test-ollama-evaluation.py run: python3 scripts/test-ollama-evaluation.py
- name: Build backend - name: Build backend
run: dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release # Roslyn has intermittently exited 139 on this resource-constrained runner after a
# successful restore. Retry once without compiler-server or parallel build processes;
# the same complete project is still compiled and warnings/errors remain fatal.
run: |
dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \
|| ( echo "Backend compiler crashed ($?) — retrying single-process..." \
&& dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \
--no-restore --disable-build-servers --maxcpucount:1 \
/p:UseSharedCompilation=false /p:BuildInParallel=false )
# The "Build backend" step above only builds JobTrackerApi, so the test project needs its own # The "Build backend" step above only builds JobTrackerApi, so the test project needs its own
# restore + build. These are separate steps on purpose: this runner is flaky (see the SDK and # restore + build. These are separate steps on purpose: this runner is flaky (see the SDK and
@@ -76,7 +84,12 @@ jobs:
restore || ( echo "NuGet restore failed ($?) — retrying once..." && restore ) restore || ( echo "NuGet restore failed ($?) — retrying once..." && restore )
- name: Build backend tests - name: Build backend tests
run: dotnet build JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --configuration Release --no-restore run: |
dotnet build JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --configuration Release --no-restore \
|| ( echo "Test compiler crashed ($?) — retrying single-process..." \
&& dotnet build JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --configuration Release \
--no-restore --disable-build-servers --maxcpucount:1 \
/p:UseSharedCompilation=false /p:BuildInParallel=false )
# Restore and build both pass on this runner, but the test run dies after ~3s -- far too fast to # Restore and build both pass on this runner, but the test run dies after ~3s -- far too fast to
# have executed 306 tests. The suite passes on Windows, in a clean Linux container, under a 1GB # have executed 306 tests. The suite passes on Windows, in a clean Linux container, under a 1GB