Skip to content

Attempt to fix clang-tidy #468

Attempt to fix clang-tidy

Attempt to fix clang-tidy #468

name: clang-tidy-review
on:
pull_request:
paths:
- '**.h'
- '**.hpp'
- '**.cpp'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
review:
runs-on: ubuntu-24.04
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "17.0.6"
- name: install mamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: environment-dev.yml
init-shell: bash
environment-name: xeus-cpp
- name: Configure Git
run: |
git config --global --add safe.directory /github/workspace
echo "GITHUB WORKSPACE : $GITHUB_WORKSPACE"
echo "MAMBA_ROOT_PREFIX: $MAMBA_ROOT_PREFIX"
echo "CMAKE_PREFIX_PATH: $CONDA_PREFIX"
- name: Run clang-tidy
uses: ZedThree/[email protected]
id: review
with:
build_dir: build
apt_packages: cmake,libxml2,libxml2-dev,libtinfo-dev,zlib1g-dev,libzstd-dev,curl
exclude: "test/*,unittests/*,benchmark/*,demos/*"
split_workflow: true
config_file: .clang-tidy
cmake_command: >
CC=$GITHUB_WORKSPACE/llvm/bin/clang CXX=$GITHUB_WORKSPACE/llvm/bin/clang++
cmake . -B build
-DCMAKE_PREFIX_PATH=$MAMBA_ROOT_PREFIX/envs/xeus-cpp \
-DXeus_DIR="$MAMBA_ROOT_PREFIX/envs/xeus-cpp/lib/cmake/xeus" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
- name: Upload artifacts
uses: ZedThree/clang-tidy-review/[email protected]