Skip to content

Commit c65362d

Browse files
committed
nightly
1 parent 596edb8 commit c65362d

1 file changed

Lines changed: 48 additions & 2 deletions

File tree

.github/workflows/iwyu.yml

Lines changed: 48 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+
nightly: true
27+
- os: ubuntu-22.04
28+
image: ""
29+
stdlib: libc++
30+
nightly: true
2331
- os: macos-26
2432
image: ""
2533
stdlib: libc++ # no libstdc++ on macOS
@@ -97,6 +105,12 @@ 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.nightly
110+
run: |
111+
sudo apt-get update
112+
sudo apt-get install -y libgl-dev # fixes missing dependency for Qt in CMake
113+
100114
# Fails on OpenSUSE:
101115
# 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.
102116
# Also the shell is broken afterwards:
@@ -143,8 +157,40 @@ jobs:
143157
make -C cmake.output gui-build-deps
144158
make -C cmake.output triage-build-ui-deps
145159
160+
- name: Install clang
161+
if: contains(matrix.os, 'ubuntu') && matrix.nightly
162+
run: |
163+
sudo apt-get purge --auto-remove llvm-15 clang-15 python3-lldb-14 llvm-14 clang-14 llvm-13 clang-13
164+
wget https://apt.llvm.org/llvm.sh
165+
chmod +x llvm.sh
166+
sudo ./llvm.sh 23
167+
sudo apt-get install -y libclang-23-dev
168+
169+
- name: check out include-what-you-use
170+
if: contains(matrix.os, 'ubuntu') && matrix.nightly
171+
uses: actions/checkout@v4
172+
with:
173+
persist-credentials: false
174+
repository: 'include-what-you-use/include-what-you-use'
175+
path: 'include-what-you-use'
176+
177+
- name: run include-what-you-use CMake
178+
if: contains(matrix.os, 'ubuntu') && matrix.nightly
179+
run: |
180+
cmake -S include-what-you-use -B include-what-you-use-build -DCMAKE_BUILD_TYPE=Release
181+
env:
182+
CC: clang-23
183+
CXX: clang++-23
184+
185+
- name: install include-what-you-use
186+
if: contains(matrix.os, 'ubuntu') && matrix.nightly
187+
run: |
188+
sudo cmake --build include-what-you-use-build --target install -- -j$(nproc)
189+
ln -s iwyu_tool.py /usr/local/bin/iwyu_tool
190+
146191
- name: iwyu_tool
147192
run: |
193+
# TODO: exclude auto-generated source files
148194
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
149195
150196
# TODO: run with all configurations
@@ -160,7 +206,7 @@ jobs:
160206
- uses: actions/upload-artifact@v4
161207
if: success() || failure()
162208
with:
163-
name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }})
209+
name: Compilation Database (include-what-you-use - ${{ matrix.os }} ${{ matrix.image }} ${{ matrix.stdlib }})
164210
path: ./cmake.output/compile_commands.json
165211

166212
- uses: actions/upload-artifact@v4
@@ -174,5 +220,5 @@ jobs:
174220
- uses: actions/upload-artifact@v4
175221
if: success() || failure()
176222
with:
177-
name: Logs (include-what-you-use - ${{ matrix.os }} ${{ matrix.stdlib }})
223+
name: Logs (include-what-you-use - ${{ matrix.os }} ${{ matrix.image }} ${{ matrix.stdlib }})
178224
path: ./*.log

0 commit comments

Comments
 (0)