|
| 1 | +name: core-regression |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + run_soak: |
| 9 | + description: "Run short soak (uploads artifacts)" |
| 10 | + type: boolean |
| 11 | + default: false |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: core-regression-${{ github.ref }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +jobs: |
| 18 | + windows-core: |
| 19 | + name: Windows (Core) |
| 20 | + runs-on: windows-latest |
| 21 | + env: |
| 22 | + CPM_SOURCE_CACHE: ${{ github.workspace }}\.cpmcache |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 27 | + |
| 28 | + - uses: seanmiddleditch/gha-setup-ninja@v5 |
| 29 | + |
| 30 | + - name: Cache CPM |
| 31 | + uses: actions/cache@v4 |
| 32 | + with: |
| 33 | + path: ${{ env.CPM_SOURCE_CACHE }} |
| 34 | + key: ${{ runner.os }}-cpm-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} |
| 35 | + restore-keys: | |
| 36 | + ${{ runner.os }}-cpm- |
| 37 | +
|
| 38 | + - name: Configure (Core) |
| 39 | + shell: pwsh |
| 40 | + run: > |
| 41 | + cmake -S . -B build_core -G Ninja |
| 42 | + -DGENESISENGINE_ENABLE_TESTS=ON |
| 43 | + -DGENESIS_BUILD_GUI=OFF |
| 44 | + -DGENESIS_WITH_STYLE=OFF |
| 45 | + -DCMAKE_BUILD_TYPE=Debug |
| 46 | +
|
| 47 | + - name: Build (Core) |
| 48 | + shell: pwsh |
| 49 | + run: cmake --build build_core --parallel |
| 50 | + |
| 51 | + - name: Test (ctest) |
| 52 | + shell: pwsh |
| 53 | + run: ctest --test-dir build_core --output-on-failure |
| 54 | + |
| 55 | + ubuntu-soak: |
| 56 | + name: Ubuntu (Short Soak, optional) |
| 57 | + if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_soak }} |
| 58 | + runs-on: ubuntu-latest |
| 59 | + env: |
| 60 | + CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpmcache |
| 61 | + steps: |
| 62 | + - uses: actions/checkout@v4 |
| 63 | + |
| 64 | + - name: Install Ninja |
| 65 | + run: sudo apt-get update && sudo apt-get install -y ninja-build |
| 66 | + |
| 67 | + - name: Cache CPM |
| 68 | + uses: actions/cache@v4 |
| 69 | + with: |
| 70 | + path: ${{ env.CPM_SOURCE_CACHE }} |
| 71 | + key: ${{ runner.os }}-cpm-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} |
| 72 | + restore-keys: | |
| 73 | + ${{ runner.os }}-cpm- |
| 74 | +
|
| 75 | + - name: Configure (Core) |
| 76 | + run: > |
| 77 | + cmake -S . -B build_soak -G Ninja |
| 78 | + -DGENESISENGINE_ENABLE_TESTS=OFF |
| 79 | + -DGENESIS_BUILD_GUI=OFF |
| 80 | + -DGENESIS_WITH_STYLE=OFF |
| 81 | + -DCMAKE_BUILD_TYPE=RelWithDebInfo |
| 82 | +
|
| 83 | + - name: Build (runtime-cli) |
| 84 | + run: cmake --build build_soak --parallel --target genesis_runtime_cli |
| 85 | + |
| 86 | + - name: Run soak |
| 87 | + run: | |
| 88 | + mkdir -p out/ci |
| 89 | + ./build_soak/src/genesis-runtime-cli soak data/world_multiagent --root . --steps 800 --agents 12 --out out/ci/soak_metrics.json --summary-out out/ci/soak_summary.md --quiet |
| 90 | +
|
| 91 | + - name: Upload artifacts |
| 92 | + uses: actions/upload-artifact@v4 |
| 93 | + with: |
| 94 | + name: soak-ci |
| 95 | + path: out/ci |
| 96 | + |
| 97 | + ubuntu-core: |
| 98 | + name: Ubuntu (Core) |
| 99 | + runs-on: ubuntu-latest |
| 100 | + env: |
| 101 | + CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpmcache |
| 102 | + steps: |
| 103 | + - uses: actions/checkout@v4 |
| 104 | + |
| 105 | + - name: Install Ninja |
| 106 | + run: sudo apt-get update && sudo apt-get install -y ninja-build |
| 107 | + |
| 108 | + - name: Cache CPM |
| 109 | + uses: actions/cache@v4 |
| 110 | + with: |
| 111 | + path: ${{ env.CPM_SOURCE_CACHE }} |
| 112 | + key: ${{ runner.os }}-cpm-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} |
| 113 | + restore-keys: | |
| 114 | + ${{ runner.os }}-cpm- |
| 115 | +
|
| 116 | + - name: Configure (Core) |
| 117 | + run: > |
| 118 | + cmake -S . -B build_core -G Ninja |
| 119 | + -DGENESISENGINE_ENABLE_TESTS=ON |
| 120 | + -DGENESIS_BUILD_GUI=OFF |
| 121 | + -DGENESIS_WITH_STYLE=OFF |
| 122 | + -DCMAKE_BUILD_TYPE=Debug |
| 123 | +
|
| 124 | + - name: Build (Core) |
| 125 | + run: cmake --build build_core --parallel |
| 126 | + |
| 127 | + - name: Test (ctest) |
| 128 | + run: ctest --test-dir build_core --output-on-failure |
| 129 | + |
| 130 | + windows-mingw-core: |
| 131 | + name: Windows (Core, MinGW) |
| 132 | + runs-on: windows-latest |
| 133 | + env: |
| 134 | + CPM_SOURCE_CACHE: ${{ github.workspace }}\.cpmcache |
| 135 | + steps: |
| 136 | + - uses: actions/checkout@v4 |
| 137 | + |
| 138 | + - uses: msys2/setup-msys2@v2 |
| 139 | + with: |
| 140 | + msystem: MINGW64 |
| 141 | + update: true |
| 142 | + install: >- |
| 143 | + mingw-w64-x86_64-gcc |
| 144 | + mingw-w64-x86_64-cmake |
| 145 | + mingw-w64-x86_64-ninja |
| 146 | +
|
| 147 | + - name: Cache CPM |
| 148 | + uses: actions/cache@v4 |
| 149 | + with: |
| 150 | + path: ${{ env.CPM_SOURCE_CACHE }} |
| 151 | + key: ${{ runner.os }}-mingw-cpm-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} |
| 152 | + restore-keys: | |
| 153 | + ${{ runner.os }}-mingw-cpm- |
| 154 | +
|
| 155 | + - name: Configure (Core, MinGW) |
| 156 | + shell: msys2 {0} |
| 157 | + run: > |
| 158 | + cmake -S . -B build_core_mingw -G Ninja |
| 159 | + -DGENESISENGINE_ENABLE_TESTS=ON |
| 160 | + -DGENESIS_BUILD_GUI=OFF |
| 161 | + -DGENESIS_WITH_STYLE=OFF |
| 162 | + -DCMAKE_BUILD_TYPE=Debug |
| 163 | +
|
| 164 | + - name: Build (Core, MinGW) |
| 165 | + shell: msys2 {0} |
| 166 | + run: cmake --build build_core_mingw --parallel |
| 167 | + |
| 168 | + - name: Test (ctest, MinGW) |
| 169 | + shell: msys2 {0} |
| 170 | + run: ctest --test-dir build_core_mingw --output-on-failure |
0 commit comments