-
Notifications
You must be signed in to change notification settings - Fork 417
54 lines (46 loc) · 1.29 KB
/
iwyu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: include-what-you-use
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
iwyu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup dependencies
run: |
sudo apt update -y
sudo apt install -y --no-install-recommends --no-install-suggests \
build-essential \
iwyu \
cmake \
ninja-build \
libssl-dev \
libcurl4-openssl-dev \
libprotobuf-dev \
protobuf-compiler \
libgmock-dev \
libgtest-dev \
libbenchmark-dev
- name: Prepare CMake
run: |
TOPDIR=`pwd`
mkdir build && cd build
CC="clang" CXX="clang++" cmake \
-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE="include-what-you-use;-w;-Xiwyu;--mapping_file=${TOPDIR}/.iwyu.imp;" \
-DBUILD_TESTING=OFF \
-DBUILD_W3CTRACECONTEXT_TEST=OFF \
..
- name: iwyu_tool
run: |
cd build
make -k 2>&1 | tee -a iwyu.log
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: Logs (include-what-you-use)
path: ./build/*.log