Remove iostream from app demo #21
This file contains hidden or 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: clang-format | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - '**/*.cpp' | |
| - '**/*.hpp' | |
| - '.clang-format' | |
| - 'cmake/Tooling.cmake' | |
| - '.github/workflows/clang-format.yml' | |
| pull_request: | |
| branches: [ master ] | |
| paths: | |
| - '**/*.cpp' | |
| - '**/*.hpp' | |
| - '.clang-format' | |
| - 'cmake/Tooling.cmake' | |
| - '.github/workflows/clang-format.yml' | |
| workflow_dispatch: | |
| jobs: | |
| format-check: | |
| name: Check clang-format | |
| runs-on: ubuntu-latest | |
| env: | |
| CMAKE_PRESET_NAME: gcc-Release | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: { fetch-depth: 0 } | |
| - name: Install CMake and Ninja | |
| uses: lukka/get-cmake@latest | |
| with: | |
| cmakeVersion: ^3.28.0 | |
| ninjaVersion: ^1.11.0 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -qq update | |
| sudo apt-get -qq install -y g++ gcc clang-format --no-install-recommends | |
| - name: Cache build artifacts | |
| id: cache-build | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/ | |
| key: | | |
| ${{ runner.os }}-clang-format-${{ hashFiles('**/.clang-format','cmake/Tooling.cmake') }} | |
| restore-keys: | | |
| ${{ runner.os }}-clang-format- | |
| - name: Configure with CMake Preset | |
| run: cmake --preset $CMAKE_PRESET_NAME -DENABLE_CLANG_FORMAT=ON | |
| - name: Run clang-format | |
| run: cmake --build --preset $CMAKE_PRESET_NAME --target format-check |