feat: pre commit #16
Workflow file for this run
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
| # Copyright (c) Brandon Pacewic | |
| # SPDX-License-Identifier: MIT | |
| name: Lint | |
| on: | |
| pull_request: | |
| branches: | |
| - mega | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt-get install -y clang-format cmake ccache | |
| - name: Restore ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ccache | |
| key: ccache-${{ runner.os }}-${{ hashFiles('cpl/inc/**', 'tests/**/*.cpp', 'CMakeLists.txt', 'cpl/CMakeLists.txt', 'tests/CMakeLists.txt') }} | |
| restore-keys: ccache-${{ runner.os }}- | |
| - name: Configure ccache | |
| run: ccache --set-config max_size=500M | |
| - name: Run lint | |
| run: scripts/lint.sh | |
| - name: Save ccache | |
| uses: actions/cache/save@v4 | |
| if: always() | |
| with: | |
| path: ~/.cache/ccache | |
| key: ccache-${{ runner.os }}-${{ hashFiles('cpl/inc/**', 'tests/**/*.cpp', 'CMakeLists.txt', 'cpl/CMakeLists.txt', 'tests/CMakeLists.txt') }} |