CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
171 lines
6.3 KiB
YAML
171 lines
6.3 KiB
YAML
name: libclang ABI Tests
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'release/**'
|
|
paths:
|
|
- 'clang/**'
|
|
- '.github/workflows/libclang-abi-tests.yml'
|
|
pull_request:
|
|
branches:
|
|
- 'release/**'
|
|
paths:
|
|
- 'clang/**'
|
|
- '.github/workflows/libclang-abi-tests.yml'
|
|
|
|
concurrency:
|
|
# Skip intermediate builds: always.
|
|
# Cancel intermediate builds: only if it is a pull request build.
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
|
|
|
|
jobs:
|
|
abi-dump-setup:
|
|
if: github.repository_owner == 'llvm'
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
|
|
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
|
|
ABI_LIBS: ${{ steps.vars.outputs.ABI_LIBS }}
|
|
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
|
|
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.major }}
|
|
LLVM_VERSION_MINOR: ${{ steps.version.outputs.minor }}
|
|
LLVM_VERSION_PATCH: ${{ steps.version.outputs.patch }}
|
|
steps:
|
|
- name: Checkout source
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 250
|
|
|
|
- name: Get LLVM version
|
|
id: version
|
|
uses: ./.github/workflows/get-llvm-version
|
|
|
|
- name: Setup Variables
|
|
id: vars
|
|
env:
|
|
VERSION_MAJOR: ${{ steps.version.outputs.major }}
|
|
VERSION_PATCH: ${{ steps.version.outputs.patch }}
|
|
run: |
|
|
remote_repo='https://github.com/llvm/llvm-project'
|
|
if [ $VERSION_PATCH -eq 0 ]; then
|
|
major_version=$(( $VERSION_MAJOR - 1))
|
|
baseline_ref="llvmorg-$major_version.1.0"
|
|
|
|
# If there is a minor release, we want to use that as the base line.
|
|
minor_ref=$(git ls-remote --refs -t "$remote_repo" llvmorg-"$major_version".[1-9].[0-9] | tail -n1 | grep -o 'llvmorg-.\+' || true)
|
|
if [ -n "$minor_ref" ]; then
|
|
baseline_ref="$minor_ref"
|
|
else
|
|
# Check if we have a release candidate
|
|
rc_ref=$(git ls-remote --refs -t "$remote_repo" llvmorg-"$major_version".[1-9].[0-9]-rc* | tail -n1 | grep -o 'llvmorg-.\+' || true)
|
|
if [ -n "$rc_ref" ]; then
|
|
baseline_ref="$rc_ref"
|
|
fi
|
|
fi
|
|
{
|
|
echo "BASELINE_VERSION_MAJOR=$major_version"
|
|
echo "BASELINE_REF=$baseline_ref"
|
|
echo "ABI_HEADERS=clang-c"
|
|
echo "ABI_LIBS=libclang.so"
|
|
} >> "$GITHUB_OUTPUT"
|
|
else
|
|
{
|
|
echo "BASELINE_VERSION_MAJOR=$VERSION_MAJOR"
|
|
echo "BASELINE_REF=llvmorg-$VERSION_MAJOR.1.0"
|
|
echo "ABI_HEADERS=."
|
|
echo "ABI_LIBS=libclang.so libclang-cpp.so"
|
|
} >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
abi-dump:
|
|
if: github.repository_owner == 'llvm'
|
|
needs: abi-dump-setup
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:cb3aea3ecdd521194ca12cfa239ab5a53f9e160a13a55ae3abdc1dfbf134476e" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
|
|
strategy:
|
|
matrix:
|
|
name:
|
|
- build-baseline
|
|
- build-latest
|
|
include:
|
|
- name: build-baseline
|
|
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
|
|
ref: ${{ needs.abi-dump-setup.outputs.BASELINE_REF }}
|
|
repo: llvm/llvm-project
|
|
- name: build-latest
|
|
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}
|
|
ref: ${{ github.sha }}
|
|
repo: ${{ github.repository }}
|
|
steps:
|
|
- name: Download source code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
ref: ${{ matrix.ref }}
|
|
repository: ${{ matrix.repo }}
|
|
- name: Configure
|
|
run: |
|
|
mkdir install
|
|
cmake -B build -S llvm -G Ninja -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
|
|
- name: Build
|
|
env:
|
|
ABI_LIBS: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}
|
|
run: ninja -C build/ $ABI_LIBS install-clang-headers
|
|
- name: Dump ABI
|
|
env:
|
|
REF: ${{ matrix.ref }}
|
|
ABI_HEADERS: ${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}
|
|
run: |
|
|
parallel abi-dumper -lver "$REF" -skip-cxx -public-headers ./install/include/$ABI_HEADERS -o {}-$REF.abi ./build/lib/{} ::: $ABI_LIBS
|
|
for lib in $ABI_LIBS; do
|
|
# Remove symbol versioning from dumps, so we can compare across major versions.
|
|
sed -i 's/LLVM_[0-9]\+/LLVM_NOVERSION/' $lib-$REF.abi
|
|
done
|
|
- name: Upload ABI file
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: ${{ matrix.name }}
|
|
path: '*${{ matrix.ref }}.abi'
|
|
|
|
abi-compare:
|
|
if: github.repository_owner == 'llvm'
|
|
runs-on: ubuntu-24.04
|
|
container:
|
|
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:cb3aea3ecdd521194ca12cfa239ab5a53f9e160a13a55ae3abdc1dfbf134476e" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
|
|
needs:
|
|
- abi-dump-setup
|
|
- abi-dump
|
|
steps:
|
|
- name: Download baseline
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: build-baseline
|
|
path: build-baseline
|
|
- name: Download latest
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: build-latest
|
|
path: build-latest
|
|
|
|
- name: Compare ABI
|
|
env:
|
|
ABI_LIBS: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}
|
|
run: |
|
|
for lib in $ABI_LIBS; do
|
|
abi-compliance-checker -lib $lib -old build-baseline/$lib*.abi -new build-latest/$lib*.abi
|
|
done
|
|
- name: Upload ABI Comparison
|
|
if: always()
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: compat-report-${{ github.sha }}
|
|
path: compat_reports/
|