Skip to content

Commit 3ffdffc

Browse files
committed
iwyu.yml: added jobs with latest IWYU build
1 parent 159450b commit 3ffdffc

1 file changed

Lines changed: 54 additions & 2 deletions

File tree

.github/workflows/iwyu.yml

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ 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+
latest: true
2331
- os: macos-26
2432
image: ""
2533
stdlib: libc++ # no libstdc++ on macOS
@@ -97,6 +105,17 @@ jobs:
97105
# on Apple Silicon files are symlinked under /opt/homebrew/bin
98106
ln -s /opt/homebrew/bin/iwyu_tool.py /usr/local/bin/iwyu_tool
99107
108+
- name: Install missing software on ubuntu
109+
if: contains(matrix.os, 'ubuntu') && matrix.latest
110+
run: |
111+
sudo apt-get update
112+
sudo apt-get install -y libgl-dev # fixes missing dependency for Qt in CMake
113+
114+
- name: Install missing software on ubuntu (cfg)
115+
if: contains(matrix.os, 'ubuntu') && matrix.latest
116+
run: |
117+
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
118+
100119
# Fails on OpenSUSE:
101120
# 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.
102121
# Also the shell is broken afterwards:
@@ -143,8 +162,41 @@ jobs:
143162
make -C cmake.output gui-build-deps
144163
make -C cmake.output triage-build-ui-deps
145164
165+
- name: Install clang
166+
if: contains(matrix.os, 'ubuntu') && matrix.latest
167+
run: |
168+
sudo apt-get purge --auto-remove llvm-15 clang-15 python3-lldb-14 llvm-14 clang-14 llvm-13 clang-13
169+
wget https://apt.llvm.org/llvm.sh
170+
chmod +x llvm.sh
171+
sudo ./llvm.sh 23
172+
sudo apt-get install -y libclang-23-dev libomp-23-dev
173+
174+
- name: check out include-what-you-use
175+
if: contains(matrix.os, 'ubuntu') && matrix.latest
176+
uses: actions/checkout@v4
177+
with:
178+
persist-credentials: false
179+
repository: 'include-what-you-use/include-what-you-use'
180+
ref: ''
181+
path: 'include-what-you-use'
182+
183+
- name: run include-what-you-use CMake
184+
if: contains(matrix.os, 'ubuntu') && matrix.latest
185+
run: |
186+
cmake -S include-what-you-use -B include-what-you-use-build -DCMAKE_BUILD_TYPE=Release
187+
env:
188+
CC: clang-23
189+
CXX: clang++-23
190+
191+
- name: install include-what-you-use
192+
if: contains(matrix.os, 'ubuntu') && matrix.latest
193+
run: |
194+
sudo cmake --build include-what-you-use-build --target install -- -j$(nproc)
195+
ln -s iwyu_tool.py /usr/local/bin/iwyu_tool
196+
146197
- name: iwyu_tool
147198
run: |
199+
# TODO: exclude auto-generated source files
148200
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
149201
150202
# TODO: run with all configurations
@@ -160,7 +212,7 @@ jobs:
160212
- uses: actions/upload-artifact@v4
161213
if: success() || failure()
162214
with:
163-
name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }})
215+
name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.image }} ${{ matrix.stdlib }})
164216
path: ./cmake.output/compile_commands.json
165217

166218
- uses: actions/upload-artifact@v4
@@ -174,5 +226,5 @@ jobs:
174226
- uses: actions/upload-artifact@v4
175227
if: success() || failure()
176228
with:
177-
name: Logs (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }})
229+
name: Logs (include-what-you-use - ${{ matrix.os }} ${{ matrix.image }} ${{ matrix.stdlib }})
178230
path: ./*.log

0 commit comments

Comments
 (0)