Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add iwyu in ci #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ponio-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,49 @@ jobs:
cat cppcheck_err.txt
exit -1
fi
# check includes
iwyu:
needs: [pre-commit]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- cpp-version: clang-15
packages: "clang-15 llvm-15-dev libclang-15-dev"
cc: "clang-15"
cxx: "clang++-15"
iwyu_branch: "clang_15"
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
- name: Remove GCC 13 from runner image
shell: bash
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.6 libc6-dev=2.35-0ubuntu3.6 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
- name: install compiler
run: |
sudo apt update
sudo apt install ${{ matrix.packages }}
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.13.0
cache: true
- name: instal iwyu
run: |
git clone https://github.com/include-what-you-use/include-what-you-use.git
cd include-what-you-use
git checkout ${{ matrix.iwyu_branch }}
cd ..
cmake include-what-you-use -G 'Ninja Multi-Config' -B ./build -DCMAKE_PREFIX_PATH=$(${{ matrix.cc }} -print-resource-dir)
- name: Build
shell: pixi run bash {0}
run: |
export LDFLAGS="${LDFLAGS} -L$CONDA_PREFIX/lib"
CXX=include-what-you-use pixi run build_test
# check compilation on gcc and clang compiler
compiler-check:
needs: [pre-commit, cppcheck]
Expand Down
Loading