Fix clang tidy review workflow #483
Workflow file for this run
This file contains hidden or 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: 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: Run clang-tidy | |
| uses: ZedThree/[email protected] | |
| id: review | |
| with: | |
| build_dir: build | |
| apt_packages: wget,libxml2,libxml2-dev,libtinfo-dev,zlib1g-dev,libzstd-dev,curl | |
| exclude: "test/*,unittests/*,benchmark/*,demos/*" | |
| split_workflow: true | |
| config_file: .clang-tidy | |
| cmake_command: > | |
| cmake . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=On || true && | |
| rm -rf build && | |
| set -x && | |
| wget https://github.com/mamba-org/micromamba-releases/releases/download/1.5.10-0/micromamba-linux-64 && | |
| chmod a+x ./micromamba-linux-64 && | |
| eval "$(./micromamba-linux-64 shell hook --shell ) && | |
| ./micromamba-linux-64 create -n xeus-cpp -y --log-level warning -f $GITHUB_WORKSPACE/environment-dev.yml && | |
| ./micromamba-linux-64 activate xeus-cpp && | |
| git config --global --add safe.directory /github/workspace && | |
| cmake . -B build -DCMAKE_C_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang" -DCMAKE_CXX_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang++" -DCMAKE_EXPORT_COMPILE_COMMANDS=On | |
| - name: Upload artifacts | |
| uses: ZedThree/clang-tidy-review/[email protected] |