[llvm] [ci] Add ids workflow for checking llvm apis have been annotated with LLVM_ABI (PR #172673)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 23 18:40:51 PST 2025
================
@@ -0,0 +1,110 @@
+name: "Check LLVM ABI annotations"
+on:
+ pull_request:
+ branches:
+ - main
+ - 'users/**'
+ push:
+ branches:
+ - 'main'
+ - 'release/**'
+
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ if: github.repository_owner == 'llvm'
+ name: Check LLVM_ABI annotations with ids
+ runs-on: ubuntu-24.04
+ timeout-minutes: 10
+
+ steps:
+ # TODO: Use an image with a prebuilt idt.
+ - uses: actions/checkout at 8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
+ with:
+ repository: compnerd/ids
+ path: ${{ github.workspace }}/ids
+ ref: b3bf35dd13d7ff244a6a6d106fe58d0eedb5743e # main
+
+ - uses: actions/checkout at 8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4.2.2
+ with:
+ path: ${{ github.workspace }}/llvm-project
+ fetch-depth: 2
+
+ - name: Get changed files
+ id: changed-files
+ uses: tj-actions/changed-files at 24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
+ with:
+ separator: ","
+ skip_initial_fetch: true
+ base_sha: 'HEAD~1'
+ sha: 'HEAD'
+
+ # TODO: Use an image with a prebuilt idt.
+ - name: Install dependencies
+ run: |
+ sudo apt install -y clang-19 ninja-build libclang-19-dev
+ pip install lit PyGithub
+
+ - name: Configure and build minimal LLVM for use by ids
+ run: |
+ cmake -B ${{ github.workspace }}/llvm-project/build/ \
+ -S ${{ github.workspace }}/llvm-project/llvm/ \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D CMAKE_C_COMPILER=clang \
+ -D CMAKE_CXX_COMPILER=clang++ \
+ -D LLVM_ENABLE_PROJECTS=clang \
+ -D LLVM_TARGETS_TO_BUILD="host" \
+ -D CMAKE_EXPORT_COMPILE_COMMANDS=ON \
+ -G Ninja
+ cd ${{ github.workspace }}/llvm-project/build/
+ ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
+
+ # TODO: Use an image with a prebuilt idt.
+ - name: Configure ids
+ run: |
+ cmake -B ${{ github.workspace }}/ids/build/ \
+ -S ${{ github.workspace }}/ids/ \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D CMAKE_C_COMPILER=clang \
+ -D CMAKE_CXX_COMPILER=clang++ \
+ -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
+ -D LLVM_DIR=/usr/lib/llvm-19/lib/cmake/llvm/ \
+ -D Clang_DIR=/usr/lib/llvm-19/lib/cmake/clang/ \
+ -D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
+ -D LIT_EXECUTABLE=$(which lit) \
+ -G Ninja
+
+ # TODO: Use an image with a prebuilt idt.
----------------
boomanaiden154 wrote:
Nit: You can probably keep just this incantation of the todo.
https://github.com/llvm/llvm-project/pull/172673
More information about the llvm-commits
mailing list