Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5639acb
Run Unity 2D projects as Codename One applications
shai-almog Oct 9, 2026
e453c39
Unity project test: hide dotnet without dropping its directory; arm64…
shai-almog Oct 9, 2026
bb185e0
Unity compat: review findings, JavaScript numeric fixes, chart transform
shai-almog Oct 9, 2026
8a51fcb
Unity compat: reseed six JavaScript theme goldens, keep CodeQL off th…
shai-almog Oct 9, 2026
f7195ae
Unity guide: Application.platform, isMobilePlatform and timeSinceLeve…
shai-almog Oct 10, 2026
f0abf10
Unity compat: second review round, macOS gradient golden, x64 perf ba…
shai-almog Oct 10, 2026
5d216b7
Unity compat: third review round
shai-almog Oct 10, 2026
db9fb9a
Unity compat: screenshot tests in the hellocodenameone suite
shai-almog Oct 10, 2026
32bbad7
Unity compat: transpile the screenshot gallery once on Linux for ever…
shai-almog Oct 10, 2026
014ee2e
Unity compat: give every hand-assembled translation the runtime, fix …
shai-almog Oct 10, 2026
6f60a5c
GPU: the framebuffer's alpha accumulates coverage on every backend
shai-almog Oct 10, 2026
bbeda29
Native Linux and Windows: a native: font keeps the style its name ask…
shai-almog Oct 10, 2026
1a18fdf
Unity compat: paint text on the event dispatch thread, wherever the f…
shai-almog Oct 10, 2026
09afe2e
Unity compat: value semantics, coroutine and Instantiate order, audio…
shai-almog Oct 11, 2026
8e9102b
Unity compat: screenshot goldens for iOS, tvOS and Mac Catalyst
shai-almog Oct 12, 2026
c13ff1c
Merge remote-tracking branch 'origin/master' into unity-compat
shai-almog Oct 12, 2026
80b2af3
Perf overlay: drop the Linux hello RAM row master has since rebaselined
shai-almog Oct 12, 2026
0e7579e
Merge master into unity-compat
shai-almog Oct 12, 2026
55dbb30
Apple CI: one watch slice, one test server per run, one notification …
shai-almog Oct 12, 2026
6e1f714
Unity compat: unsigned boxes, delegate types, Math.Pow, deleted-proje…
shai-almog Oct 13, 2026
c0d6ffc
Unity compat: struct arrays from generic members, null receivers, ray…
shai-almog Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
53 changes: 53 additions & 0 deletions .github/actions/unity-gallery-prebuilt/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Unpack the Unity gallery prebuilt
description: >-
Downloads the compiled Unity gallery that unity-gallery-prebuilt.yml uploaded
in this run and puts it where a build of scripts/hellocodenameone reads it,
so the job needs neither the .NET SDK nor the Unity modules.

# scripts/hellocodenameone compiles a Unity project
# (scripts/unity-compat-samples/gallery). Compiling it takes the .NET SDK and
# the two Maven modules behind -Dunity-compat; one Linux job per workflow run
# does that (.github/workflows/unity-gallery-prebuilt.yml) and every job that
# builds the application uses this action instead.
#
# Where it goes in a job:
# - AFTER the checkout (the action is read from the workspace) and after
# anything that restores or installs the framework into the local Maven
# repository: a cache or a bundle restored later could put another
# codenameone-unity-compat jar back over the one unpacked here, and the
# compiled output is good only with the exact jars of the archive.
# - BEFORE the first Maven command that builds the application.
# - The job must `needs:` the job that calls unity-gallery-prebuilt.yml.
#
# A job that builds the application without it fails in compile-unity, asking
# for the .NET SDK.

inputs:
maven-repo-local:
description: The local Maven repository the job builds against. Empty for ~/.m2/repository.
required: false
default: ''

runs:
using: composite
steps:
- name: Download the Unity gallery prebuilt
uses: ./.github/actions/download-artifact-with-retry
with:
name: unity-gallery-prebuilt
path: ${{ runner.temp }}/unity-gallery-prebuilt

