Skip to content

Optimize bridge for Safari compatibility; add timeout for stalled run… #13

Optimize bridge for Safari compatibility; add timeout for stalled run…

Optimize bridge for Safari compatibility; add timeout for stalled run… #13

Workflow file for this run

# CI for rell-playground.
#
# Three jobs:
# - bridge: compiles the Kotlin/JVM bridge through TeaVM, producing the JS module the SPA
# worker imports. Resolves rell3 artifacts from the upstream GitLab Maven repo
# configured in settings.gradle.kts — no sibling checkout / mavenLocal publish.
# - build: Node/Vite build of the SPA, consuming the bridge JS output. Also runs the
# Vitest survival kit against the bridge.
# - deploy: publishes web/dist/ to GitHub Pages on master.
name: CI
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
permissions:
contents: read
# One in-flight run per ref; a newer push cancels the older one.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
GRADLE_OPTS: "-Xmx4g -Dorg.gradle.caching=true -Dorg.gradle.parallel=true"
jobs:
bridge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Java 21 — TeaVM's tooling requires 21 (its ASM cannot read class files compiled with
# Java 25's bytecode).
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build bridge JS (TeaVM)
run: ./gradlew :bridge:build
- name: Upload bridge JS
uses: actions/upload-artifact@v4
with:
name: bridge-js
path: web/public/teavm/
retention-days: 7
build:
needs: bridge
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download bridge JS
uses: actions/download-artifact@v4
with:
name: bridge-js
path: web/public/teavm/
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
# node-gradle plugin downloads its pinned Node version into web/build/nodejs, so no
# actions/setup-node step is needed. We just need a JDK to drive Gradle.
- name: Run survival kit (Vitest)
run: ./gradlew :web:vitestRun
- name: Build SPA
run: ./gradlew :web:assemble
- name: Upload SPA dist
uses: actions/upload-artifact@v4
with:
name: spa-dist
path: web/dist/
retention-days: 7
deploy:
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download SPA dist
uses: actions/download-artifact@v4
with:
name: spa-dist
path: dist
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with: { path: dist }
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4