Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/skills/arch-packaging/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Distribution packaging architecture for SGE games.

## Cross-Platform JVM Distribution
- `sgeCrossNativeLibDir` setting: points to `sge-deps/native-components/target/cross/` (CI staging area)
- Native libs built externally in sge-native-components, distributed as provider JARs
- Native libs built externally in sge-native-providers, distributed as provider JARs
- CI extracts provider JARs to the staging dir; per-platform libs in `cross/<classifier>/`
- ANGLE libs (libEGL, libGLESv2) bundled alongside Rust libs
- Static curl libs (from stunnel/static-curl) for self-contained Scala Native releases
Expand All @@ -27,7 +27,7 @@ Distribution packaging architecture for SGE games.
## Release Workflow

Native libs are built externally in
[sge-native-components](https://github.com/kubuszok/sge-native-components) and
[sge-native-providers](https://github.com/kubuszok/sge-native-providers) and
distributed as provider JARs from Maven. The release flow consumes those
provider JARs and builds the per-platform demo archives via sbt
command aliases defined in `demos/build.sbt`.
Expand Down
49 changes: 40 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ jobs:
#
# Non-blocking initially: validates that every file with a `Covenant: full-port`
# header still passes (no method dropped, no shortcut introduced) and that no
# new shortcut markers leaked into covenanted files. Once the steady state holds
# for ~1 week, drop `continue-on-error` to make this a hard gate.
# new shortcut markers leaked into covenanted files.

enforce:
name: re-scale enforce
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -103,7 +101,6 @@ jobs:
test-jvm:
name: JVM tests (${{ matrix.label }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
Expand All @@ -114,6 +111,10 @@ jobs:
- os: ubuntu-24.04-arm
label: linux-aarch64
platform: linux-aarch64
- os: macos-latest
label: macos-x86_64
platform: macos-x86_64
architecture: x64
- os: macos-latest
label: macos-aarch64
platform: macos-aarch64
Expand All @@ -133,11 +134,22 @@ jobs:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: sbt
architecture: ${{ matrix.architecture || '' }}

- uses: sbt/setup-sbt@v1

- name: Run JVM tests (core + all extensions)
run: sbt test-jvm
- name: Run JVM tests with coverage (core + all extensions)
run: sbt test-coverage

- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
files: target/scala-3.8.3/scoverage-report/scoverage.xml
flags: ${{ matrix.platform }}
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# ─── Browser integration tests (Scala.js + Playwright) ─────────────

Expand Down Expand Up @@ -187,7 +199,6 @@ jobs:
test-native:
name: Scala Native tests (${{ matrix.label }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
Expand All @@ -198,6 +209,10 @@ jobs:
- os: ubuntu-24.04-arm
label: linux-aarch64
platform: linux-aarch64
- os: macos-latest
label: macos-x86_64
platform: macos-x86_64
architecture: x64
- os: macos-latest
label: macos-aarch64
platform: macos-aarch64
Expand All @@ -214,6 +229,7 @@ jobs:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: sbt
architecture: ${{ matrix.architecture || '' }}

- uses: sbt/setup-sbt@v1

Expand All @@ -239,7 +255,7 @@ jobs:
name: Native FFI IT tests (${{ matrix.label }})
needs: [test-native]
runs-on: ${{ matrix.os }}
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
Expand All @@ -248,8 +264,13 @@ jobs:
label: linux-x86_64
- os: ubuntu-24.04-arm
label: linux-aarch64
- os: macos-latest
label: macos-x86_64
architecture: x64
- os: macos-latest
label: macos-aarch64
- os: windows-latest
label: windows-x86_64
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -260,6 +281,7 @@ jobs:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: sbt
architecture: ${{ matrix.architecture || '' }}

- uses: sbt/setup-sbt@v1

Expand All @@ -270,6 +292,10 @@ jobs:
sudo apt-get install -y clang
sudo apt-get install -y libstdc++-12-dev || sudo apt-get install -y libstdc++-14-dev || true

- name: Install Scala Native system dependencies (Windows)
if: runner.os == 'Windows'
run: choco install llvm --yes

- name: Run native FFI validation (headless)
run: sbt 'sge-it-native-ffi/run -- --headless'
env:
Expand Down Expand Up @@ -496,7 +522,6 @@ jobs:
name: Verify release (${{ matrix.label }})
needs: [test-jvm, test-native]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
Expand All @@ -513,6 +538,11 @@ jobs:
label: macos-aarch64
platform: macos-aarch64
native: true
- os: macos-latest
label: macos-x86_64
platform: macos-x86_64
native: true
architecture: x64
- os: windows-latest
label: windows-x86_64
platform: windows-x86_64
Expand All @@ -531,6 +561,7 @@ jobs:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: sbt
architecture: ${{ matrix.architecture || '' }}

- uses: sbt/setup-sbt@v1

Expand Down
2 changes: 1 addition & 1 deletion .rescale/doctor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ steps:
hint: "brew install freetype"

# ── Optional: cross-platform native release builds ─────────────────
# Native binaries are built externally in sge-native-components and
# Native binaries are built externally in sge-native-providers and
# distributed as provider JARs from Maven. These steps are only needed
# if you want to *build* the natives locally rather than consume the
# provider JARs.
Expand Down
13 changes: 7 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ converted, 0 not started, 66 skipped (stdlib replacements), 0 deferred.

## Build Rules

- Scala **3.8.2**, compiler flags: `-deprecation -feature -no-indent -rewrite -Werror`
- Scala **3.8.3**, compiler flags: `-deprecation -feature -no-indent -Werror`
- **Linter flags**: `-Wimplausible-patterns -Wrecurse-with-default -Wenum-comment-discard -Wunused:imports,privates,locals,patvars,nowarn`
- **Braces required** (`-no-indent`): `{}` for all `trait`, `class`, `enum`, method defs
- **Split packages**: `package sge` / `package graphics` / `package g2d` (never flat)
Expand Down Expand Up @@ -214,24 +214,25 @@ gate.

| Job group | Platforms |
|-----------|-----------|
| JVM tests | linux-x86_64, linux-aarch64, macos-aarch64, windows-x86_64, windows-aarch64 |
| Scala Native tests | linux-x86_64, linux-aarch64, macos-aarch64, windows-x86_64 |
| Release verification | above + macos-x86_64 (Rosetta, JVM only) |
| JVM tests + coverage | linux-x86_64, linux-aarch64, macos-aarch64, macos-x86_64 (Rosetta), windows-x86_64, windows-aarch64 |
| Scala Native tests | linux-x86_64, linux-aarch64, macos-aarch64, macos-x86_64 (Rosetta), windows-x86_64 |
| Native FFI IT | linux-x86_64, linux-aarch64, macos-aarch64, macos-x86_64 (Rosetta), windows-x86_64 |
| Release verification | all JVM platforms + native on Linux, macOS (both archs) |
| Android tests | ubuntu-latest (x86_64 emulator) — smoke + Pong demo APK |
| Browser/JS | ubuntu-latest — Scala.js tests, Playwright smoke, browser packaging |
| Demo compilation | ubuntu-latest — all 11 demos × JVM + JS + Native |

**CI-specific mechanisms:**
- macOS x86_64 via Rosetta: `actions/setup-java` with `architecture: x64` on ARM runners
- Demos always consume published sge-build plugin (`sbt publishLocal` in sge-build/ required after plugin changes)
- `SGE_SKIP_NATIVE_VALIDATION=true` — skip native lib validation when only Android/subset libs present
- `matrix.native` flag — controls which verify-release steps run per platform (native link, static curl)
- ANGLE shared libs downloaded in build-native (workflow now lives in sge-native-components repo)
- ANGLE shared libs built in sge-native-providers repo, distributed as provider JARs
- Native lib stubs (libobjc on Linux, companion .lib on Windows) are embedded in provider JARs
- Windows curl uses MSVC-built static libs from kubuszok/curl-natives (real HTTP, not stubs)

**Known CI limitations (excluded from pass/fail):**
- Android: JSON_XML, FILEHANDLE_TYPES, TOUCH_DISPATCH, LIFECYCLE, CLIPBOARD
- macOS x86_64: no runner (macos-13 retired); release verified via Rosetta
- Windows aarch64: Scala Native unsupported (generates x64 code); JVM tests pass
- Scaladoc: disabled (`packageDoc/publishArtifact := false`); non-blocking probe monitors upstream fix

Expand Down
Loading
Loading