-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec25295
commit 65bbe3c
Showing
4 changed files
with
614 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "iwyu-matcher", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+):(\\d+):\\s*(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: IWYU Analysis | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup cmake | ||
uses: jwlawson/actions-setup-cmake@v2 | ||
with: | ||
cmake-version: '3.22.x' | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: Install iwyu | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y iwyu | ||
- name: Register problem matcher | ||
run: echo "::add-matcher::./.github/problem-matcher.json" | ||
|
||
- name: Export CXXFLAGS | ||
|
||
#Since Clang 17 is installed in usr/bin, it will search for built-ins in /usr/lib/clang/17/include. | ||
#The purpose of this step is to help the clang toolchain used by IWYU to locate the correct system | ||
#header directories. | ||
|
||
run: | | ||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON executables/referenceApp | ||
export CXXFLAGS="-isystem /usr/lib/llvm-17/lib/clang/17/include/" | ||
echo "done exporting" | ||
python3 iwyu_tool.py -p compile_commands.json 2>&1 > iwyu_output.txt | tee iwyu_output.txt | ||
echo "Output in iwyu_output.txt" | ||
- name: Print IWYU output | ||
run: cat iwyu_output.txt | ||
|
||
- name: Unregister problem matcher | ||
if: always() | ||
run: echo "::remove-matcher owner=iwyu-matcher::" | ||
|
||
- name: Upload IWYU output | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: iwyu_output | ||
path: iwyu_output.txt |
Oops, something went wrong.