[llvm] [ci] Add ids workflow for checking llvm apis have been annotated with LLVM_ABI (PR #128370)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 22 13:00:37 PST 2025
https://github.com/mcbarton updated https://github.com/llvm/llvm-project/pull/128370
>From cc09166aaa5a3fd3554e34f0bdb24c7f7c9197f4 Mon Sep 17 00:00:00 2001
From: mcbarton <150042563+mcbarton at users.noreply.github.com>
Date: Tue, 7 Jan 2025 09:06:17 +0000
Subject: [PATCH 1/2] Add ids workflow
---
.github/workflows/ids-check.yml | 73 +++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 .github/workflows/ids-check.yml
diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
new file mode 100644
index 0000000000000..70f23fd286f1e
--- /dev/null
+++ b/.github/workflows/ids-check.yml
@@ -0,0 +1,73 @@
+name: ids-check
+on:
+ pull_request:
+ branches: [main]
+ push:
+ branches: [main]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+ cancel-in-progress: true
+
+jobs:
+ build:
+ name: ${{ matrix.name }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - name: ids-check
+ os: macos-15
+
+ steps:
+ - uses: actions/checkout at v4
+ with:
+ repository: compnerd/ids
+ path: ${{ github.workspace }}/ids
+ fetch-depth: 0
+
+ - uses: actions/checkout at v4
+ with:
+ path: ${{ github.workspace }}/llvm-project
+ fetch-depth: 0
+
+ - name: install dependencies
+ run: |
+ brew install llvm at 18
+ brew install lit
+ brew install ninja
+
+ - name: Configure and build minimal LLVM for use by ids
+ run: |
+ cmake -B ${{ github.workspace }}/llvm-project/build/ \
+ -D CMAKE_BUILD_TYPE=Release \
+ -S ${{ github.workspace }}/llvm-project/llvm/ \
+ -D LLVM_ENABLE_PROJECTS=clang \
+ -D LLVM_TARGETS_TO_BUILD="host" \
+ -G Ninja
+ cd {{ github.workspace }}/llvm-project/build/
+ ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
+
+ - name: Configure ids
+ run: |
+ cmake -B ${{ github.workspace }}/ids/build/ \
+ -S ${{ github.workspace }}/ids/ \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D CMAKE_C_COMPILER=$(brew --prefix llvm at 18)/bin/clang \
+ -D CMAKE_CXX_COMPILER=$(brew --prefix llvm at 18)/bin/clang++ \
+ -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
+ -D LLVM_DIR=$(brew --prefix llvm at 18)lib/cmake/llvm \
+ -D Clang_DIR=$(brew --prefix llvm at 18)/lib/cmake/clang \
+ -D FILECHECK_EXECUTABLE=$(brew --prefix llvm at 18)/bin/FileCheck \
+ -D LIT_EXECUTABLE=$(brew --prefix lit)/bin/lit
+
+ - name: Build ids
+ run: |
+ cmake --build ${{ github.workspace }}/ids/build \
+ --config Release \
+ --parallel $(nproc --all)
+
+ - name: Run ids over compilation database
+ run: |
+ ${{ github.workspace }}/ids/build/bin/ids -export-macro LLVM_ABI -p ${{ github.workspace }}/llvm-project/build/compile_commands.json
>From b79e1a5621e0c12730c626470a5e95875077c95b Mon Sep 17 00:00:00 2001
From: mcbarton <matthew.c.barton at hotmail.co.uk>
Date: Sat, 22 Feb 2025 21:00:29 +0000
Subject: [PATCH 2/2] Update ids-check.yml
---
.github/workflows/ids-check.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ids-check.yml b/.github/workflows/ids-check.yml
index 70f23fd286f1e..288418adbaddc 100644
--- a/.github/workflows/ids-check.yml
+++ b/.github/workflows/ids-check.yml
@@ -46,7 +46,7 @@ jobs:
-D LLVM_ENABLE_PROJECTS=clang \
-D LLVM_TARGETS_TO_BUILD="host" \
-G Ninja
- cd {{ github.workspace }}/llvm-project/build/
+ cd ${{ github.workspace }}/llvm-project/build/
ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
- name: Configure ids
More information about the llvm-commits
mailing list