ci: retry corrupt NuGet restores
This commit is contained in:
@@ -60,12 +60,21 @@ jobs:
|
|||||||
# without contacting Ollama, pulling a model, or requiring package installation.
|
# without contacting Ollama, pulling a model, or requiring package installation.
|
||||||
run: python3 scripts/test-ollama-evaluation.py
|
run: python3 scripts/test-ollama-evaluation.py
|
||||||
|
|
||||||
- name: Build backend
|
- name: Restore backend
|
||||||
# Roslyn has intermittently exited 139 on this resource-constrained runner after a
|
# The runner/proxy has occasionally supplied checksum-invalid NuGet cache entries (NU3008).
|
||||||
# successful restore. Retry once without compiler-server or parallel build processes;
|
# Retry from clean HTTP/global caches; signature verification remains enabled.
|
||||||
# the same complete project is still compiled and warnings/errors remain fatal.
|
|
||||||
run: |
|
run: |
|
||||||
dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \
|
restore() { dotnet restore JobTrackerApi/JobTrackerApi.csproj; }
|
||||||
|
restore || ( echo "Backend restore failed ($?) — clearing runner NuGet caches and retrying once..." \
|
||||||
|
&& dotnet nuget locals http-cache --clear \
|
||||||
|
&& dotnet nuget locals global-packages --clear \
|
||||||
|
&& dotnet restore JobTrackerApi/JobTrackerApi.csproj --no-cache )
|
||||||
|
|
||||||
|
- name: Build backend
|
||||||
|
# Roslyn has intermittently exited 139 on this resource-constrained runner. Retry once
|
||||||
|
# without compiler-server or parallel build processes; restore failures are handled above.
|
||||||
|
run: |
|
||||||
|
dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release --no-restore \
|
||||||
|| ( echo "Backend compiler crashed ($?) — retrying single-process..." \
|
|| ( echo "Backend compiler crashed ($?) — retrying single-process..." \
|
||||||
&& dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \
|
&& dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \
|
||||||
--no-restore --disable-build-servers --maxcpucount:1 \
|
--no-restore --disable-build-servers --maxcpucount:1 \
|
||||||
@@ -79,7 +88,10 @@ jobs:
|
|||||||
- name: Restore backend tests
|
- name: Restore backend tests
|
||||||
run: |
|
run: |
|
||||||
restore() { dotnet restore JobTrackerApi.Tests/JobTrackerApi.Tests.csproj; }
|
restore() { dotnet restore JobTrackerApi.Tests/JobTrackerApi.Tests.csproj; }
|
||||||
restore || ( echo "NuGet restore failed ($?) — retrying once..." && restore )
|
restore || ( echo "NuGet restore failed ($?) — clearing runner caches and retrying once..." \
|
||||||
|
&& dotnet nuget locals http-cache --clear \
|
||||||
|
&& dotnet nuget locals global-packages --clear \
|
||||||
|
&& dotnet restore JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --no-cache )
|
||||||
|
|
||||||
- name: Build backend tests
|
- name: Build backend tests
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user