From adf90ff2d0d910fea9880648936ce70b28d35bc5 Mon Sep 17 00:00:00 2001 From: Cass Date: Tue, 7 Jul 2026 22:31:32 -0500 Subject: [PATCH 1/3] ci(release): publish built artifacts even when some targets fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `release` job used `needs: build` with no `if:`, so a single failed matrix leg (currently the slow CUDA/SYCL source builds) skipped the whole release — discarding the CPU, Vulkan, and macOS binaries that built fine minutes earlier. Add `if: ${{ !cancelled() }}` so the release job runs after the build matrix regardless of individual failures, publishing whatever artifacts were uploaded. Failed legs upload nothing and are simply absent from the release. If every target failed (zero artifacts) the job errors instead of cutting an empty release. The overall run still goes red when a target fails, keeping the failure visible. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d2b7ca..4e6902b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -160,6 +160,11 @@ jobs: release: name: Create Release needs: build + # Run even if some build targets failed, so the binaries that *did* build + # still get published. `!cancelled()` still skips on a manual cancellation. + # Failed matrix legs upload no artifact, so they are simply absent from the + # release; the overall run stays red to keep the failures visible. + if: ${{ !cancelled() }} runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 @@ -167,9 +172,21 @@ jobs: merge-multiple: true - name: List artifacts - run: ls -la autocommit-* + id: artifacts + run: | + ls -la autocommit-* 2>/dev/null || true + count=$(ls autocommit-*.tar.gz 2>/dev/null | wc -l) + echo "count=${count}" >> "$GITHUB_OUTPUT" + echo "Found ${count} release artifact(s) to publish." + + - name: Fail if nothing built + if: steps.artifacts.outputs.count == '0' + run: | + echo "::error::No build artifacts were produced — every target failed." + exit 1 - uses: softprops/action-gh-release@v2 + if: steps.artifacts.outputs.count != '0' with: generate_release_notes: true files: | From 0e8fdccacccb29aeb34c3f50b384dd600b0e6998 Mon Sep 17 00:00:00 2001 From: Cass Date: Tue, 7 Jul 2026 22:31:32 -0500 Subject: [PATCH 2/3] fix(build): no-op llama_params_fit in the from-source build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After pinning the submodule to b9837 (#42), the CUDA and SYCL source builds compiled the full tree (~15 min) and then failed: autocommit_common_bridge.cpp:662: error: 'llama_params_fit' was not declared in this scope The bridge guarded llama_params_fit behind `#ifdef LLAMA_CPP_PREBUILT`, no-oping it for the binary release but still calling it from source. b9837 does not expose that public symbol in either mode — the fitting logic moved into libcommon's internal common/fit.cpp. Drop the source branch and no-op unconditionally, matching the prebuilt backends that already ship. Verified: the bridge compiles against b9837 in both modes (with and without -DLLAMA_CPP_PREBUILT). Co-Authored-By: Claude Opus 4.8 --- .../src/autocommit_common_bridge.cpp | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/crates/llama-sys/src/autocommit_common_bridge.cpp b/crates/llama-sys/src/autocommit_common_bridge.cpp index 9a3ff47..9c9d404 100644 --- a/crates/llama-sys/src/autocommit_common_bridge.cpp +++ b/crates/llama-sys/src/autocommit_common_bridge.cpp @@ -645,10 +645,12 @@ int autocommit_llama_params_fit( size_t * margins, uint32_t n_ctx_min, int log_level) { -#ifdef LLAMA_CPP_PREBUILT - // llama_params_fit is not available in the b9837 binary release. - // Skip fitting and return success — the caller will load the model - // with whatever params were configured. + // llama_params_fit is not exposed by the pinned llama.cpp release (b9837) + // in either build mode: the binary release omits it, and in the from-source + // build the fitting logic lives in libcommon's internal common/fit.cpp with + // no matching public `llama_params_fit` symbol. Skip fitting and return + // success — the caller loads the model with whatever params were configured. + // This matches the behavior of the prebuilt backends that already ship. (void)path_model; (void)mparams; (void)cparams; @@ -658,17 +660,6 @@ int autocommit_llama_params_fit( (void)n_ctx_min; (void)log_level; return 0; -#else - return llama_params_fit( - path_model, - mparams, - cparams, - tensor_split, - tensor_buft_overrides, - margins, - n_ctx_min, - static_cast(log_level)); -#endif } } // extern "C" From e3950daef501ba13add99863f29aa5ed992967e0 Mon Sep 17 00:00:00 2001 From: Cass Date: Tue, 7 Jul 2026 22:37:58 -0500 Subject: [PATCH 3/3] docs(release): clarify why the release job uses !cancelled() not always() Addresses review feedback. !cancelled() does run when a needs leg fails (including a status function overrides Actions' implicit success() gate) and, unlike always(), still skips a manually cancelled run. No behavior change. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e6902b..9e79672 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,9 +161,12 @@ jobs: name: Create Release needs: build # Run even if some build targets failed, so the binaries that *did* build - # still get published. `!cancelled()` still skips on a manual cancellation. - # Failed matrix legs upload no artifact, so they are simply absent from the - # release; the overall run stays red to keep the failures visible. + # still get published. Including a status function overrides Actions' + # implicit success() gate, so `!cancelled()` runs even when a `needs` leg + # failed — while still skipping a manually cancelled run (unlike always(), + # which would cut a release from a cancelled build). Failed matrix legs + # upload no artifact, so they're simply absent from the release; the overall + # run stays red to keep the failures visible. if: ${{ !cancelled() }} runs-on: ubuntu-latest steps: