Skip to content

Commit 634d554

Browse files
committed
iwyu.yml: added jobs with latest IWYU build
1 parent 2c7f958 commit 634d554

1 file changed

Lines changed: 55 additions & 2 deletions

File tree

.github/workflows/iwyu.yml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ jobs:
2020
- os: ubuntu-22.04
2121
image: "fedora:rawhide"
2222
stdlib: libc++
23+
- os: ubuntu-22.04
24+
image: ""
25+
stdlib: libstdc++
26+
latest: true
27+
- os: ubuntu-22.04
28+
image: ""
29+
stdlib: libc++
30+
clang_inc: '-isystem/usr/lib/clang/23/include'
31+
latest: true
2332
- os: macos-26
2433
image: ""
2534
stdlib: libc++ # no libstdc++ on macOS
@@ -97,6 +106,17 @@ jobs:
97106
# on Apple Silicon files are symlinked under /opt/homebrew/bin
98107
ln -s /opt/homebrew/bin/iwyu_tool.py /usr/local/bin/iwyu_tool
99108
109+
- name: Install missing software on ubuntu
110+
if: contains(matrix.os, 'ubuntu') && matrix.latest
111+
run: |
112+
sudo apt-get update
113+
sudo apt-get install -y libgl-dev # fixes missing dependency for Qt in CMake
114+
115+
- name: Install missing software on ubuntu (cfg)
116+
if: contains(matrix.os, 'ubuntu') && matrix.latest
117+
run: |
118+
sudo apt-get install libcairo2-dev libcurl4-openssl-dev liblua5.3-dev libssl-dev libsqlite3-dev libcppunit-dev libsigc++-2.0-dev libgtk-3-dev libboost-all-dev libselinux-dev libwxgtk3.0-gtk3-dev xmlstarlet qtbase5-dev
119+
100120
# Fails on OpenSUSE:
101121
# Warning: Failed to restore: Tar failed with error: Unable to locate executable file: tar. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
102122
# Also the shell is broken afterwards:
@@ -143,8 +163,41 @@ jobs:
143163
make -C cmake.output gui-build-deps
144164
make -C cmake.output triage-build-ui-deps
145165
166+
- name: Install clang
167+
if: contains(matrix.os, 'ubuntu') && matrix.latest
168+
run: |
169+
sudo apt-get purge --auto-remove llvm-15 clang-15 python3-lldb-14 llvm-14 clang-14 llvm-13 clang-13
170+
wget https://apt.llvm.org/llvm.sh
171+
chmod +x llvm.sh
172+
sudo ./llvm.sh 23
173+
sudo apt-get install -y libclang-23-dev libomp-23-dev
174+
175+
- name: check out include-what-you-use
176+
if: contains(matrix.os, 'ubuntu') && matrix.latest
177+
uses: actions/checkout@v4
178+
with:
179+
persist-credentials: false
180+
repository: 'include-what-you-use/include-what-you-use' # TODO: make configurable in trigger
181+
ref: ''
182+
path: 'include-what-you-use'
183+
184+
- name: run include-what-you-use CMake
185+
if: contains(matrix.os, 'ubuntu') && matrix.latest
186+
run: |
187+
cmake -S include-what-you-use -B include-what-you-use-build -DCMAKE_BUILD_TYPE=Release
188+
env:
189+
CC: clang-23
190+
CXX: clang++-23
191+
192+
- name: install include-what-you-use
193+
if: contains(matrix.os, 'ubuntu') && matrix.latest
194+
run: |
195+
sudo cmake --build include-what-you-use-build --target install -- -j$(nproc)
196+
ln -s iwyu_tool.py /usr/local/bin/iwyu_tool
197+
146198
- name: iwyu_tool
147199
run: |
200+
# TODO: exclude auto-generated source files
148201
iwyu_tool -p cmake.output -j $(nproc) -- -w -Xiwyu --max_line_length=1024 -Xiwyu --comment_style=long -Xiwyu --quoted_includes_first -Xiwyu --update_comments ${{ matrix.mapping_file_opt }} ${{ matrix.clang_inc }} > iwyu.log
149202
150203
# TODO: run with all configurations
@@ -160,7 +213,7 @@ jobs:
160213
- uses: actions/upload-artifact@v4
161214
if: success() || failure()
162215
with:
163-
name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }})
216+
name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }} ${{ matrix.latest }})
164217
path: ./cmake.output/compile_commands.json
165218

166219
- uses: actions/upload-artifact@v4
@@ -174,5 +227,5 @@ jobs:
174227
- uses: actions/upload-artifact@v4
175228
if: success() || failure()
176229
with:
177-
name: Logs (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }})
230+
name: Logs (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }} ${{ matrix.latest }})
178231
path: ./*.log

0 commit comments

Comments
 (0)