# bash on every runner, Git Bash on Windows: the script is bash. The
# archive is named through RUNNER_TEMP rather than the expression above so
# that a Windows path is never pasted into the script text, where its
# backslashes would be escapes.
- name: Unpack the Unity gallery prebuilt
shell: bash
env:
UNITY_GALLERY_MAVEN_REPO_LOCAL: ${{ inputs.maven-repo-local }}
run: |
set -euo pipefail
if [ -n "$UNITY_GALLERY_MAVEN_REPO_LOCAL" ]; then
export MAVEN_REPO_LOCAL="$UNITY_GALLERY_MAVEN_REPO_LOCAL"
fi
bash scripts/unity-gallery-prebuilt.sh unpack "$RUNNER_TEMP/unity-gallery-prebuilt/unity-gallery-prebuilt.tgz"
82 changes: 72 additions & 10 deletions .github/ci/apple-checks.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**",
"scripts/hellocodenameone/backend/**",
"scripts/lib/cn1ss.sh"
"scripts/lib/cn1ss.sh",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
],
"push": [
".github/workflows/scripts-ios.yml",
Expand Down Expand Up @@ -90,7 +98,15 @@
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**",
"scripts/hellocodenameone/backend/**",
"scripts/lib/cn1ss.sh"
"scripts/lib/cn1ss.sh",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
]
},
"native": {
Expand Down Expand Up @@ -125,7 +141,15 @@
"!maven/cn1-admob/**",
"!maven/cn1-applovin/**",
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**"
"!maven/core-unittests/**",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
],
"push": [
".github/workflows/scripts-ios-native.yml",
Expand Down Expand Up @@ -158,7 +182,15 @@
"!maven/cn1-admob/**",
"!maven/cn1-applovin/**",
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**"
"!maven/core-unittests/**",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
]
},
"packaging": {
Expand All @@ -176,10 +208,17 @@
"scripts/check-ios-private-api.py",
"scripts/check-ios-sdk-deltas.py",
"scripts/run-ios-ui-tests.sh",
"scripts/run-ios-native-tests.sh",
"scripts/ios/**",
"scripts/hellocodenameone/**",
"!docs/**"
"!docs/**",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
],
"push": [
".github/workflows/ios-packaging.yml",
Expand All @@ -195,10 +234,17 @@
"scripts/check-ios-private-api.py",
"scripts/check-ios-sdk-deltas.py",
"scripts/run-ios-ui-tests.sh",
"scripts/run-ios-native-tests.sh",
"scripts/ios/**",
"scripts/hellocodenameone/**",
"!docs/**"
"!docs/**",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
]
},
"catalyst": {
Expand Down Expand Up @@ -234,7 +280,15 @@
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**",
"!docs/**",
"scripts/hellocodenameone/backend/**"
"scripts/hellocodenameone/backend/**",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
],
"push": [
".github/workflows/scripts-mac-catalyst.yml",
Expand Down Expand Up @@ -262,7 +316,15 @@
"!maven/cn1-applovin/**",
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**",
"scripts/hellocodenameone/backend/**"
"scripts/hellocodenameone/backend/**",
"scripts/unity-compat-samples/gallery/**",
"maven/cil-translator/**",
"maven/unity-compat/**",
"maven/build-engine/src/main/java/com/codename1/maven/Unity*",
"maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*",
"scripts/unity-gallery-prebuilt.sh",
".github/workflows/unity-gallery-prebuilt.yml",
".github/actions/unity-gallery-prebuilt/**"
]
}
}
5 changes: 5 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ paths-ignore:
# casts -- so every program there must compile and behave exactly as javac's
# output does; "fixing" what CodeQL flags would remove the case under test.
- 'vm/JavaCompiler/tests/**'
# The JavaScript target's numeric differential fixture, for the same reason:
# it compares narrowing compound assignments, saturating casts and overflow
# against the JVM, and writing the casts out would change the bytecode shape
# (the DUP2 of a compound array store) that the comparison is there to cover.
- 'vm/tests/src/test/resources/com/codename1/tools/translator/JsNumericDifferentialApp.java'
54 changes: 53 additions & 1 deletion .github/workflows/_build-ios-port.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ name: _Build iOS port (reusable)

on:
workflow_call:
inputs:
test_server:
description: "Also build the CN1SS test server and hand it over beside the bundle. For callers whose jobs run a screenshot suite."
type: boolean
default: false
outputs:
cn1_built_cache_key:
description: "Cache key the build job used for the cn1-built artifact bundle. Dependent jobs should reuse this exact key to avoid recomputing the hash and getting a spurious cache miss."
Expand Down Expand Up @@ -191,10 +196,57 @@ jobs:
"${RUNNER_TEMP#/}/codenameone-tools"
ls -la "$RUNNER_TEMP/cn1-built-bundle.tar"

