okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
ffb3d9b31
main
1name : Checks 2 3# The fast checks (tools/check), one job per step so a failure names its step: the CPU CMake preset, the Python suites, the host's 4# typecheck / test / build. No GPU, no model and no download of weights. The config snapshot has its own workflow (snapshot.yml) 5# and the backend compile checks theirs (backends.yml). Run the same thing by hand: python tools/check --only <step> 6 7on : 8push : 9branches : [ main ] 10paths : 11- .github/workflows/check.yml 12- tools/check 13- requirements*.txt 14- CMakeLists.txt 15- CMakePresets.json 16- cmake/** 17- src/** 18- include/** 19- bench/micro/** 20- third_party/** 21- tests/** 22- serve/** 23- strata.py 24- setup.py 25- strata_cli/** 26- strata_control/** 27- tools/** 28- packaging/** 29- docker/** 30- apps/host/** 31- apps/desktop/** 32- metal/** 33- sycl/** 34pull_request : 35paths : 36- .github/workflows/check.yml 37- tools/check 38- requirements*.txt 39- CMakeLists.txt 40- CMakePresets.json 41- cmake/** 42- src/** 43- include/** 44- bench/micro/** 45- third_party/** 46- tests/** 47- serve/** 48- strata.py 49- setup.py 50- strata_cli/** 51- strata_control/** 52- tools/** 53- packaging/** 54- docker/** 55- apps/host/** 56- apps/desktop/** 57- metal/** 58- sycl/** 59workflow_dispatch : 60 61permissions : 62contents : read 63 64concurrency : 65group : checks-${{ github.ref }} 66cancel-in-progress : true 67 68jobs : 69linux : 70name : Linux / ${{ matrix.name }} 71runs-on : ubuntu-24.04 72timeout-minutes : 90 73strategy : 74fail-fast : false 75matrix : 76include : 77- { name : cpu CMake preset , only : cmake-cpu } 78- { name : Python tests/ , only : py-tests } 79- { name : Python serve/ , only : py-serve } 80- { name : Python tools/ , only : py-tools } 81- { name : host typecheck + test + build , only : "host-typecheck,host-test,host-build" } 82steps : 83- uses : actions/checkout@v4 84with : 85persist-credentials : false 86- uses : actions/setup-python@v5 87with : 88python-version : '3.12' 89cache : pip 90cache-dependency-path : requirements*.txt 91- uses : actions/setup-node@v4 92if : ${{ startsWith(matrix.only, 'host') }} 93with : 94node-version : '24' 95cache : npm 96cache-dependency-path : apps/host/package-lock.json 97- name : Python packages 98run : python -m pip install -r requirements.txt -r requirements-dev.txt -r requirements-build.txt 99- name : tools/check 100run : python tools/check --only "${{ matrix.only }}" --keep --scratch "$RUNNER_TEMP/check" --json "$RUNNER_TEMP/check/result.json" 101- name : Logs 102if : ${{ failure() }} 103uses : actions/upload-artifact@v4 104with : 105name : check-linux-${{ strategy.job-index }} 106path : | 107${{ runner.temp }}/check/*.log 108${{ runner.temp }}/check/result.json 109retention-days : 7 110 111windows : 112name : Windows / ${{ matrix.name }} 113runs-on : windows-2022 114timeout-minutes : 120 115strategy : 116fail-fast : false 117matrix : 118include : 119- { name : cpu CMake preset (MSVC) , only : cmake-cpu } 120- { name : Python tests/ , only : py-tests } 121- { name : Python serve/ , only : py-serve } 122- { name : Python tools/ , only : py-tools } 123- { name : host typecheck + test + build , only : "host-typecheck,host-test,host-build" } 124steps : 125- uses : actions/checkout@v4 126with : 127persist-credentials : false 128- uses : actions/setup-python@v5 129with : 130python-version : '3.12' 131cache : pip 132cache-dependency-path : requirements*.txt 133- uses : actions/setup-node@v4 134if : ${{ startsWith(matrix.only, 'host') }} 135with : 136node-version : '24' 137cache : npm 138cache-dependency-path : apps/host/package-lock.json 139- name : Python packages 140run : python -m pip install -r requirements.txt -r requirements-dev.txt -r requirements-build.txt 141# Diagnostic, not a check: what a Windows PowerShell 5.1 child returns when its parent runs under PowerShell 7 (a user who starts 142# the app or `strata` from a PowerShell 7 window). The tests drop PowerShell 7's PSModulePath entries; the product does not yet. 143- name : PowerShell 7 parent (diagnostic) 144if : ${{ startsWith(matrix.only, 'host') }} 145continue-on-error : true 146shell : pwsh 147env : 148STRATA_HOME : ${{ runner.temp }}\ps7-probe 149run : | 150"PSModulePath: $env:PSModulePath" 151"--- powershell.exe Get-CimInstance | Select-Object (as hardware.mjs)" 152powershell.exe -NoProfile -NonInteractive -Command "Get-CimInstance Win32_VideoController | Select-Object Name,PNPDeviceID | ConvertTo-Json -Compress" 153"exit $LASTEXITCODE" 154"--- the host's hardware probe (apps/host/server/hardware.mjs detect)" 155node -e "import('./apps/host/server/hardware.mjs').then(m => m.detect({ force: true })).then(h => console.log(JSON.stringify({ cpu: h.cpu, gpus: h.gpus })), e => console.log('ERROR', e && e.stack))" 156"--- setup.py cpu_info (powershell Get-CimInstance Win32_Processor)" 157python -c "import setup; print(repr(setup.cpu_info()))" 158# tools/check finds Visual Studio's compiler itself (vcvars64.bat); bash is Git for Windows' (the tester-README tests need it) 159- name : tools/check 160run : python tools/check --only "${{ matrix.only }}" --keep --scratch "$env:RUNNER_TEMP\check" --json "$env:RUNNER_TEMP\check\result.json" 161- name : Logs 162if : ${{ failure() }} 163uses : actions/upload-artifact@v4 164with : 165name : check-windows-${{ strategy.job-index }} 166path : | 167${{ runner.temp }}\check\*.log 168${{ runner.temp }}\check\result.json 169retention-days : 7 170 171macos : 172# Cheap and useful (the audit found the host and Python fixtures reading the Mac's own paths), but this job has not run on a 173# Mac runner yet: it reports and does not block until its first green run. 174name : macOS / ${{ matrix.name }} 175runs-on : macos-15 176timeout-minutes : 60 177continue-on-error : true 178strategy : 179fail-fast : false 180matrix : 181include : 182- { name : Python tools/ , only : py-tools } 183- { name : host typecheck + test + build , only : "host-typecheck,host-test,host-build" } 184steps : 185- uses : actions/checkout@v4 186with : 187persist-credentials : false 188- uses : actions/setup-python@v5 189with : 190python-version : '3.12' 191cache : pip 192cache-dependency-path : requirements*.txt 193- uses : actions/setup-node@v4 194if : ${{ startsWith(matrix.only, 'host') }} 195with : 196node-version : '24' 197cache : npm 198cache-dependency-path : apps/host/package-lock.json 199- name : Python packages 200run : python -m pip install -r requirements.txt -r requirements-dev.txt 201- name : tools/check 202run : python tools/check --only "${{ matrix.only }}" --keep --scratch "$RUNNER_TEMP/check" --json "$RUNNER_TEMP/check/result.json" 203- name : Logs 204if : ${{ failure() }} 205uses : actions/upload-artifact@v4 206with : 207name : check-macos-${{ strategy.job-index }} 208path : | 209${{ runner.temp }}/check/*.log 210${{ runner.temp }}/check/result.json 211retention-days : 7