From 913ed627c6460eb5f85cf3d762262e7e1b31e5a2 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 18 Aug 2026 02:42:57 +0200 Subject: [PATCH] Gate CultMesh portability on Windows and Linux --- .github/workflows/cultmesh-portability.yml | 55 ++++++++++++++++++++++ scripts/verify-eve-two-runtime-sample.ps1 | 17 +++++-- 2 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/cultmesh-portability.yml diff --git a/.github/workflows/cultmesh-portability.yml b/.github/workflows/cultmesh-portability.yml new file mode 100644 index 00000000..b8d29e5d --- /dev/null +++ b/.github/workflows/cultmesh-portability.yml @@ -0,0 +1,55 @@ +name: CultMesh portability and performance + +on: + pull_request: + workflow_dispatch: + +jobs: + reactive-and-resource-lifetime: + name: ${{ matrix.os }} reactive semantics and leases + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + + steps: + - name: Check out CultLib + uses: actions/checkout@v4 + + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install TypeScript workspace dependencies + run: npm install --no-package-lock + + - name: Install Python CultCache package + run: python -m pip install -e packages/cultcache-py + + - name: Verify explicit reactive scheduling across runtimes + shell: pwsh + run: ./scripts/verify-reactive-document-scaling.ps1 + + - name: Measure representative reactive workload + shell: pwsh + run: ./scripts/measure-reactive-document-performance.ps1 -Quick + + - name: Churn 100,000 distinct document leases + run: >- + dotnet test tests/GameCult.Mesh.Tests/GameCult.Mesh.Tests.csproj + --filter FullyQualifiedName~Document_OneHundredThousandDistinctLeaseCyclesLeaveNoResourcesOrCallbacks + --logger "console;verbosity=minimal" diff --git a/scripts/verify-eve-two-runtime-sample.ps1 b/scripts/verify-eve-two-runtime-sample.ps1 index f6d4ebce..8dfef6dd 100644 --- a/scripts/verify-eve-two-runtime-sample.ps1 +++ b/scripts/verify-eve-two-runtime-sample.ps1 @@ -15,10 +15,16 @@ $packageRoots = @( $eveContractsPackage, $eveBrowserPackage ) +$onWindows = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Win32NT -$nodeCommand = Get-Command node.exe -ErrorAction SilentlyContinue +$nodeCommand = Get-Command node -ErrorAction SilentlyContinue if (-not $nodeCommand) { - $standardNode = Join-Path $env:ProgramFiles "nodejs\node.exe" + $standardNode = if ($onWindows -and $env:ProgramFiles) { + Join-Path $env:ProgramFiles "nodejs\node.exe" + } + else { + "" + } if (Test-Path -LiteralPath $standardNode) { $nodeCommand = Get-Item -LiteralPath $standardNode } @@ -28,7 +34,12 @@ if (-not $nodeCommand) { } $nodePath = $nodeCommand.Source $nodeDirectory = Split-Path -Parent $nodePath -$npmPath = Join-Path $nodeDirectory "npm.cmd" +$npmPath = if ($onWindows) { + Join-Path $nodeDirectory "npm.cmd" +} +else { + (Get-Command npm -ErrorAction Stop).Source +} if (-not (Test-Path -LiteralPath $npmPath)) { throw "npm was not found beside Node.js: $npmPath" }