workflows/llvm-abi-tests: Cache the baseline abi (#211968)
This way we don't need to recompute it for every workflow.
This commit is contained in:
parent
b0511699c3
commit
09734937d3
1 changed files with 23 additions and 0 deletions
23
.github/workflows/llvm-abi-tests.yml
vendored
23
.github/workflows/llvm-abi-tests.yml
vendored
|
|
@ -93,23 +93,37 @@ jobs:
|
||||||
ref: ${{ github.sha }}
|
ref: ${{ github.sha }}
|
||||||
repo: ${{ github.repository }}
|
repo: ${{ github.repository }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check for cached baseline ABI
|
||||||
|
if: ${{ matrix.name == 'build-baseline' }}
|
||||||
|
id: cache
|
||||||
|
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #v6.1.0
|
||||||
|
with:
|
||||||
|
key: ${{ matrix.ref}}.abi
|
||||||
|
path: |
|
||||||
|
${{ matrix.ref }}.abi
|
||||||
|
llvm.symbols
|
||||||
|
|
||||||
- name: Download source code
|
- name: Download source code
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
ref: ${{ matrix.ref }}
|
ref: ${{ matrix.ref }}
|
||||||
repository: ${{ matrix.repo }}
|
repository: ${{ matrix.repo }}
|
||||||
- name: Configure
|
- name: Configure
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
mkdir install
|
mkdir install
|
||||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
|
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD="" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_INSTALL_PREFIX="$(pwd)"/install llvm
|
||||||
- name: Build
|
- name: Build
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
# Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
|
# Need to run install-LLVM twice to ensure the symlink is installed (this is a bug).
|
||||||
run: |
|
run: |
|
||||||
ninja -C build install-LLVM
|
ninja -C build install-LLVM
|
||||||
ninja -C build install-LLVM
|
ninja -C build install-LLVM
|
||||||
ninja -C build install-llvm-headers
|
ninja -C build install-llvm-headers
|
||||||
- name: Dump ABI
|
- name: Dump ABI
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
env:
|
env:
|
||||||
REF: ${{ matrix.ref }}
|
REF: ${{ matrix.ref }}
|
||||||
ABI_HEADERS: ${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}
|
ABI_HEADERS: ${{ needs.abi-dump-setup.outputs.ABI_HEADERS }}
|
||||||
|
|
@ -138,6 +152,15 @@ jobs:
|
||||||
name: symbol-list
|
name: symbol-list
|
||||||
path: llvm.symbols
|
path: llvm.symbols
|
||||||
|
|
||||||
|
- name: Cache baseline ABI
|
||||||
|
if: ${{ matrix.name == 'build-baseline' }}
|
||||||
|
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #v6.1.0
|
||||||
|
with:
|
||||||
|
key: ${{ matrix.ref }}.abi
|
||||||
|
path: |
|
||||||
|
${{ matrix.ref }}.abi
|
||||||
|
llvm.symbols
|
||||||
|
|
||||||
abi-compare:
|
abi-compare:
|
||||||
if: github.repository_owner == 'llvm'
|
if: github.repository_owner == 'llvm'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue