ci : added ABI reports as github artifact (#30619)

This commit is contained in:
Sandro Hanea 2026-10-17 11:41:53 +02:00 • committed by GitHub
parent 1268edac57
commit 83f9389419
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 1 deletions

View file

@ -61,8 +61,17 @@ jobs:
RELEASE_BRANCH: ${{ github.ref_name }}
SKIP_APIABI_CHECK: ${{ github.event.inputs.skip_apiabi_check }}
APIABI_COMPARE_TAG: ${{ github.event.inputs.apiabi_compare_tag }}
APIABI_REPORT_DIR: ${{ runner.temp }}/apiabi-reports
REQUIRE_DOCKER: ${{ github.event.inputs.require_docker }}
- name: Upload API/ABI reports
if: ${{ always() && github.event.inputs.skip_apiabi_check != 'true' }}
uses: actions/upload-artifact@v7
with:
name: apiabi-reports
path: ${{ runner.temp }}/apiabi-reports
if-no-files-found: ignore
- name: Create release tag
if: ${{ github.event.inputs.dry_run == 'false' }}
run: |

View file

@ -15,6 +15,7 @@
# Environment:
# SKIP_APIABI_CHECK: set to 1 or true to skip
# APIABI_COMPARE_TAG: equivalent to --tag (used by CI)
# APIABI_REPORT_DIR: preserve reports and dumps in this directory, even if the comparison fails
set -euo pipefail
@ -113,4 +114,15 @@ cmake --build "$BUILD_NEW" --parallel "$(nproc)"
(cd "$WORKTREE_DIR" && "$SCRIPT_DIR/check-apiabi-compat.sh" --include-path ggml/include --generate "$BUILD_OLD" "${LIBS[@]}")
(cd "$REPO_ROOT" && "$SCRIPT_DIR/check-apiabi-compat.sh" --include-path ggml/include --generate "$BUILD_NEW" "${LIBS[@]}")
(cd "$REPO_ROOT" && "$SCRIPT_DIR/check-apiabi-compat.sh" "${CHECK_FLAGS[@]}" --check "$BUILD_OLD" "$BUILD_NEW")
CHECK_RESULT=0
(cd "$REPO_ROOT" && "$SCRIPT_DIR/check-apiabi-compat.sh" "${CHECK_FLAGS[@]}" --check "$BUILD_OLD" "$BUILD_NEW") || CHECK_RESULT=$?
if [[ -n "${APIABI_REPORT_DIR:-}" ]]; then
mkdir -p "$APIABI_REPORT_DIR/old" "$APIABI_REPORT_DIR/new"
cp -R "$BUILD_OLD/apiabi/." "$APIABI_REPORT_DIR/old/"
cp -R "$BUILD_NEW/apiabi/." "$APIABI_REPORT_DIR/new/"
echo "API/ABI reports saved to $APIABI_REPORT_DIR"
fi
exit "$CHECK_RESULT"