Chore/clang tidy ci #52
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: Test and Lint | |
| on: | |
| push: | |
| branches: ["main", "dev"] | |
| pull_request: | |
| branches: ["main", "dev"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y cmake g++ | |
| - name: Configure CMake | |
| run: cmake -S . -B build | |
| - name: Build | |
| run: cmake --build build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: built | |
| path: ./build | |
| test: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: built | |
| path: ./build | |
| - name: run-tests | |
| run: ctest --test-dir build --output-on-failure | |
| lint: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: built | |
| path: ./build | |
| - name: Get clang-tidy | |
| run: sudo apt-get update && sudo apt-get install -y cmake clang clang-tidy g++ | |
| - name: lint | |
| run: ./run-clang-tidy.py -p build -source-filter '^(?!.*_deps/googletest-src/).*' |