♻ CI: enable iwyu #54
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
name: Checks | |
on: | |
push: | |
paths-ignore: | |
- '.github/ISSUE_TEMPLATE/**' | |
- 'LICENSE' | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
concurrency: | |
group: checks-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
cpp-linter: | |
runs-on: ubuntu-latest | |
container: archlinux:base-devel | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install deps | |
run: | | |
pacman -Syu --noconfirm cmake pkg-config ninja clang mold llvm libc++ qt5-base qt5-tools polkit-qt5 python include-what-you-use git | |
shell: bash | |
- name: Configure CMake | |
run: | | |
export AR=llvm-ar | |
export CC=clang | |
export CXX=clang++ | |
export NM=llvm-nm | |
export RANLIB=llvm-ranlib | |
./configure.sh -t=Debug -p=${{github.workspace}}/build --use_clang | |
./build.sh | |
shell: bash | |
- name: Run clang-tidy | |
run: | | |
clang-tidy -p ${{github.workspace}}/build/Debug src/*.cpp | |
shell: bash | |
- name: Run iwyu | |
run: | | |
export AR=llvm-ar | |
export CC=clang | |
export CXX=clang++ | |
export NM=llvm-nm | |
export RANLIB=llvm-ranlib | |
cmake -B ${{github.workspace}}/build-iwyu -DCMAKE_BUILD_TYPE=Debug -DENABLE_INCLUDE_WHAT_YOU_USE=ON | |
cmake --build ${{github.workspace}}/build-iwyu | |
shell: bash | |
check_clang_format: | |
name: "Check C++ style" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run clang-format style check for C/C++/Protobuf programs. | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '16' | |
check-path: 'src' | |
exclude-regex: 'src/ini.hpp' | |