mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-01 15:34:55 +01:00
install version 17 for clang-tidy on github actions use warnings as errors in .clang-tidy use better clang-tidy checks use option in CMakeLists to use clang-tidy-17 instead of clang-tidy (14)
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: clang-tidy
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
clang-tidy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: mamba-org/setup-micromamba@v1
|
|
with:
|
|
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
|
|
environment-file: aare-environment.yml
|
|
init-shell: bash
|
|
cache-environment: true
|
|
post-cleanup: 'all'
|
|
- name: update clang-tidy
|
|
shell: bash -el {0}
|
|
run: |
|
|
wget https://apt.llvm.org/llvm.sh
|
|
chmod +x llvm.sh
|
|
sudo ./llvm.sh 17
|
|
sudo apt install clang-tidy-17
|
|
- name: cmake
|
|
shell: bash -el {0}
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake .. -DAARE_SYSTEM_LIBRARIES="ON" -DCMAKE_BUILD_TYPE="Debug" -DAARE_PYTHON_BINDINGS="OFF" -DAARE_IN_GITHUB_ACTIONS="ON"
|
|
- name: linting checks
|
|
shell: bash -el {0}
|
|
run: |
|
|
clang-tidy-17 --version
|
|
echo $GITHUB_ACTIONS
|
|
cd build
|
|
cmake --build . --target clang-tidy |