Skip to content

Commit f6a906c

Browse files
committed
(wip) change over to Windows runner
1 parent ea63601 commit f6a906c

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

.github/workflows/ids-check.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
build:
2323
if: github.repository_owner == 'llvm'
2424
name: ids-check
25-
runs-on: ubuntu-24.04
25+
runs-on: windows-2025
2626

2727
steps:
2828
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -36,61 +36,66 @@ jobs:
3636
path: ${{ github.workspace }}/llvm-project
3737
fetch-depth: 2
3838

39-
- name: install dependencies
39+
- name: Install dependencies
40+
shell: pwsh
4041
run: |
41-
sudo apt install -y clang-19 ninja-build libclang-19-dev
42-
pip install lit
42+
Invoke-WebRequest -Uri "https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/clang+llvm-20.1.8-x86_64-pc-windows-msvc.tar.xz" -OutFile "clang20.tar.xz"
43+
& "C:\Program Files\Git\usr\bin\tar.exe" -xf .\clang20.tar.xz
44+
pip install lit filecheck
4345
4446
- name: Configure and build minimal LLVM for use by ids
47+
shell: bash
4548
run: |
46-
cmake -B ${{ github.workspace }}/llvm-project/build/ \
49+
cmake -B C:/a/llvm-project/llvm-project/llvm-project/build/ \
4750
-D CMAKE_BUILD_TYPE=Release \
48-
-S ${{ github.workspace }}/llvm-project/llvm/ \
51+
-S C:/a/llvm-project/llvm-project/llvm-project/llvm/ \
4952
-D LLVM_ENABLE_PROJECTS=clang \
5053
-D LLVM_TARGETS_TO_BUILD="host" \
5154
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
5255
-G Ninja
53-
cd ${{ github.workspace }}/llvm-project/build/
56+
cd C:/a/llvm-project/llvm-project/llvm-project/build/
5457
ninja -t targets all | grep "CommonTableGen: phony$" | grep -v "/" | sed 's/:.*//'
5558
5659
- name: Configure ids
60+
shell: bash
5761
run: |
58-
cmake -B ${{ github.workspace }}/ids/build/ \
59-
-S ${{ github.workspace }}/ids/ \
62+
cmake -B C:/a/llvm-project/llvm-project/ids/build/ \
63+
-S C:/a/llvm-project/llvm-project/ids/ \
6064
-D CMAKE_BUILD_TYPE=Release \
6165
-D CMAKE_C_COMPILER=clang \
6266
-D CMAKE_CXX_COMPILER=clang++ \
6367
-D CMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld \
64-
-D LLVM_DIR=/usr/lib/llvm-19/lib/cmake/llvm/ \
65-
-D Clang_DIR=/usr/lib/llvm-19/lib/cmake/clang/ \
66-
-D FILECHECK_EXECUTABLE=$(which FileCheck-19) \
68+
-D LLVM_DIR="C:/a/llvm-project/llvm-project/clang+llvm-20.1.8-x86_64-pc-windows-msvc/lib/cmake/llvm/" \
69+
-D Clang_DIR="C:/a/llvm-project/llvm-project/clang+llvm-20.1.8-x86_64-pc-windows-msvc/lib/cmake/clang/" \
70+
-D FILECHECK_EXECUTABLE=$(which filecheck) \
6771
-D LIT_EXECUTABLE=$(which lit)
6872
6973
- name: Build ids
74+
shell: bash
7075
run: |
71-
cmake --build ${{ github.workspace }}/ids/build \
76+
cmake --build C:/a/llvm-project/llvm-project/ids/build \
7277
--config Release \
7378
--parallel $(nproc --all)
7479
7580
- name: Run ids over compilation database
81+
shell: bash
7682
run: |
77-
set -e
78-
cd ${{ github.workspace }}/llvm-project
83+
cd C:/a/llvm-project/llvm-project/llvm-project
7984
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/' )
8085
if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
8186
for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
82-
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --export-macro=LLVM_ABI --include-header="llvm/Support/Compiler.h" --extra-arg="-DLLVM_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
87+
${{ 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
8388
done
8489
fi
8590
export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm-c/**/*.h' )
8691
if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
8792
for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
88-
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --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
93+
${{ 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
8994
done
9095
fi
9196
export H_OR_CPP_FILES_CHANGED_LAST_COMMIT=$(git diff --name-only HEAD~1 HEAD -- 'llvm/include/llvm/Demangle/**/*.h' )
9297
if [ ! -z "${H_OR_CPP_FILES_CHANGED_LAST_COMMIT}" ]; then
9398
for file in $H_OR_CPP_FILES_CHANGED_LAST_COMMIT; do
94-
${{ github.workspace }}/ids/build/bin/idt -p ${{ github.workspace }}/llvm-project/build/compile_commands.json --apply-fixits --export-macro=DEMANGLE_ABI --include-header="llvm/Demangle/Visibility.h" --extra-arg="-DEMANGLE_ABI=__attribute__((visibility(\"default\")))" --extra-arg="-Wno-macro-redefined" $file
99+
${{ 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
95100
done
96101
fi

0 commit comments

Comments
 (0)