forked from ihhub/fheroes2
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 1.02 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
name: IWYU
on:
workflow_call:
jobs:
iwyu:
name: IWYU
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install dependencies and iwyu
run: |
sudo apt-get -y update
sudo apt-get -y install libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext iwyu
- name: Prepare compile_commands.json
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_STRICT_COMPILATION=ON -DENABLE_IMAGE=ON -DENABLE_TOOLS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Analyze
run: |
iwyu_tool -p build -j 2 -- -Xiwyu --cxx17ns -Xiwyu --mapping_file="$GITHUB_WORKSPACE/iwyu.map" | (grep -E -v "^$|has correct #includes/fwd-decls" || true) \
| tee iwyu-result.txt
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: iwyu-result
path: iwyu-result.txt