From beed7a297eda152bd7cf4a62ec3e4775c2bb2024 Mon Sep 17 00:00:00 2001 From: Dag Brattli Date: Sat, 1 Aug 2026 09:36:07 +0200 Subject: [PATCH] ci: gate the Fable compile targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #29. #25 got src compiling for BEAM, JS and Python, but CI only ever ran the .NET job. Nothing stopped a later change to src/ from silently breaking a target — the failure would stay invisible until someone ran `just test-` by hand. The cross-target suites cannot gate anything yet (JS 82/84, Python 79/84, BEAM 14/84), but compilation is binary and already green on all three, so gate that. A matrix job with fail-fast off, one runner per target, so a break in one does not mask the state of the others. Nothing is executed, only compiled, so the job needs no Node, uv, rebar3 or erl — just the `fable` tool already pinned in .config/dotnet-tools.json. Verified locally: `dotnet fable src --lang ` exits 0 for all three. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/build-and-test.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 56d9183..4ba3754 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -30,3 +30,34 @@ jobs: # running anything. - name: Test run: dotnet run --project test --configuration Release --no-restore + + # Compile-only gate for the Fable targets. The cross-target *suites* are not green yet + # (JS 82/84, Python 79/84, BEAM 14/84 — see CLAUDE.md), so they cannot gate anything, but + # compilation is binary and already passes on all three. This keeps a change to src/ from + # silently breaking a target between manual `just test-` runs. + # + # Nothing is executed, only compiled, so no Node, uv, rebar3 or erl is needed. + # fail-fast is off so one broken target does not mask the state of the others. + fable-compile: + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + lang: [beam, javascript, python] + + steps: + - uses: actions/checkout@v5 + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + dotnet-quality: preview + # Pulls the `fable` tool pinned in .config/dotnet-tools.json (5.13.0). + - name: Setup paket + run: dotnet tool restore + - name: Install dependencies + run: dotnet restore + - name: Compile src to ${{ matrix.lang }} + run: dotnet fable src --lang ${{ matrix.lang }} --outDir build/gate-${{ matrix.lang }}