Mirror of github.com/getsigit/si.
Mirrored from https://github.com/getsigit/si.git
Synced Nov 24, 08:15 UTC
Make the NuGet smoke test fail when the binary is bad
Write-Error is non-terminating, so a package without the native binary passed the step and could be published. Throw instead. The smoke test also only looked for the file. Run the installed tool with --version and check the exit code and reported version, so a binary that won't load fails here. The Linux job moves to ubuntu-22.04 so it runs against the glibc floor the build targets. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Seto Elkahfi committed
Nov 9, 2026 at 14:28 UTC
a1773441115eaeda0841cc733bbbf60440714690
1 file changed
+18
-2
.github/workflows/release-nuget.yml
+18
-2
@@ -222,7 +222,8 @@ jobs:
222
fail-fast: false
223
matrix:
224
os:
225
- - ubuntu-latest
225
+ # The oldest image, so the smoke test runs the Linux binary against the glibc floor.
226
+ - ubuntu-22.04
227
- windows-2022
228
- macos-26
229
steps:
@@ -290,11 +291,26 @@ jobs:
291
} | Select-Object -First 1
292
293
if (-not $nativeBinary) {
293
- Write-Error "The si native binary for ${runtimeIdentifier} was not bundled in the installed .NET tool package."
294
+ throw "The si native binary for ${runtimeIdentifier} was not bundled in the installed .NET tool package."
295
}
296
297
Write-Host "Found bundled native binary at $($nativeBinary.FullName)"
298
299
+ # Finding the file proves it was packed, not that it loads. Running it catches a missing
300
+ # runtime DLL or a glibc mismatch before the package is published.
301
+ - name: Run the installed tool
302
+ shell: pwsh
303
+ run: |
304
+ $tool = if ($IsWindows) { ".tool/si.exe" } else { ".tool/si" }
305
+ $output = & $tool --version
306
+ if ($LASTEXITCODE -ne 0) {
307
+ throw "si --version exited with code $LASTEXITCODE"
308
+ }
309
+ Write-Host $output
310
+ if (($output -join " ") -notmatch [regex]::Escape($env:RELEASE_VERSION)) {
311
+ throw "si --version did not report $env:RELEASE_VERSION"
312
+ }
313
+
314
publish-nuget:
315
name: Publish to NuGet
316
runs-on: ubuntu-latest