mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-23 11:57:58 +02:00
fix clang-tidy on ci actions + other improvements (#62)
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)
This commit is contained in:
16
.github/workflows/clang-tidy.yml
vendored
16
.github/workflows/clang-tidy.yml
vendored
@ -8,23 +8,29 @@ jobs:
|
||||
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: 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 -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_LIBRARIES=ON ..
|
||||
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: |
|
||||
# find all examples in build/examples and run them
|
||||
clang-tidy-17 --version
|
||||
echo $GITHUB_ACTIONS
|
||||
cd build
|
||||
cmake --build . --target clang-tidy
|
||||
|
||||
cmake --build . --target clang-tidy
|
26
.github/workflows/common-workflow.yml
vendored
26
.github/workflows/common-workflow.yml
vendored
@ -19,6 +19,32 @@ jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
JOB_CONTEXT: ${{ toJson(job) }}
|
||||
STEPS_CONTEXT: ${{ toJson(steps) }}
|
||||
RUNNER_CONTEXT: ${{ toJson(runner) }}
|
||||
run: |
|
||||
echo "$GITHUB_CONTEXT"
|
||||
echo "$JOB_CONTEXT"
|
||||
echo "$STEPS_CONTEXT"
|
||||
echo "$RUNNER_CONTEXT"
|
||||
echo "The job_id is: $GITHUB_JOB" # reference the default environment variables
|
||||
echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables
|
||||
echo "The run id is: $GITHUB_RUN_ID"
|
||||
echo "The GitHub Actor's username is: $GITHUB_ACTOR"
|
||||
echo "GitHub SHA: $GITHUB_SHA"
|
||||
|
||||
- name: print inputs
|
||||
run: |
|
||||
echo "use-system-libraries: ${{inputs.use-system-libraries}}"
|
||||
echo "build-type: ${{inputs.build-type}}"
|
||||
echo "use-python-bindings: ${{inputs.use-python-bindings}}"
|
||||
|
||||
|
||||
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: mamba-org/setup-micromamba@v1
|
||||
if: ${{ contains(inputs.use-system-libraries, 'ON')}}
|
||||
|
3
.github/workflows/format.yml
vendored
3
.github/workflows/format.yml
vendored
@ -8,7 +8,6 @@ jobs:
|
||||
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
|
||||
@ -20,7 +19,7 @@ jobs:
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_LIBRARIES=ON ..
|
||||
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: |
|
||||
|
Reference in New Issue
Block a user