# The CI test server (scripts/hellocodenameone/backend) as a runnable copy,
# the way linux-build-run.yml and the Windows workflows hand theirs over:
# `server.sh dist` here, CN1SS_SERVER_DIST in the jobs that run a suite.
#
# Every screenshot job used to build it for itself, at the top of its
# test step: install the backend runtime, the build engine and the
# plugin from this checkout, then compile the server. Measured, that was
# 3 to 3.6 minutes in each macos-15 job and 6.5 to 9.7 minutes on the
# Xcode 27 leg, whose runner is slower and whose 95 minute limit it was
# spending -- five or six builds of the same classes per run. Built once
# here it costs this job the 3.5 minutes one of them paid.
#
# After the bundle, on purpose: the install below rewrites the plugin and
# the backend jars in ~/.m2, and the bundle is what the application
# builds read. It is the tree the consumers always restored.
#
# A second tar in the same artifact, not an entry appended to the first,
# so nothing done here can damage the handoff every job depends on. The
# server is JVM classes and jars (the SQLite driver carries every
# platform's library), so the copy runs anywhere; a consumer runs it on
# the JAVA17_HOME this job built it with, which is in the bundle.
#
# Never fatal. A job that finds no copy builds its own, exactly as it did
# before (cn1ss_ws_prepare in scripts/lib/cn1ss.sh), so a failure here
# costs the minutes back and nothing else.
- name: Build the test server
if: ${{ inputs.test_server }}
continue-on-error: true
timeout-minutes: 25
run: |
set -euo pipefail
source "$RUNNER_TEMP/codenameone-tools/tools/env.sh"
DIST="$RUNNER_TEMP/cn1ss-server"
if RETRY_ATTEMPTS=2 bash scripts/ci/retry.sh \
scripts/hellocodenameone/backend/server.sh dist "$DIST" \
&& test -f "$DIST/classes/META-INF/cn1-backend-main"; then
tar -C / -cf "$RUNNER_TEMP/cn1ss-server.tar.partial" "${DIST#/}"
mv "$RUNNER_TEMP/cn1ss-server.tar.partial" "$RUNNER_TEMP/cn1ss-server.tar"
ls -la "$RUNNER_TEMP/cn1ss-server.tar"
else
rm -f "$RUNNER_TEMP/cn1ss-server.tar"
echo "::warning::The test server did not build here; each suite job will build its own."
fi

- name: Upload built CN1 + iOS port bundle
uses: actions/upload-artifact@v4
with:
name: cn1-built-bundle
path: ${{ runner.temp }}/cn1-built-bundle.tar
# cn1ss-server.tar is there only when the step above produced it.
path: |
${{ runner.temp }}/cn1-built-bundle.tar
${{ runner.temp }}/cn1ss-server.tar
retention-days: 1
if-no-files-found: error
32 changes: 32 additions & 0 deletions .github/workflows/car-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ name: Car (Android Auto) integration
'on':
pull_request:
paths:
# The application these jobs build compiles a Unity project, from an
# archive that unity-gallery-prebuilt.yml makes out of these.
- 'scripts/unity-compat-samples/gallery/**'
- 'maven/cil-translator/**'
- 'maven/unity-compat/**'
- 'maven/build-engine/src/main/java/com/codename1/maven/Unity*'
- 'maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*'
- 'scripts/unity-gallery-prebuilt.sh'
- '.github/workflows/unity-gallery-prebuilt.yml'
- '.github/actions/unity-gallery-prebuilt/**'
- '.github/workflows/car-android.yml'
- 'CodenameOne/src/com/codename1/car/**'
- 'Ports/Android/src/com/codename1/impl/android/AndroidCarSupport.java'
Expand All @@ -31,6 +41,16 @@ name: Car (Android Auto) integration
branches:
- master
paths:
# The application these jobs build compiles a Unity project, from an
# archive that unity-gallery-prebuilt.yml makes out of these.
- 'scripts/unity-compat-samples/gallery/**'
- 'maven/cil-translator/**'
- 'maven/unity-compat/**'
- 'maven/build-engine/src/main/java/com/codename1/maven/Unity*'
- 'maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*'
- 'scripts/unity-gallery-prebuilt.sh'
- '.github/workflows/unity-gallery-prebuilt.yml'
- '.github/actions/unity-gallery-prebuilt/**'
- '.github/workflows/car-android.yml'
- 'CodenameOne/src/com/codename1/car/**'
- 'Ports/Android/src/com/codename1/impl/android/AndroidCarSupport.java'
Expand Down Expand Up @@ -58,7 +78,14 @@ concurrency:
cancel-in-progress: true

