Skip to content

Commit

Permalink
Add github action related to clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-PLACET committed Mar 27, 2024
1 parent fa2c1a2 commit a13dfe6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
cache-downloads: true

- name: Configure using CMake
run: cmake -G Ninja -Bbuild ${{matrix.sys.config-flags}} -DCMAKE_BUILD_TYPE:STRING=${{matrix.config.name}} -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_TESTS=ON
run: |
activate_linter=${{ matrix.sys.compiler == 'clang' && 'ON' || 'OFF' }}
cmake -G Ninja -Bbuild ${{matrix.sys.config-flags}} -DCMAKE_BUILD_TYPE:STRING=${{matrix.config.name}} -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DBUILD_TESTS=ON -DACTIVATE_LINTER=$activate_linter
- name: Install
working-directory: build
Expand All @@ -75,3 +77,8 @@ jobs:
- name: Run tests
working-directory: build
run: ctest -C ${{matrix.config.name}} --output-on-failure

- name: Run clang-format dry-run
if: matrix.sys.compiler == 'clang'
working-directory: build
run: cmake --build . --config ${{matrix.config.name}} --target clang-format_dry_run

0 comments on commit a13dfe6

Please sign in to comment.