From 4df29be4f4c3673f428170fda944a5b19f743bb8 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Sun, 16 Aug 2026 14:53:13 +0200 Subject: [PATCH] ci : fix dry-run reporting in make-release job [no ci] (#27167) This commit fixes the reporting in the make-release CI job when --dry-run is used. It will currently incorrectly report that all checks pass even if there are steps that fail. Refs: https://github.com/ggml-org/llama.cpp/pull/26839#issuecomment-5306189828 --- .github/workflows/make-release.yml | 9 +++++++-- scripts/make-release-checks.sh | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index fed9c877c..57229b5ae 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -42,5 +42,10 @@ jobs: - name: Dry run summary if: ${{ github.event.inputs.dry_run == 'true' }} run: | - echo "Dry run complete - all checks passed." - echo "Would have created tag: ${{ steps.checks.outputs.version }}" + if [[ "${{ steps.checks.outputs.checks_passed }}" == "true" ]]; then + echo "Dry run complete - all checks passed." + echo "Would have created tag: ${{ steps.checks.outputs.version }}" + else + echo "::error::Dry run found release check failures. A release tag would not be created." + exit 1 + fi diff --git a/scripts/make-release-checks.sh b/scripts/make-release-checks.sh index c8c632284..8d0e5490b 100755 --- a/scripts/make-release-checks.sh +++ b/scripts/make-release-checks.sh @@ -11,6 +11,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" DRY_RUN=false +CHECKS_PASSED=true for arg in "$@"; do case "$arg" in --dry-run) DRY_RUN=true ;; @@ -44,6 +45,7 @@ else if [[ "$RUNS" -eq 0 ]]; then if [[ "$DRY_RUN" == "true" ]]; then echo "Warning: no successful release.yml run found for HEAD (${SHA}) (dry run, continuing)." + CHECKS_PASSED=false else echo "Error: no successful release.yml run found for HEAD (${SHA})" echo "The nightly build must complete successfully before making a release." @@ -73,6 +75,7 @@ else echo "$DIFF" if [[ "$DRY_RUN" == "true" ]]; then echo "Warning: would abort release due to ggml mismatch (dry run, continuing)." + CHECKS_PASSED=false else echo "Error: ggml must match upstream before making a release." exit 1 @@ -81,3 +84,7 @@ else echo "local ggml/ matches upstream ${GGML_VERSION}" fi fi + +if [[ -n "${GITHUB_OUTPUT:-}" ]]; then + echo "checks_passed=${CHECKS_PASSED}" >> "$GITHUB_OUTPUT" +fi