Add cross-runtime interop workflow

This commit is contained in:
Meta Vens 2026-06-16 17:09:33 +01:00
commit e06e3f5b3a
3 changed files with 85 additions and 8 deletions

79
.github/workflows/cultnet-interop.yml vendored Normal file
View file

@ -0,0 +1,79 @@
name: CultNet cross-runtime interop
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
interop:
name: C# / TypeScript / Rust / Python / Kotlin
runs-on: windows-latest
timeout-minutes: 30
env:
DOTNET: dotnet
CARGO: cargo
PYTHON: python
KOTLIN_VERSION: 2.2.21
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
cache-dependency-path: |
packages/cultcache-ts/package-lock.json
packages/cultnet-ts/package-lock.json
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Install Kotlin compiler
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$version = $env:KOTLIN_VERSION
$zip = Join-Path $env:RUNNER_TEMP "kotlin-compiler-$version.zip"
$root = Join-Path $env:RUNNER_TEMP "kotlin"
Invoke-WebRequest "https://github.com/JetBrains/kotlin/releases/download/v$version/kotlin-compiler-$version.zip" -OutFile $zip
Expand-Archive -Path $zip -DestinationPath $root -Force
$kotlinHome = Join-Path $root "kotlinc"
if (-not (Test-Path (Join-Path $kotlinHome "bin\kotlinc.bat"))) {
throw "Kotlin compiler was not expanded to $kotlinHome"
}
"KOTLIN_HOME=$kotlinHome" | Out-File -FilePath $env:GITHUB_ENV -Append
"KOTLIN_JAVA_HOME=$env:JAVA_HOME" | Out-File -FilePath $env:GITHUB_ENV -Append
"$kotlinHome\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: Install Node dependencies
run: npm install --no-package-lock
- name: Build Kotlin interop peer
shell: pwsh
run: .\packages\cultmesh-kotlin\build.ps1
- name: Run cross-runtime interop harness
run: npm run test:interop --workspace packages/cultnet-ts