mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-23 11:57:58 +02:00
use clang-tidy (#59)
* use clang-tidy for Frame.cpp * fixes for defs.cpp * clang-tidy 6/45 * clang-tidy for core * clang-tidy fixes: for hpp File,FileInterface,SubFile.cpp * ci fixes * fix build errors * fix clang-tidy command ci * fix clang-tidy ci * clang-tidy for rawfile.cpp * clang-tidy numpy helpers * fix ci * clang-tidy file_io * clang-tidy file_io and core working * zmqheader * clagn-tidy: network_io,file_io,core * clang-tidy working * format --------- Co-authored-by: Bechir <bechir.brahem420@gmail.com>
This commit is contained in:
30
.github/workflows/clang-tidy.yml
vendored
Normal file
30
.github/workflows/clang-tidy.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: clang-tidy
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
clang-tidy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
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: cmake
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_LIBRARIES=ON ..
|
||||
- name: linting checks
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
# find all examples in build/examples and run them
|
||||
cd build
|
||||
cmake --build . --target clang-tidy
|
||||
|
2
.github/workflows/common-workflow.yml
vendored
2
.github/workflows/common-workflow.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
with:
|
||||
|
23
.github/workflows/format.yml
vendored
23
.github/workflows/format.yml
vendored
@ -6,14 +6,27 @@ jobs:
|
||||
test-formatting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: check if files are formatted
|
||||
# find all examples in build/examples and run them
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
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: cmake
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
pwd
|
||||
mkdir build
|
||||
cd build
|
||||
find \( -name "*.cpp" -o -name "*.hpp" \) -not -path "./build/*" | xargs -I {} -n 1 -P 10 bash -c "clang-format -i -style=\"file:.clang-format\" {}"
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_LIBRARIES=ON ..
|
||||
- name: linting checks
|
||||
shell: bash -el {0}
|
||||
run: |
|
||||
# find all examples in build/examples and run them
|
||||
cd build
|
||||
cmake --build . --target=check-format
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user