-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[ci] Add ids workflow for checking llvm apis have been annotated with LLVM_ABI #128370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mcbarton
wants to merge
14
commits into
llvm:main
Choose a base branch
from
mcbarton:ids-check-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+102
−1
Open
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fa63258
Add ids workflow (Ubuntu runner)
mcbarton a21b01d
Show what happens when ids check workflow fails
mcbarton ea63601
Try to make ids workflow fail
mcbarton f6a906c
(wip) change over to Windows runner
mcbarton 9b99bb6
Use Ninja when configuring ids
mcbarton 1071b78
Debug ids-check.yml
mcbarton b38037c
Use Windows arm runner along with visualstudio2022community install t…
mcbarton 152e624
Try compiling ids with downloaded clang/clang++
mcbarton ac71060
change over to Windows runner
mcbarton e725ede
Change back to Linux runner
mcbarton 9730218
Debug why ids check workflow not working as expected Linux runner
mcbarton 8465f22
Merge branch 'ids-check-workflow' of https://github.com/mcbarton/llvm…
mcbarton e986879
Fix ids check workflow
mcbarton b0c5abd
Try to fix ids check workflow
mcbarton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| name: ids-check | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - closed | ||
| push: | ||
| branches: | ||
| - 'main' | ||
| - 'release/**' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
boomanaiden154 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if: github.repository_owner == 'llvm' | ||
| name: ids-check | ||
| runs-on: windows-11-arm | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| repository: compnerd/ids | ||
| path: ${{ github.workspace }}/ids | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| path: ${{ github.workspace }}/llvm-project | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Install dependencies | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/clang+llvm-20.1.8-aarch64-pc-windows-msvc.tar.xz" -OutFile "clang20.tar.xz" | ||
| & "C:\Program Files\Git\usr\bin\tar.exe" -xf .\clang20.tar.xz | ||
| choco install visualstudio2022community | ||
| pip install lit filecheck | ||
|
|
||
| - name: Configure and build minimal LLVM for use by ids | ||
| shell: bash | ||
| run: | | ||
| cmake -B C:/a/llvm-project/llvm-project/llvm-project/build/ \ | ||
| -D CMAKE_BUILD_TYPE=Release \ | ||
| -S C:/a/llvm-project/llvm-project/llvm-project/llvm/ \ | ||
| -D LLVM_ENABLE_PROJECTS=clang \ | ||
| -D CMAKE_C_COMPILER=clang \ | ||
| -D CMAKE_CXX_COMPILER=clang++ \ | ||
| -D LLVM_TARGETS_TO_BUILD="host" \ | ||
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||
| -G Ninja | ||
| cd C:/a/llvm-project/llvm-project/llvm-project/build/ | ||
| ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//' | ||
|
|
||
| - name: Configure ids | ||
| shell: bash | ||
| run: | | ||
| cmake -B C:/a/llvm-project/llvm-project/ids/build/ \ | ||
| -S C:/a/llvm-project/llvm-project/ids/ \ | ||
| -D CMAKE_BUILD_TYPE=Release \ | ||
| -D CMAKE_C_COMPILER="C:/a/llvm-project/llvm-project/clang+llvm-20.1.8-aarch64-pc-windows-msvc/bin/clang" \ | ||
| -D CMAKE_CXX_COMPILER="C:/a/llvm-project/llvm-project/clang+llvm-20.1.8-aarch64-pc-windows-msvc/bin/clang++" \ | ||
| -D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \ | ||
| -D LLVM_DIR="C:/a/llvm-project/llvm-project/clang+llvm-20.1.8-aarch64-pc-windows-msvc/lib/cmake/llvm/" \ | ||
| -D Clang_DIR="C:/a/llvm-project/llvm-project/clang+llvm-20.1.8-aarch64-pc-windows-msvc/lib/cmake/clang/" \ | ||
| -D FILECHECK_EXECUTABLE=$(which filecheck) \ | ||
| -D LIT_EXECUTABLE=$(which lit) \ | ||
| -G Ninja | ||
|
|
||
| - name: Build ids | ||
| shell: bash | ||
| run: | | ||
| cmake --build C:/a/llvm-project/llvm-project/ids/build \ | ||
| --config Release | ||
|
|
||
| - name: Run ids over compilation database | ||
| shell: bash | ||
| run: | | ||
| cd C:/a/llvm-project/llvm-project/llvm-project | ||
| export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/**/*.h' ':!llvm/include/llvm/Debuginfod/' ':!llvm/include/llvm/Demangle/' ) | ||
| if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then | ||
| for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do | ||
| ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file | ||
| done | ||
| fi | ||
| export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm-c/**/*.h' ) | ||
| if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then | ||
| for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do | ||
| ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=LLVM_C_ABI --include-header="llvm-c/Visibility.h" --extra-arg="-DLLVM_C_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file | ||
| done | ||
| fi | ||
| export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/Demangle/**/*.h' ) | ||
| if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then | ||
| for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do | ||
| ${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file | ||
| done | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ | |
|
|
||
| namespace llvm { | ||
|
|
||
| class LLVM_ABI Any { | ||
|
||
| class Any { | ||
|
|
||
| // The `Typeid<T>::Id` static data member below is a globally unique | ||
| // identifier for the type `T`. It is explicitly marked with default | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.