pain #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: Raijin-LOB Engine CI | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| paths: | |
| - 'src/**' | |
| - 'include/**' | |
| - 'tests/**' | |
| - 'CMakeLists.txt' | |
| - 'third_party/**' | |
| - '.github/workflows/ci.yaml' | |
| - '**.cpp' | |
| - '**.hpp' | |
| pull_request: | |
| branches: ["main", "master"] | |
| paths: | |
| - 'src/**' | |
| - 'include/**' | |
| - 'tests/**' | |
| - 'CMakeLists.txt' | |
| - 'third_party/**' | |
| - '.github/workflows/ci.yaml' | |
| - '**.cpp' | |
| - '**.hpp' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: 'recursive' | |
| - name: Install depedencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake clang-tidy clang-format | |
| #- name: Run Clang-Format Check | |
| # run: | | |
| # find src include tests -name "*.cpp" -o -name "*.hpp" | xargs clang-format --dry-run --Werror | |
| #- name: Run Clang-Tidy (Linter) | |
| # run: | | |
| # # Run the linter on all our source files | |
| # clang-tidy src/core/*.cpp include/core/*.hpp -- -Iinclude -Ithird_party/json/include -std=c++20 | |
| - name: Configure CMake | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: | | |
| cd build | |
| make -j$(nproc) | |
| - name: Run tests | |
| run: | | |
| cd build | |
| ctest --output-on-failure |