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
This commit is contained in:
Daniel Bevenius
2026-08-16 14:53:13 +02:00
committed by GitHub
parent 3cb7ffb1a1
commit 4df29be4f4
2 changed files with 14 additions and 2 deletions
+5
View File
@@ -42,5 +42,10 @@ jobs:
- name: Dry run summary - name: Dry run summary
if: ${{ github.event.inputs.dry_run == 'true' }} if: ${{ github.event.inputs.dry_run == 'true' }}
run: | run: |
if [[ "${{ steps.checks.outputs.checks_passed }}" == "true" ]]; then
echo "Dry run complete - all checks passed." echo "Dry run complete - all checks passed."
echo "Would have created tag: ${{ steps.checks.outputs.version }}" 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
+7
View File
@@ -11,6 +11,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
DRY_RUN=false DRY_RUN=false
CHECKS_PASSED=true
for arg in "$@"; do for arg in "$@"; do
case "$arg" in case "$arg" in
--dry-run) DRY_RUN=true ;; --dry-run) DRY_RUN=true ;;
@@ -44,6 +45,7 @@ else
if [[ "$RUNS" -eq 0 ]]; then if [[ "$RUNS" -eq 0 ]]; then
if [[ "$DRY_RUN" == "true" ]]; then if [[ "$DRY_RUN" == "true" ]]; then
echo "Warning: no successful release.yml run found for HEAD (${SHA}) (dry run, continuing)." echo "Warning: no successful release.yml run found for HEAD (${SHA}) (dry run, continuing)."
CHECKS_PASSED=false
else else
echo "Error: no successful release.yml run found for HEAD (${SHA})" echo "Error: no successful release.yml run found for HEAD (${SHA})"
echo "The nightly build must complete successfully before making a release." echo "The nightly build must complete successfully before making a release."
@@ -73,6 +75,7 @@ else
echo "$DIFF" echo "$DIFF"
if [[ "$DRY_RUN" == "true" ]]; then if [[ "$DRY_RUN" == "true" ]]; then
echo "Warning: would abort release due to ggml mismatch (dry run, continuing)." echo "Warning: would abort release due to ggml mismatch (dry run, continuing)."
CHECKS_PASSED=false
else else
echo "Error: ggml must match upstream before making a release." echo "Error: ggml must match upstream before making a release."
exit 1 exit 1
@@ -81,3 +84,7 @@ else
echo "local ggml/ matches upstream ${GGML_VERSION}" echo "local ggml/ matches upstream ${GGML_VERSION}"
fi fi
fi fi
if [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "checks_passed=${CHECKS_PASSED}" >> "$GITHUB_OUTPUT"
fi