fix mdspan build issue #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format Check | |
on: | |
pull_request: | |
paths: | |
- '**.cpp' | |
- '**.h' | |
- 'CMakeLists.txt' | |
- '**.cmake' | |
jobs: | |
check-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install clang-format | |
run: sudo apt-get install clang-format | |
- name: Install cmake-format | |
run: pip install cmake-format | |
- name: Check C++ format | |
run: | | |
clang-format --version | |
find . -name '*.cpp' -o -name '*.h' -o -name '*.hpp' -o -name '*.cc' | xargs clang-format -i | |
git diff --exit-code || (echo "Code was not formatted using clang-format! Please format your code." && exit 1) | |
- name: Check CMake format | |
run: | | |
find . -name 'CMakeLists.txt' -o -name '*.cmake' | xargs cmake-format -i | |
git diff --exit-code || (echo "CMake files were not formatted using cmake-format! Please format your files." && exit 1) | |