From 1f4d6dd5b2fa316af030eefe791663c533fe937e Mon Sep 17 00:00:00 2001 From: stack72 Date: Thu, 30 Apr 2026 23:19:43 +0100 Subject: [PATCH] ci: smoke-test the compiled binary on Linux + Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a step after `deno task compile` that runs `--version` and `--help` against the produced binary. Compiling proves the binary builds; running these proves it actually boots, registers the command tree, and exits cleanly — catching runtime regressions (e.g. a top-level import that throws on load) that the compile step alone doesn't surface. Both commands run without a repository, so the smoke test is hermetic and adds no I/O. `--help` is piped to /dev/null since the output is verbose. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fadbd55d..d9fe6180 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,21 @@ jobs: - name: Compile binary run: deno task compile + - name: Smoke test compiled binary + # Compiling proves the binary builds; running --version and --help + # proves it actually boots, registers the command tree, and exits + # cleanly. Catches runtime regressions (e.g. a top-level import + # that throws on load) that the compile step alone doesn't. + shell: bash + run: | + if [ "$RUNNER_OS" = "Windows" ]; then + binary="./swamp.exe" + else + binary="./swamp" + fi + "$binary" --version + "$binary" --help > /dev/null + deps-audit: name: Dependency Audit runs-on: ubuntu-latest