jobs:
# The application has a Unity project in it. One Linux job compiles it and
# hands the result to the jobs below as an artifact; none of them installs
# the .NET SDK or builds the Unity modules.
unity-gallery:
uses: ./.github/workflows/unity-gallery-prebuilt.yml

car-android:
needs: unity-gallery
name: Car Android Auto
permissions:
contents: read
Expand Down Expand Up @@ -109,6 +136,11 @@ jobs:
run: ./scripts/setup-workspace.sh -q -DskipTests
- name: Build Android port
run: ./scripts/build-android-port.sh -q -DskipTests
# After everything that fills the local Maven repository and before the
# application is built; this job has no .NET SDK (see the action).
- name: Unpack the Unity gallery prebuilt
uses: ./.github/actions/unity-gallery-prebuilt

- name: Build Hello Codename One Android app (car-enabled)
id: build-android-app
run: |
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/car-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ name: Car (CarPlay) integration
'on':
pull_request:
paths:
# The application these jobs build compiles a Unity project, from an
# archive that unity-gallery-prebuilt.yml makes out of these.
- 'scripts/unity-compat-samples/gallery/**'
- 'maven/cil-translator/**'
- 'maven/unity-compat/**'
- 'maven/build-engine/src/main/java/com/codename1/maven/Unity*'
- 'maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*'
- 'scripts/unity-gallery-prebuilt.sh'
- '.github/workflows/unity-gallery-prebuilt.yml'
- '.github/actions/unity-gallery-prebuilt/**'
- '.github/workflows/car-ios.yml'
- 'CodenameOne/src/com/codename1/car/**'
- 'Ports/iOSPort/src/com/codename1/impl/ios/IOSCarBridge.java'
Expand All @@ -22,6 +32,16 @@ name: Car (CarPlay) integration
branches:
- master
paths:
# The application these jobs build compiles a Unity project, from an
# archive that unity-gallery-prebuilt.yml makes out of these.
- 'scripts/unity-compat-samples/gallery/**'
- 'maven/cil-translator/**'
- 'maven/unity-compat/**'
- 'maven/build-engine/src/main/java/com/codename1/maven/Unity*'
- 'maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*'
- 'scripts/unity-gallery-prebuilt.sh'
- '.github/workflows/unity-gallery-prebuilt.yml'
- '.github/actions/unity-gallery-prebuilt/**'
- '.github/workflows/car-ios.yml'
- 'CodenameOne/src/com/codename1/car/**'
- 'Ports/iOSPort/src/com/codename1/impl/ios/IOSCarBridge.java'
Expand All @@ -39,7 +59,14 @@ concurrency:
cancel-in-progress: true

jobs:
# The application has a Unity project in it. One Linux job compiles it and
# hands the result to the jobs below as an artifact; none of them installs
# the .NET SDK or builds the Unity modules.
unity-gallery:
uses: ./.github/workflows/unity-gallery-prebuilt.yml

car-ios:
needs: unity-gallery
name: Car CarPlay
permissions:
contents: read
Expand Down Expand Up @@ -85,6 +112,11 @@ jobs:
run: ./scripts/setup-workspace.sh -q -DskipTests
- name: Build iOS port
run: ./scripts/build-ios-port.sh -q -DskipTests
# After everything that fills the local Maven repository and before the
# application is built; this job has no .NET SDK (see the action).
- name: Unpack the Unity gallery prebuilt
uses: ./.github/actions/unity-gallery-prebuilt

- name: Build sample iOS app (car-enabled) and compile workspace
id: build-ios-app
run: ./scripts/build-ios-app.sh -q -DskipTests
Expand Down
Loading
Loading