Skip to content

Enable CI/clang-tidy #18

Enable CI/clang-tidy

Enable CI/clang-tidy #18

name: clang-tidy-review
on:
pull_request:
paths:
- '**.h'
- '**.cpp'
- '**.cc'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
review:
runs-on: ubuntu-22.04
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: run git config command
run: |
git config --global --add safe.directory /github/workspace
- name: Restore BDM Cache
uses: actions/cache/restore@v4
id: cache
with:
path: |
biodynamo
key: ubuntu-22.04-bdm
- name: Complain when cache not found
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
echo "Cache was not found!"
exit 1
- name: Run clang-tidy
uses: ZedThree/[email protected]
id: review
with:
build_dir: build
apt_packages: cmake, g++
exclude: "test/*,unittests/*"
split_workflow: true
config_file: .clang-tidy
install_commands: "source $GITHUB_WORKSPACE/biodynamo/build/bin/thisbdm.sh"
cmake_command: >
cmake . -B build
-DBioDynaMo_DIR="$GITHUB_WORKSPACE/biodynamo/build/share/cmake/"
-DCMAKE_BUILD_TYPE="Release"
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
- name: Upload artifacts
uses: ZedThree/clang-tidy-review/[email protected]
- name: Setup tmate session
if: ${{ !cancelled() && runner.debug }}
uses: mxschmitt/action-tmate@v3
# When debugging increase to a suitable value!
timeout-minutes: 30