Update web platform tests (url) #190
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ABI Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| abi-check: | |
| name: ABI compatibility check | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 # need full history to find latest tag | |
| - name: Install abigail-tools | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y --no-install-recommends abigail-tools cmake ninja-build g++ | |
| - name: Find latest release tag | |
| id: baseline | |
| run: | | |
| # Find the most recent vX.Y.Z tag that does NOT point to the current HEAD. | |
| # Excluding HEAD ensures we compare against a previous release even when a | |
| # new release tag was just pushed to main alongside this workflow run. | |
| CURRENT_SHA=$(git rev-parse HEAD) | |
| LATEST_TAG=$(git tag --merged HEAD --list 'v*.*.*' --sort=-version:refname | while IFS= read -r tag; do | |
| TAG_SHA=$(git rev-parse "${tag}^{}" 2>/dev/null) | |
| if [ "$TAG_SHA" != "$CURRENT_SHA" ]; then | |
| echo "$tag" | |
| break | |
| fi | |
| done) | |
| if [ -z "$LATEST_TAG" ]; then | |
| echo "No previous release tag found — cannot establish a baseline." | |
| exit 1 | |
| fi | |
| echo "Latest release tag: $LATEST_TAG" | |
| echo "tag=$LATEST_TAG" >> "$GITHUB_OUTPUT" | |
| - name: Checkout baseline | |
| run: | | |
| git worktree add /tmp/ada-baseline ${{ steps.baseline.outputs.tag }} | |
| - name: Check SOVERSION | |
| id: soversion | |
| run: | | |
| BASELINE_SOVERSION=$(grep -oP 'set\(ADA_LIB_SOVERSION "\K[^"]+' /tmp/ada-baseline/CMakeLists.txt) | |
| CURRENT_SOVERSION=$(grep -oP 'set\(ADA_LIB_SOVERSION "\K[^"]+' CMakeLists.txt) | |
| echo "Baseline SOVERSION: $BASELINE_SOVERSION" | |
| echo "Current SOVERSION: $CURRENT_SOVERSION" | |
| echo "baseline=$BASELINE_SOVERSION" >> "$GITHUB_OUTPUT" | |
| echo "current=$CURRENT_SOVERSION" >> "$GITHUB_OUTPUT" | |
| if [ "$BASELINE_SOVERSION" = "$CURRENT_SOVERSION" ]; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Build baseline (latest release) | |
| if: steps.soversion.outputs.changed == 'false' | |
| run: | | |
| cmake -G Ninja -B /tmp/ada-baseline-build /tmp/ada-baseline \ | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
| -DBUILD_SHARED_LIBS=ON \ | |
| -DADA_TESTING=OFF | |
| cmake --build /tmp/ada-baseline-build -j4 | |
| - name: Build current | |
| if: steps.soversion.outputs.changed == 'false' | |
| run: | | |
| cmake -G Ninja -B /tmp/ada-current-build \ | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
| -DBUILD_SHARED_LIBS=ON \ | |
| -DADA_TESTING=OFF | |
| cmake --build /tmp/ada-current-build -j4 | |
| - name: Compare ABI | |
| if: steps.soversion.outputs.changed == 'false' | |
| run: | | |
| abidiff \ | |
| --drop-private-types \ | |
| --no-added-syms \ | |
| --suppressions abi-suppressions.abignore \ | |
| --headers-dir1 /tmp/ada-baseline/include \ | |
| --headers-dir2 include \ | |
| /tmp/ada-baseline-build/src/libada.so \ | |
| /tmp/ada-current-build/src/libada.so | |
| - name: ABI check skipped (SOVERSION bumped) | |
| if: steps.soversion.outputs.changed == 'true' | |
| run: | | |
| echo "ADA_LIB_SOVERSION changed from ${{ steps.soversion.outputs.baseline }} to ${{ steps.soversion.outputs.current }}." | |
| echo "Intentional ABI break acknowledged by SOVERSION bump — skipping abidiff." |