workflows/libclang-abi-tests: Remove template expansion#199792
Conversation
https://github.com/llvm/llvm-project/security/code-scanning/1627 https://github.com/llvm/llvm-project/security/code-scanning/1628 https://github.com/llvm/llvm-project/security/code-scanning/1629 https://github.com/llvm/llvm-project/security/code-scanning/1630 https://github.com/llvm/llvm-project/security/code-scanning/1631 https://github.com/llvm/llvm-project/security/code-scanning/1632 https://github.com/llvm/llvm-project/security/code-scanning/1633 https://github.com/llvm/llvm-project/security/code-scanning/1634 https://github.com/llvm/llvm-project/security/code-scanning/1635 https://github.com/llvm/llvm-project/security/code-scanning/1636 https://github.com/llvm/llvm-project/security/code-scanning/1637 https://github.com/llvm/llvm-project/security/code-scanning/1638
|
@llvm/pr-subscribers-github-workflow Author: Tom Stellard (tstellar) Changeshttps://github.com/llvm/llvm-project/security/code-scanning/1627 https://github.com/llvm/llvm-project/security/code-scanning/1628 https://github.com/llvm/llvm-project/security/code-scanning/1629 https://github.com/llvm/llvm-project/security/code-scanning/1630 https://github.com/llvm/llvm-project/security/code-scanning/1631 https://github.com/llvm/llvm-project/security/code-scanning/1632 https://github.com/llvm/llvm-project/security/code-scanning/1633 https://github.com/llvm/llvm-project/security/code-scanning/1634 https://github.com/llvm/llvm-project/security/code-scanning/1635 https://github.com/llvm/llvm-project/security/code-scanning/1636 https://github.com/llvm/llvm-project/security/code-scanning/1637 https://github.com/llvm/llvm-project/security/code-scanning/1638 Full diff: https://github.com/llvm/llvm-project/pull/199792.diff 1 Files Affected:
diff --git a/.github/workflows/libclang-abi-tests.yml b/.github/workflows/libclang-abi-tests.yml
index 9b8718d5539aa..b73a2f275b2bc 100644
--- a/.github/workflows/libclang-abi-tests.yml
+++ b/.github/workflows/libclang-abi-tests.yml
@@ -49,10 +49,13 @@ jobs:
- 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 [ ${{ steps.version.outputs.patch }} -eq 0 ]; then
- major_version=$(( ${{ steps.version.outputs.major }} - 1))
+ 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.
@@ -74,8 +77,8 @@ jobs:
} >> "$GITHUB_OUTPUT"
else
{
- echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.major }}"
- echo "BASELINE_REF=llvmorg-${{ steps.version.outputs.major }}.1.0"
+ 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"
@@ -113,13 +116,18 @@ jobs:
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
- run: ninja -C build/ ${{ needs.abi-dump-setup.outputs.ABI_LIBS }} install-clang-headers
+ 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 ${{ matrix.ref }} -skip-cxx -public-headers ./install/include/${{ needs.abi-dump-setup.outputs.ABI_HEADERS }} -o {}-${{ matrix.ref }}.abi ./build/lib/{} ::: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}
- for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
+ 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-${{ matrix.ref }}.abi
+ sed -i 's/LLVM_[0-9]\+/LLVM_NOVERSION/' $lib-$REF.abi
done
- name: Upload ABI file
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -148,8 +156,10 @@ jobs:
path: build-latest
- name: Compare ABI
+ env:
+ ABI_LIBS: ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}
run: |
- for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
+ 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
|
https://github.com/llvm/llvm-project/security/code-scanning/1627 https://github.com/llvm/llvm-project/security/code-scanning/1628 https://github.com/llvm/llvm-project/security/code-scanning/1629 https://github.com/llvm/llvm-project/security/code-scanning/1630 https://github.com/llvm/llvm-project/security/code-scanning/1631 https://github.com/llvm/llvm-project/security/code-scanning/1632 https://github.com/llvm/llvm-project/security/code-scanning/1633 https://github.com/llvm/llvm-project/security/code-scanning/1634 https://github.com/llvm/llvm-project/security/code-scanning/1635 https://github.com/llvm/llvm-project/security/code-scanning/1636 https://github.com/llvm/llvm-project/security/code-scanning/1637 https://github.com/llvm/llvm-project/security/code-scanning/1638