From 509e25b5b6d9a758acf2fe178e3a7a9c0714c8dd Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 13 Mar 2024 12:57:21 -0700 Subject: [PATCH 1/3] workflows: Fix baseline version for llvm abi checks The baseline version calculations was assuming the minor release would always be 0. --- .github/workflows/llvm-tests.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml index 127628d76f191..4c6d01a4b801c 100644 --- a/.github/workflows/llvm-tests.yml +++ b/.github/workflows/llvm-tests.yml @@ -42,6 +42,7 @@ jobs: BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }} ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }} BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }} + BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }} LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }} LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }} @@ -58,15 +59,27 @@ jobs: - name: Setup Variables id: vars run: | - if [ ${{ steps.version.outputs.LLVM_VERSION_MINOR }} -ne 0 ] || [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then + # libLLVM: + # 18.1.0 we aren't doing ABI checks. + # 18.1.1 We want to check 18.1.0. + # libclang: + # 18.1.0 We want to check 17.0.x + # 18.1.1 We want to check 18.1.0 + if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then { echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))" echo "ABI_HEADERS=llvm-c" + if [ "${{ steps.version.outputs.LLVM_VERSION_MAJOR }}" -le 18 ]; then + echo "BASELINE_VERSION_MINOR=0" + else + echo "BASELINE_VERSION_MINOR=1" + fi } >> "$GITHUB_OUTPUT" else { echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.LLVM_VERSION_MAJOR }}" echo "ABI_HEADERS=." + echo "BASELINE_VERSION_MINOR=1" } >> "$GITHUB_OUTPUT" fi @@ -82,7 +95,7 @@ jobs: include: - name: build-baseline llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }} - ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.0.0 + ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MINOR }}.0 repo: llvm/llvm-project - name: build-latest llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }} From f5c0a68fb927aeb5b23a4556e4fb314e43ba81ea Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 15 Mar 2024 02:40:28 -0700 Subject: [PATCH 2/3] Update llvm-tests.yml --- .github/workflows/llvm-tests.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml index 4c6d01a4b801c..a949e143c2244 100644 --- a/.github/workflows/llvm-tests.yml +++ b/.github/workflows/llvm-tests.yml @@ -65,21 +65,16 @@ jobs: # libclang: # 18.1.0 We want to check 17.0.x # 18.1.1 We want to check 18.1.0 + echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT" if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then { echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))" - echo "ABI_HEADERS=llvm-c" - if [ "${{ steps.version.outputs.LLVM_VERSION_MAJOR }}" -le 18 ]; then - echo "BASELINE_VERSION_MINOR=0" - else - echo "BASELINE_VERSION_MINOR=1" - fi + echo "ABI_HEADERS=llvm-c" } >> "$GITHUB_OUTPUT" else { echo "BASELINE_VERSION_MAJOR=${{ steps.version.outputs.LLVM_VERSION_MAJOR }}" echo "ABI_HEADERS=." - echo "BASELINE_VERSION_MINOR=1" } >> "$GITHUB_OUTPUT" fi From c3bb2eda3a400272db8171ba5b32e57c8a499d28 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 18 Mar 2024 16:41:31 -0700 Subject: [PATCH 3/3] Update llvm-tests.yml --- .github/workflows/llvm-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/llvm-tests.yml b/.github/workflows/llvm-tests.yml index a949e143c2244..64d60bc3da45e 100644 --- a/.github/workflows/llvm-tests.yml +++ b/.github/workflows/llvm-tests.yml @@ -59,17 +59,17 @@ jobs: - name: Setup Variables id: vars run: | - # libLLVM: + # C++ ABI: # 18.1.0 we aren't doing ABI checks. # 18.1.1 We want to check 18.1.0. - # libclang: + # C ABI: # 18.1.0 We want to check 17.0.x # 18.1.1 We want to check 18.1.0 echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT" if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then { echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))" - echo "ABI_HEADERS=llvm-c" + echo "ABI_HEADERS=llvm-c" } >> "$GITHUB_OUTPUT" else {