diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml
index eace22a2390..201c2529804 100644
--- a/.github/actionlint.yaml
+++ b/.github/actionlint.yaml
@@ -1,7 +1,7 @@
# actionlint configuration. See scripts/check-workflows.sh.
self-hosted-runner:
- # windows-11-arm is a REAL GitHub-hosted label -- parparvm-tests-windows.yml runs on it
+ # windows-11-arm is a REAL GitHub-hosted label -- linux-build-run.yml runs on it
# and has done for months. actionlint ships a static list of known labels and that list
# lags GitHub's, so the label is reported as unknown.
#
diff --git a/.github/actions/unity-gallery-prebuilt/action.yml b/.github/actions/unity-gallery-prebuilt/action.yml
deleted file mode 100644
index c17a66518e7..00000000000
--- a/.github/actions/unity-gallery-prebuilt/action.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-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"
diff --git a/.github/ci/apple-checks.json b/.github/ci/apple-checks.json
index d15b1828ab4..7eb0cec1f1f 100644
--- a/.github/ci/apple-checks.json
+++ b/.github/ci/apple-checks.json
@@ -20,7 +20,6 @@
"scripts/ios/notification-tests/**",
"scripts/hellocodenameone/**",
"scripts/ios/tests/**",
- "scripts/ios/screenshots-metal/**",
"scripts/ios/screenshots-metal-27/**",
"scripts/ios/screenshots-watch/**",
"scripts/ios/screenshots-tv/**",
@@ -45,17 +44,9 @@
"!maven/core-unittests/**",
"scripts/hellocodenameone/backend/**",
"scripts/lib/cn1ss.sh",
- "scripts/unity-compat-samples/gallery/**",
- "maven/cil-translator/**",
- "maven/unity-compat/**",
"maven/compose-compat/**",
"maven/rive-runtime/**",
- "maven/rive-schema-gen/**",
- "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/**"
+ "maven/rive-schema-gen/**"
],
"push": [
".github/workflows/scripts-ios.yml",
@@ -77,7 +68,6 @@
"scripts/ios/notification-tests/**",
"scripts/hellocodenameone/**",
"scripts/ios/tests/**",
- "scripts/ios/screenshots-metal/**",
"scripts/ios/screenshots-metal-27/**",
"scripts/ios/screenshots-watch/**",
"scripts/ios/screenshots-tv/**",
@@ -102,17 +92,9 @@
"!maven/core-unittests/**",
"scripts/hellocodenameone/backend/**",
"scripts/lib/cn1ss.sh",
- "scripts/unity-compat-samples/gallery/**",
- "maven/cil-translator/**",
- "maven/unity-compat/**",
"maven/compose-compat/**",
"maven/rive-runtime/**",
- "maven/rive-schema-gen/**",
- "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/**"
+ "maven/rive-schema-gen/**"
]
},
"native": {
@@ -148,17 +130,9 @@
"!maven/cn1-applovin/**",
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**",
- "scripts/unity-compat-samples/gallery/**",
- "maven/cil-translator/**",
- "maven/unity-compat/**",
"maven/compose-compat/**",
"maven/rive-runtime/**",
- "maven/rive-schema-gen/**",
- "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/**"
+ "maven/rive-schema-gen/**"
],
"push": [
".github/workflows/scripts-ios-native.yml",
@@ -192,17 +166,9 @@
"!maven/cn1-applovin/**",
"!maven/cn1-unity-levelplay/**",
"!maven/core-unittests/**",
- "scripts/unity-compat-samples/gallery/**",
- "maven/cil-translator/**",
- "maven/unity-compat/**",
"maven/compose-compat/**",
"maven/rive-runtime/**",
- "maven/rive-schema-gen/**",
- "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/**"
+ "maven/rive-schema-gen/**"
]
},
"packaging": {
@@ -221,22 +187,13 @@
"scripts/check-ios-sdk-deltas.py",
"scripts/run-ios-ui-tests.sh",
"scripts/ios/**",
- "!scripts/ios/screenshots-metal-27/**",
"!scripts/ios/screenshots-tv/**",
"!scripts/ios/screenshots-watch/**",
"scripts/hellocodenameone/**",
"!docs/**",
- "scripts/unity-compat-samples/gallery/**",
- "maven/cil-translator/**",
- "maven/unity-compat/**",
"maven/compose-compat/**",
"maven/rive-runtime/**",
- "maven/rive-schema-gen/**",
- "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/**"
+ "maven/rive-schema-gen/**"
],
"push": [
".github/workflows/ios-packaging.yml",
@@ -253,22 +210,129 @@
"scripts/check-ios-sdk-deltas.py",
"scripts/run-ios-ui-tests.sh",
"scripts/ios/**",
- "!scripts/ios/screenshots-metal-27/**",
"!scripts/ios/screenshots-tv/**",
"!scripts/ios/screenshots-watch/**",
"scripts/hellocodenameone/**",
"!docs/**",
- "scripts/unity-compat-samples/gallery/**",
- "maven/cil-translator/**",
- "maven/unity-compat/**",
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**"
+ ]
+ },
+ "macos": {
+ "pull_request": [
"maven/compose-compat/**",
"maven/rive-runtime/**",
"maven/rive-schema-gen/**",
- "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/_build-ios-port.yml",
+ "scripts/setup-workspace.sh",
+ "scripts/build-mac-port.sh",
+ "scripts/build-macos-app.sh",
+ "scripts/run-macos-ui-tests.sh",
+ "scripts/hellocodenameone/**",
+ "scripts/ios/tests/**",
+ "scripts/macos/**",
+ "scripts/templates/**",
+ "!scripts/templates/**/*.md",
+ "scripts/common/java/**",
+ "scripts/lib/cn1ss.sh",
+ "scripts/lib/xcode.sh",
+ "CodenameOne/src/**",
+ "!CodenameOne/src/**/*.md",
+ "Ports/MacPort/**",
+ "!Ports/MacPort/**/*.md",
+ "Ports/iOSPort/**",
+ "!Ports/iOSPort/**/*.md",
+ "native-themes/ios-modern/**",
+ "!native-themes/ios-modern/**/*.md",
+ "vm/**",
+ "!vm/**/*.md",
+ "tests/**",
+ "!tests/**/*.md",
+ "maven/**",
+ "!maven/cn1-ai-*/**",
+ "!maven/cn1-admob/**",
+ "!maven/cn1-applovin/**",
+ "!maven/cn1-unity-levelplay/**",
+ "!maven/core-unittests/**",
+ "!docs/**",
+ "scripts/hellocodenameone/backend/**"
+ ],
+ "push": [
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ ".github/workflows/_build-ios-port.yml",
+ "scripts/setup-workspace.sh",
+ "scripts/build-mac-port.sh",
+ "scripts/build-macos-app.sh",
+ "scripts/run-macos-ui-tests.sh",
+ "scripts/hellocodenameone/**",
+ "scripts/ios/tests/**",
+ "scripts/macos/**",
+ "scripts/templates/**",
+ "!scripts/templates/**/*.md",
+ "scripts/common/java/**",
+ "scripts/lib/cn1ss.sh",
+ "scripts/lib/xcode.sh",
+ "CodenameOne/src/**",
+ "Ports/MacPort/**",
+ "Ports/iOSPort/**",
+ "native-themes/ios-modern/**",
+ "vm/**",
+ "tests/**",
+ "maven/**",
+ "!maven/cn1-ai-*/**",
+ "!maven/cn1-admob/**",
+ "!maven/cn1-applovin/**",
+ "!maven/cn1-unity-levelplay/**",
+ "!maven/core-unittests/**",
+ "scripts/hellocodenameone/backend/**"
+ ]
+ },
+ "fidelity": {
+ "pull_request": [
+ "scripts/build-fidelity-app.sh",
+ "scripts/run-ios-fidelity-tests.sh",
+ "scripts/ci/boot-ios-simulator.sh",
+ "scripts/lib/cn1ss.sh",
+ "scripts/common/java/**",
+ "scripts/fidelity-app/**",
+ "!scripts/fidelity-app/*-native-ref/**",
+ "CodenameOne/src/com/codename1/ui/plaf/**",
+ "native-themes/ios-modern/**",
+ "scripts/hellocodenameone/backend/**",
+ ".github/workflows/_build-ios-port.yml",
+ "Ports/iOSPort/**",
+ "!Ports/iOSPort/**/*.md",
+ "!maven/cn1-ai-*/**",
+ "!maven/cn1-admob/**",
+ "!maven/cn1-applovin/**",
+ "!maven/cn1-unity-levelplay/**",
+ "!docs/**"
+ ],
+ "push": [
+ "scripts/build-fidelity-app.sh",
+ "scripts/run-ios-fidelity-tests.sh",
+ "scripts/ci/boot-ios-simulator.sh",
+ "scripts/lib/cn1ss.sh",
+ "scripts/common/java/**",
+ "scripts/fidelity-app/**",
+ "!scripts/fidelity-app/*-native-ref/**",
+ "native-themes/ios-modern/**",
+ "CodenameOne/src/**",
+ "vm/**",
+ "maven/**",
+ "!maven/core-unittests/**",
+ "scripts/hellocodenameone/backend/**",
+ ".github/workflows/_build-ios-port.yml",
+ "Ports/iOSPort/**",
+ "!Ports/iOSPort/**/*.md",
+ "!maven/cn1-ai-*/**",
+ "!maven/cn1-admob/**",
+ "!maven/cn1-applovin/**",
+ "!maven/cn1-unity-levelplay/**",
+ "!docs/**"
]
}
}
diff --git a/.github/ci/ci-members.json b/.github/ci/ci-members.json
new file mode 100644
index 00000000000..9792f1bb9b0
--- /dev/null
+++ b/.github/ci/ci-members.json
@@ -0,0 +1,852 @@
+{
+ "scripts-ios": {
+ "pull_request": {
+ "paths": [
+ ".github/workflows/scripts-ios.yml",
+ ".github/workflows/_build-ios-port.yml",
+ "scripts/setup-workspace.sh",
+ "scripts/build-ios-port.sh",
+ "scripts/build-ios-app.sh",
+ "scripts/check-ios-framework-links.py",
+ "scripts/check-ios-sdk-deltas.py",
+ "scripts/check-ios-private-api.py",
+ "scripts/lib/xcode.sh",
+ "scripts/run-ios-ui-tests.sh",
+ "scripts/ci/boot-ios-simulator.sh",
+ "scripts/run-watch-ui-tests.sh",
+ "scripts/run-tv-ui-tests.sh",
+ "scripts/run-ios-native-tests.sh",
+ "scripts/ios/notification-tests/native-tests/**",
+ "scripts/ios/notification-tests/install-native-notification-tests.sh",
+ "scripts/ios/notification-tests/**",
+ "scripts/hellocodenameone/**",
+ "scripts/ios/tests/**",
+ "scripts/ios/screenshots-metal-27/**",
+ "scripts/ios/screenshots-watch/**",
+ "scripts/ios/screenshots-tv/**",
+ "scripts/templates/**",
+ "CodenameOne/src/**",
+ "Ports/iOSPort/**",
+ "native-themes/ios-modern/**",
+ "vm/**",
+ "tests/**",
+ "maven/**",
+ "scripts/hellocodenameone/backend/**",
+ "scripts/lib/cn1ss.sh",
+ ".github/workflows/scripts-ios-native.yml",
+ "scripts/ios/create-shared-scheme.py",
+ ".github/workflows/ios-packaging.yml",
+ "maven/codenameone-maven-plugin/**",
+ "vm/ByteCodeTranslator/**",
+ "scripts/run-ios-device-release-build.sh",
+ "scripts/ios/**",
+ "scripts/common/java/**",
+ "!**/*.md",
+ "!maven/cn1-ai-*/**",
+ "!maven/cn1-admob/**",
+ "!maven/cn1-applovin/**",
+ "!maven/cn1-unity-levelplay/**",
+ ".github/ci/apple-checks.json",
+ "scripts/ci/select-apple-checks.py",
+ "scripts/ci/select-cn1lib-checks.py",
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ "scripts/build-mac-port.sh",
+ "scripts/build-macos-app.sh",
+ "scripts/run-macos-ui-tests.sh",
+ "scripts/macos/**",
+ "!scripts/templates/**/*.md",
+ "!CodenameOne/src/**/*.md",
+ "Ports/MacPort/**",
+ "!Ports/MacPort/**/*.md",
+ "!Ports/iOSPort/**/*.md",
+ "!native-themes/ios-modern/**/*.md",
+ "!vm/**/*.md",
+ "!tests/**/*.md",
+ "!maven/core-unittests/**",
+ "!docs/**",
+ "scripts/build-fidelity-app.sh",
+ "scripts/run-ios-fidelity-tests.sh",
+ "scripts/run-android-fidelity-tests.sh",
+ "scripts/fidelity-app/**",
+ "!scripts/fidelity-app/*-native-ref/**",
+ "CodenameOne/src/com/codename1/ui/plaf/**",
+ "native-themes/android-material/**"
+ ]
+ },
+ "push": {
+ "paths": [
+ ".github/workflows/scripts-ios.yml",
+ ".github/workflows/_build-ios-port.yml",
+ "scripts/setup-workspace.sh",
+ "scripts/build-ios-port.sh",
+ "scripts/build-ios-app.sh",
+ "scripts/check-ios-framework-links.py",
+ "scripts/check-ios-sdk-deltas.py",
+ "scripts/check-ios-private-api.py",
+ "scripts/lib/xcode.sh",
+ "scripts/run-ios-ui-tests.sh",
+ "scripts/ci/boot-ios-simulator.sh",
+ "scripts/run-watch-ui-tests.sh",
+ "scripts/run-tv-ui-tests.sh",
+ "scripts/run-ios-native-tests.sh",
+ "scripts/ios/notification-tests/native-tests/**",
+ "scripts/ios/notification-tests/install-native-notification-tests.sh",
+ "scripts/ios/notification-tests/**",
+ "scripts/hellocodenameone/**",
+ "scripts/ios/tests/**",
+ "scripts/ios/screenshots-metal-27/**",
+ "scripts/ios/screenshots-watch/**",
+ "scripts/ios/screenshots-tv/**",
+ "scripts/templates/**",
+ "CodenameOne/src/**",
+ "Ports/iOSPort/**",
+ "native-themes/ios-modern/**",
+ "vm/**",
+ "tests/**",
+ "maven/**",
+ "scripts/hellocodenameone/backend/**",
+ "scripts/lib/cn1ss.sh",
+ ".github/workflows/scripts-ios-native.yml",
+ "scripts/ios/create-shared-scheme.py",
+ ".github/workflows/ios-packaging.yml",
+ "maven/codenameone-maven-plugin/**",
+ "vm/ByteCodeTranslator/**",
+ "scripts/run-ios-device-release-build.sh",
+ "scripts/ios/**",
+ "scripts/common/java/**",
+ "!**/*.md",
+ "!maven/cn1-ai-*/**",
+ "!maven/cn1-admob/**",
+ "!maven/cn1-applovin/**",
+ "!maven/cn1-unity-levelplay/**",
+ ".github/ci/apple-checks.json",
+ "scripts/ci/select-apple-checks.py",
+ "scripts/ci/select-cn1lib-checks.py",
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ "scripts/build-mac-port.sh",
+ "scripts/build-macos-app.sh",
+ "scripts/run-macos-ui-tests.sh",
+ "scripts/macos/**",
+ "!scripts/templates/**/*.md",
+ "Ports/MacPort/**",
+ "!maven/core-unittests/**",
+ "scripts/build-fidelity-app.sh",
+ "scripts/run-android-fidelity-tests.sh",
+ "scripts/run-ios-fidelity-tests.sh",
+ "scripts/fidelity-app/**",
+ "!scripts/fidelity-app/*-native-ref/**",
+ "native-themes/android-material/**",
+ "Ports/Android/**"
+ ],
+ "branches": [
+ "master"
+ ]
+ }
+ },
+ "scripts-android": {
+ "pull_request": {
+ "paths": [
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ ".github/workflows/scripts-android.yml",
+ "scripts/setup-workspace.sh",
+ "scripts/ci/retry.sh",
+ "scripts/build-android-port.sh",
+ "scripts/build-android-app.sh",
+ "scripts/verify-android-app-compile-sdk.sh",
+ "scripts/check-android-api-removals.py",
+ "scripts/android/newest-platform-package.sh",
+ "scripts/run-android-instrumentation-tests.sh",
+ "scripts/generate-android-coverage-report.sh",
+ "scripts/android/lib/**/*.java",
+ "scripts/android/tests/**/*.java",
+ "scripts/device-runner-app/**/*.java",
+ "scripts/hellocodenameone/**",
+ "scripts/android/screenshots/**",
+ "!scripts/android/screenshots/**/*.md",
+ "scripts/templates/**",
+ "!scripts/templates/**/*.md",
+ "CodenameOne/src/**",
+ "!CodenameOne/src/**/*.md",
+ "Ports/Android/**",
+ "!Ports/Android/**/*.md",
+ "native-themes/android-material/**",
+ "!native-themes/android-material/**/*.md",
+ "maven/**",
+ "!maven/core-unittests/**",
+ "tests/**",
+ "!tests/**/*.md",
+ "!docs/**",
+ "scripts/hellocodenameone/backend/**",
+ "scripts/lib/cn1ss.sh",
+ "scripts/ci/tests/cn1ss-selfcheck-test.sh",
+ ".github/workflows/scripts-android.yml",
+ "scripts/build-fidelity-app.sh",
+ "scripts/run-android-fidelity-tests.sh",
+ "scripts/common/java/**",
+ "scripts/fidelity-app/**",
+ "CodenameOne/src/com/codename1/ui/plaf/**"
+ ]
+ },
+ "push": {
+ "paths": [
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ ".github/workflows/scripts-android.yml",
+ "scripts/setup-workspace.sh",
+ "scripts/ci/retry.sh",
+ "scripts/build-android-port.sh",
+ "scripts/build-android-app.sh",
+ "scripts/verify-android-app-compile-sdk.sh",
+ "scripts/check-android-api-removals.py",
+ "scripts/android/newest-platform-package.sh",
+ "scripts/run-android-instrumentation-tests.sh",
+ "scripts/generate-android-coverage-report.sh",
+ "scripts/android/lib/**/*.java",
+ "scripts/android/tests/**/*.java",
+ "scripts/device-runner-app/**/*.java",
+ "scripts/hellocodenameone/**",
+ "scripts/android/screenshots/**",
+ "!scripts/android/screenshots/**/*.md",
+ "scripts/templates/**",
+ "!scripts/templates/**/*.md",
+ "CodenameOne/src/**",
+ "!CodenameOne/src/**/*.md",
+ "Ports/Android/**",
+ "!Ports/Android/**/*.md",
+ "native-themes/android-material/**",
+ "!native-themes/android-material/**/*.md",
+ "maven/**",
+ "!maven/core-unittests/**",
+ "tests/**",
+ "!tests/**/*.md",
+ "!docs/**",
+ "scripts/hellocodenameone/backend/**",
+ "scripts/lib/cn1ss.sh",
+ "scripts/ci/tests/cn1ss-selfcheck-test.sh",
+ ".github/workflows/scripts-android.yml",
+ "scripts/build-fidelity-app.sh",
+ "scripts/run-android-fidelity-tests.sh",
+ "scripts/common/java/**",
+ "scripts/fidelity-app/**",
+ "CodenameOne/src/com/codename1/ui/plaf/**"
+ ],
+ "branches": [
+ "master"
+ ]
+ }
+ },
+ "scripts-javascript": {
+ "pull_request": {
+ "paths": [
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ "scripts/ci/retry.sh",
+ ".github/workflows/scripts-javascript.yml",
+ "scripts/run-javascript-browser-tests.sh",
+ "scripts/run-javascript-screenshot-tests.sh",
+ "scripts/run-javascript-headless-browser.mjs",
+ "scripts/run-javascript-lifecycle-tests.mjs",
+ "scripts/test-javascript-surface-replay.mjs",
+ "scripts/test-javascript-weak-refs.mjs",
+ "scripts/test-javascript-dispatch-caches.mjs",
+ "scripts/test-javascript-native-stub-bindings.mjs",
+ "scripts/ci/tests/cn1ss-async-sink-test.sh",
+ "scripts/ci/tests/Cn1ssAsyncSinkTest.java",
+ "scripts/fidelity-app/common/src/main/java/com/codenameone/fidelity/Cn1ssAsyncSink.java",
+ "scripts/test-javascript-vault-bridge.mjs",
+ "scripts/test-javascript-composited-rendering.mjs",
+ "scripts/javascript/composited-app/**",
+ "vm/ByteCodeTranslator/src/javascript/browser_bridge.js",
+ "scripts/run-javascript-lifecycle-tests.sh",
+ "scripts/verify-javascript-lens-parity.mjs",
+ "scripts/build-javascript-port-hellocodenameone.sh",
+ "scripts/javascript_browser_harness.py",
+ "scripts/javascript/screenshots/**",
+ "scripts/lib/cn1ss.sh",
+ "scripts/common/java/**",
+ "scripts/hellocodenameone/**",
+ "CodenameOne/src/**",
+ "!CodenameOne/src/**/*.md",
+ "Ports/JavaScriptPort/**",
+ "vm/**",
+ "maven/**",
+ "!maven/core-unittests/**",
+ "!docs/**",
+ "scripts/hellocodenameone/backend/**"
+ ]
+ },
+ "push": {
+ "paths": [
+ "maven/compose-compat/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ "scripts/ci/retry.sh",
+ ".github/workflows/scripts-javascript.yml",
+ "scripts/run-javascript-browser-tests.sh",
+ "scripts/test-javascript-composited-rendering.mjs",
+ "scripts/javascript/composited-app/**",
+ "scripts/run-javascript-screenshot-tests.sh",
+ "scripts/run-javascript-headless-browser.mjs",
+ "scripts/run-javascript-lifecycle-tests.mjs",
+ "scripts/test-javascript-surface-replay.mjs",
+ "scripts/test-javascript-weak-refs.mjs",
+ "scripts/test-javascript-dispatch-caches.mjs",
+ "scripts/test-javascript-native-stub-bindings.mjs",
+ "scripts/ci/tests/cn1ss-async-sink-test.sh",
+ "scripts/ci/tests/Cn1ssAsyncSinkTest.java",
+ "scripts/fidelity-app/common/src/main/java/com/codenameone/fidelity/Cn1ssAsyncSink.java",
+ "scripts/run-javascript-lifecycle-tests.sh",
+ "scripts/verify-javascript-lens-parity.mjs",
+ "scripts/build-javascript-port-hellocodenameone.sh",
+ "scripts/javascript_browser_harness.py",
+ "scripts/javascript/screenshots/**",
+ "scripts/lib/cn1ss.sh",
+ "scripts/common/java/**",
+ "scripts/hellocodenameone/**",
+ "CodenameOne/src/**",
+ "!CodenameOne/src/**/*.md",
+ "Ports/JavaScriptPort/**",
+ "vm/**",
+ "maven/**",
+ "!maven/core-unittests/**",
+ "!docs/**",
+ "scripts/hellocodenameone/backend/**"
+ ],
+ "branches": [
+ "master"
+ ]
+ }
+ },
+ "scripts-javase": {
+ "pull_request": {
+ "paths": [
+ ".github/workflows/scripts-javase.yml",
+ "scripts/run-javase-simulator-integration-tests.sh",
+ "scripts/lib/cn1ss.sh",
+ "scripts/common/java/**",
+ "scripts/javase/**",
+ "!scripts/javase/**/*.md",
+ "Ports/JavaSE/**",
+ "!Ports/JavaSE/**/*.md"
+ ]
+ },
+ "push": {
+ "paths": [
+ ".github/workflows/scripts-javase.yml",
+ "scripts/run-javase-simulator-integration-tests.sh",
+ "scripts/lib/cn1ss.sh",
+ "scripts/common/java/**",
+ "scripts/javase/**",
+ "!scripts/javase/**/*.md",
+ "Ports/JavaSE/**",
+ "!Ports/JavaSE/**/*.md"
+ ],
+ "branches": [
+ "master"
+ ]
+ }
+ },
+ "linux-build-run": {
+ "pull_request": {
+ "paths": [
+ "maven/compose-compat/**",
+ ".github/workflows/linux-build-run.yml",
+ "scripts/ci/apt-get-install.sh",
+ "scripts/ci/apt-get-update.sh",
+ "scripts/ci/steam-runtime-smoke.sh",
+ "scripts/test_gc_heap_removal.py",
+ "vm/**",
+ "Ports/LinuxPort/**",
+ "maven/linux/**",
+ "scripts/linux/**",
+ "scripts/hellocodenameone/**",
+ "maven/rive-transcoder/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ "CodenameOne/src/**",
+ "!CodenameOne/src/**/*.md",
+ "native-themes/gnome-adwaita/**",
+ "!native-themes/gnome-adwaita/**/*.md",
+ "!vm/**/README.md",
+ "!vm/**/readme.md",
+ "!vm/**/docs/**",
+ "Ports/WindowsPort/**",
+ "maven/windows/**",
+ "scripts/windows/**",
+ "scripts/ci/retry.sh",
+ "scripts/ci/start-sqlserver-strict.sh",
+ "Ports/JavaScriptPort/**",
+ "Ports/LinuxPort/nativeSources/cn1_linux_gl.c",
+ "Ports/iOSPort/nativeSources/CN1GL3D.m",
+ "Ports/WindowsPort/nativeSources/cn1_windows_d3d.cpp",
+ "Ports/Android/src/com/codename1/impl/android/AndroidGraphicsDevice.java",
+ "Ports/JavaSE/src/com/codename1/impl/javase/JavaSEGLDevice.java",
+ "Ports/LinuxPort/nativeSources/cn1_linux_text.c",
+ "Ports/WindowsPort/nativeSources/cn1_windows_text.c",
+ "maven/codenameone-maven-plugin/**",
+ "maven/build-engine/**",
+ "maven/project-model/**",
+ "maven/backend/**",
+ "maven/backend-test/**",
+ "maven/python-runtime/**",
+ "maven/python-transpiler/**",
+ "scripts/python-backend/sqlalchemy-realdb-test.sh",
+ "scripts/python-backend/build.sh",
+ "scripts/python-backend/e2e-test.sh",
+ "scripts/python-backend/e2e_client.py",
+ "scripts/python-backend/samples/**",
+ "scripts/python-bench/hostfs/**",
+ "scripts/hellocodenameone/pom.xml",
+ "scripts/hellocodenameone/backend/**",
+ "CodenameOne/src/com/codename1/impl/SharedWithBackend.java",
+ "CodenameOne/src/com/codename1/impl/orm/**",
+ "CodenameOne/src/com/codename1/db/sql/**",
+ "CodenameOne/src/com/codename1/hardware/**",
+ "CodenameOne/src/com/codename1/realtime/**",
+ "CodenameOne/src/com/codename1/qrcode/QrCode.java",
+ "CodenameOne/src/com/codename1/impl/office/Snappy.java",
+ "CodenameOne/src/com/codename1/impl/MdnsEngine.java",
+ "CodenameOne/src/com/codename1/util/regex/**",
+ "CodenameOne/src/com/codename1/pdf/**",
+ "CodenameOne/src/com/codename1/impl/pdf/**",
+ "CodenameOne/src/com/codename1/xml/**",
+ "CodenameOne/src/com/codename1/orm/session/**",
+ "CodenameOne/src/com/codename1/orm/repository/**",
+ "CodenameOne/src/com/codename1/annotations/db/**",
+ "CodenameOne/src/com/codename1/annotations/Entity.java",
+ "CodenameOne/src/com/codename1/annotations/Id.java",
+ "CodenameOne/src/com/codename1/annotations/Column.java",
+ "CodenameOne/src/com/codename1/annotations/DbTransient.java",
+ "CodenameOne/src/com/codename1/annotations/JsonIgnore.java",
+ "CodenameOne/src/com/codename1/annotations/JsonProperty.java",
+ "CodenameOne/src/com/codename1/io/gzip/**",
+ "CodenameOne/src/com/codename1/io/outbox/**",
+ "CodenameOne/src/com/codename1/io/JSONParser.java",
+ "CodenameOne/src/com/codename1/io/PrettyPrinter.java",
+ "CodenameOne/src/com/codename1/io/JSONParseCallback.java",
+ "CodenameOne/src/com/codename1/io/JSONSanitizer.java",
+ "CodenameOne/src/com/codename1/io/CharArrayReader.java",
+ "CodenameOne/src/com/codename1/util/BigInteger.java",
+ "CodenameOne/src/com/codename1/util/MathUtil.java",
+ "CodenameOne/src/com/codename1/util/TBigInteger.java",
+ "CodenameOne/src/com/codename1/util/TBitLevel.java",
+ "CodenameOne/src/com/codename1/util/TConversion.java",
+ "CodenameOne/src/com/codename1/util/TDivision.java",
+ "CodenameOne/src/com/codename1/util/TElementary.java",
+ "CodenameOne/src/com/codename1/util/TLogical.java",
+ "CodenameOne/src/com/codename1/util/TMultiplication.java",
+ "CodenameOne/src/com/codename1/util/TPrimality.java",
+ "CodenameOne/src/com/codename1/migration/**",
+ "CodenameOne/src/com/codename1/impl/migration/**",
+ "CodenameOne/src/com/codename1/security/Hash.java",
+ "CodenameOne/src/com/codename1/security/Hmac.java",
+ "CodenameOne/src/com/codename1/security/MessageDigestImpl.java",
+ "CodenameOne/src/com/codename1/security/Secp256k1.java",
+ "CodenameOne/src/com/codename1/security/Otp.java",
+ "CodenameOne/src/com/codename1/security/Base32.java",
+ "CodenameOne/src/com/codename1/security/CryptoException.java",
+ "CodenameOne/src/com/codename1/security/**",
+ "CodenameOne/src/com/codename1/crypto/**",
+ "native-themes/windows-fluent/**",
+ "!native-themes/windows-fluent/**/*.md",
+ "!scripts/windows/**/*.md"
+ ]
+ },
+ "push": {
+ "paths": [
+ "maven/compose-compat/**",
+ ".github/workflows/linux-build-run.yml",
+ "scripts/ci/apt-get-install.sh",
+ "scripts/ci/apt-get-update.sh",
+ "scripts/ci/steam-runtime-smoke.sh",
+ "scripts/test_gc_heap_removal.py",
+ "vm/**",
+ "Ports/LinuxPort/**",
+ "maven/linux/**",
+ "scripts/linux/**",
+ "scripts/hellocodenameone/**",
+ "maven/rive-transcoder/**",
+ "maven/rive-runtime/**",
+ "maven/rive-schema-gen/**",
+ "CodenameOne/src/**",
+ "!CodenameOne/src/**/*.md",
+ "native-themes/gnome-adwaita/**",
+ "!native-themes/gnome-adwaita/**/*.md",
+ "Ports/WindowsPort/**",
+ "maven/windows/**",
+ "scripts/ci/retry.sh",
+ "scripts/ci/start-sqlserver-strict.sh",
+ "Ports/JavaScriptPort/**",
+ "Ports/LinuxPort/nativeSources/cn1_linux_gl.c",
+ "Ports/iOSPort/nativeSources/CN1GL3D.m",
+ "Ports/WindowsPort/nativeSources/cn1_windows_d3d.cpp",
+ "Ports/Android/src/com/codename1/impl/android/AndroidGraphicsDevice.java",
+ "Ports/JavaSE/src/com/codename1/impl/javase/JavaSEGLDevice.java",
+ "Ports/LinuxPort/nativeSources/cn1_linux_text.c",
+ "Ports/WindowsPort/nativeSources/cn1_windows_text.c",
+ "maven/codenameone-maven-plugin/**",
+ "maven/build-engine/**",
+ "maven/project-model/**",
+ "maven/backend/**",
+ "maven/backend-test/**",
+ "maven/python-runtime/**",
+ "maven/python-transpiler/**",
+ "scripts/python-backend/sqlalchemy-realdb-test.sh",
+ "scripts/python-backend/build.sh",
+ "scripts/python-backend/e2e-test.sh",
+ "scripts/python-backend/e2e_client.py",
+ "scripts/python-backend/samples/**",
+ "scripts/python-bench/hostfs/**",
+ "scripts/hellocodenameone/pom.xml",
+ "scripts/hellocodenameone/backend/**",
+ "CodenameOne/src/com/codename1/impl/SharedWithBackend.java",
+ "CodenameOne/src/com/codename1/impl/orm/**",
+ "CodenameOne/src/com/codename1/db/sql/**",
+ "CodenameOne/src/com/codename1/hardware/**",
+ "CodenameOne/src/com/codename1/realtime/**",
+ "CodenameOne/src/com/codename1/qrcode/QrCode.java",
+ "CodenameOne/src/com/codename1/impl/office/Snappy.java",
+ "CodenameOne/src/com/codename1/impl/MdnsEngine.java",
+ "CodenameOne/src/com/codename1/util/regex/**",
+ "CodenameOne/src/com/codename1/pdf/**",
+ "CodenameOne/src/com/codename1/impl/pdf/**",
+ "CodenameOne/src/com/codename1/xml/**",
+ "CodenameOne/src/com/codename1/orm/session/**",
+ "CodenameOne/src/com/codename1/orm/repository/**",
+ "CodenameOne/src/com/codename1/annotations/db/**",
+ "CodenameOne/src/com/codename1/annotations/Entity.java",
+ "CodenameOne/src/com/codename1/annotations/Id.java",
+ "CodenameOne/src/com/codename1/annotations/Column.java",
+ "CodenameOne/src/com/codename1/annotations/DbTransient.java",
+ "CodenameOne/src/com/codename1/annotations/JsonIgnore.java",
+ "CodenameOne/src/com/codename1/annotations/JsonProperty.java",
+ "CodenameOne/src/com/codename1/io/gzip/**",
+ "CodenameOne/src/com/codename1/io/outbox/**",
+ "CodenameOne/src/com/codename1/io/JSONParser.java",
+ "CodenameOne/src/com/codename1/io/PrettyPrinter.java",
+ "CodenameOne/src/com/codename1/io/JSONParseCallback.java",
+ "CodenameOne/src/com/codename1/io/JSONSanitizer.java",
+ "CodenameOne/src/com/codename1/io/CharArrayReader.java",
+ "CodenameOne/src/com/codename1/util/BigInteger.java",
+ "CodenameOne/src/com/codename1/util/MathUtil.java",
+ "CodenameOne/src/com/codename1/util/TBigInteger.java",
+ "CodenameOne/src/com/codename1/util/TBitLevel.java",
+ "CodenameOne/src/com/codename1/util/TConversion.java",
+ "CodenameOne/src/com/codename1/util/TDivision.java",
+ "CodenameOne/src/com/codename1/util/TElementary.java",
+ "CodenameOne/src/com/codename1/util/TLogical.java",
+ "CodenameOne/src/com/codename1/util/TMultiplication.java",
+ "CodenameOne/src/com/codename1/util/TPrimality.java",
+ "CodenameOne/src/com/codename1/migration/**",
+ "CodenameOne/src/com/codename1/impl/migration/**",
+ "CodenameOne/src/com/codename1/security/Hash.java",
+ "CodenameOne/src/com/codename1/security/Hmac.java",
+ "CodenameOne/src/com/codename1/security/MessageDigestImpl.java",
+ "CodenameOne/src/com/codename1/security/Secp256k1.java",
+ "CodenameOne/src/com/codename1/security/Otp.java",
+ "CodenameOne/src/com/codename1/security/Base32.java",
+ "CodenameOne/src/com/codename1/security/CryptoException.java",
+ "CodenameOne/src/com/codename1/security/**",
+ "CodenameOne/src/com/codename1/crypto/**",
+ "!vm/**/README.md",
+ "!vm/**/readme.md",
+ "!vm/**/docs/**",
+ "native-themes/windows-fluent/**",
+ "!native-themes/windows-fluent/**/*.md",
+ "scripts/windows/**",
+ "!scripts/windows/**/*.md"
+ ],
+ "branches": [
+ "master",
+ "main"
+ ]
+ }
+ },
+ "pr": {
+ "pull_request": {
+ "paths": [
+ "**",
+ "!.github/workflows/scripts-android.yml",
+ "!.github/workflows/scripts-ios.yml",
+ "!scripts/**",
+ "scripts/setup-workspace.sh",
+ "scripts/ci/db-cipher-interop.sh",
+ "scripts/ci/check-android-cipher-package-compiles.sh",
+ "scripts/ci/check-js-sqlite-wasm.sh",
+ "scripts/ci/retry.sh",
+ "scripts/ci/apt-get-update.sh",
+ "scripts/ci/apt-get-install.sh",
+ "scripts/ci/tests/apt-get-update-test.sh",
+ "scripts/check-native-warnings.py",
+ "scripts/check-native-warnings.sh",
+ "scripts/native-warnings/**",
+ "scripts/check-native-cpp-linkage.py",
+ "scripts/check-builder-define-toggles.py",
+ "scripts/check-cast-semantics.sh",
+ "scripts/check-gpu-shaders.sh",
+ "scripts/gpu-shader-check/**",
+ "scripts/cast-semantics-baseline.txt",
+ "scripts/check-build-hint-catalog.sh",
+ "scripts/check-build-hint-catalog.py",
+ "scripts/build_hint_miner.py",
+ "scripts/build-hint-catalog-baseline.txt",
+ "scripts/build-hint-computed-sites.txt",
+ "scripts/gen-build-hint-annotations.sh",
+ "scripts/check-native-peer-returns.py",
+ "scripts/check-cn1lib-android-api.py",
+ "scripts/check-cn1lib-native-coverage.py",
+ "scripts/ci/select-cn1lib-checks.py",
+ "scripts/check-cn1lib-native-sources.py",
+ "scripts/cn1lib-api-check/**",
+ "scripts/certificatewizard/**",
+ "!docs/**",
+ "!**/*.md",
+ "!.github/workflows/developer-guide-docs.yml",
+ "!.github/workflows/website-docs.yml",
+ "!.github/workflows/initializr-cn1-version-pr.yml",
+ "!CodenameOneDesigner/**",
+ "!Ports/IOSPort/**"
+ ],
+ "branches": [
+ "master"
+ ]
+ },
+ "push": {
+ "paths": [
+ "**",
+ "!.github/workflows/scripts-android.yml",
+ "!.github/workflows/scripts-ios.yml",
+ "!scripts/**",
+ "scripts/setup-workspace.sh",
+ "scripts/ci/db-cipher-interop.sh",
+ "scripts/ci/check-android-cipher-package-compiles.sh",
+ "scripts/ci/check-js-sqlite-wasm.sh",
+ "scripts/ci/retry.sh",
+ "scripts/ci/apt-get-update.sh",
+ "scripts/ci/apt-get-install.sh",
+ "scripts/ci/tests/apt-get-update-test.sh",
+ "scripts/check-native-warnings.py",
+ "scripts/check-native-warnings.sh",
+ "scripts/native-warnings/**",
+ "scripts/check-native-cpp-linkage.py",
+ "scripts/check-builder-define-toggles.py",
+ "scripts/check-cast-semantics.sh",
+ "scripts/check-gpu-shaders.sh",
+ "scripts/gpu-shader-check/**",
+ "scripts/cast-semantics-baseline.txt",
+ "scripts/check-build-hint-catalog.sh",
+ "scripts/check-build-hint-catalog.py",
+ "scripts/build_hint_miner.py",
+ "scripts/build-hint-catalog-baseline.txt",
+ "scripts/build-hint-computed-sites.txt",
+ "scripts/gen-build-hint-annotations.sh",
+ "scripts/check-native-peer-returns.py",
+ "scripts/check-cn1lib-android-api.py",
+ "scripts/check-cn1lib-native-coverage.py",
+ "scripts/ci/select-cn1lib-checks.py",
+ "scripts/check-cn1lib-native-sources.py",
+ "scripts/cn1lib-api-check/**",
+ "scripts/certificatewizard/**",
+ "!docs/**",
+ "!**/*.md",
+ "!.github/workflows/developer-guide-docs.yml",
+ "!.github/workflows/website-docs.yml",
+ "!.github/workflows/initializr-cn1-version-pr.yml",
+ "!CodenameOneDesigner/**",
+ "!Ports/IOSPort/**"
+ ],
+ "branches": [
+ "master"
+ ]
+ }
+ },
+ "javadocs": {
+ "pull_request": {
+ "paths": [
+ "CodenameOne/src/**/*.java",
+ "Ports/**/src/**/*.java",
+ "vm/backend/src/**/*.java",
+ "vm/backend/impl/**/*.java",
+ "vm/backend/shared-sources.sh",
+ "vm/backend/package-docs/**",
+ "maven/**/src/main/java/**/*.java",
+ ".github/scripts/build_javadocs.sh",
+ "scripts/check-package-info.sh",
+ ".github/workflows/javadocs.yml"
+ ]
+ },
+ "push": {
+ "branches": [
+ "master",
+ "main"
+ ]
+ }
+ },
+ "website-docs": {
+ "pull_request": {
+ "paths": [
+ "docs/website/**",
+ "docs/developer-guide/**",
+ "scripts/cn1playground/**",
+ "scripts/initializr/**",
+ "scripts/agent-kit/**",
+ "scripts/website/**",
+ "scripts/skindesigner/**",
+ "Ports/JavaScriptPort/**",
+ "vm/ByteCodeTranslator/**",
+ "vm/JavaAPI/**",
+ "CodenameOne/src/**",
+ "Ports/CLDC11/src/**",
+ "maven/build-hint-catalog/**",
+ "maven/build-hint-tools/**",
+ "scripts/gen-build-hint-table.sh",
+ ".github/scripts/build_javadocs.sh",
+ "maven/javadoc-hugo-doclet/**",
+ "vm/backend/src/**",
+ "vm/backend/impl/**",
+ "vm/backend/shared-sources.sh",
+ "vm/backend/package-docs/**",
+ "vm/selfhost/perf_baseline.py",
+ ".github/workflows/website-docs.yml"
+ ]
+ },
+ "push": {
+ "paths": [
+ "docs/website/**",
+ "docs/developer-guide/**",
+ "scripts/cn1playground/**",
+ "scripts/initializr/**",
+ "scripts/agent-kit/**",
+ "scripts/wayline/**",
+ "scripts/savor/**",
+ "scripts/bazaar/**",
+ "scripts/bastion/**",
+ "scripts/pulse/**",
+ "scripts/slate/**",
+ "scripts/fieldline/**",
+ "scripts/splat/**",
+ "scripts/skirmish/**",
+ "scripts/papercut/**",
+ "scripts/dash/**",
+ "scripts/parley/**",
+ "scripts/hellocodenameone/common/src/main/kmp/**",
+ "scripts/website/**",
+ "scripts/skindesigner/**",
+ "Ports/JavaScriptPort/**",
+ "vm/ByteCodeTranslator/**",
+ "vm/JavaAPI/**",
+ "CodenameOne/src/**",
+ "Ports/CLDC11/src/**",
+ "maven/build-hint-catalog/**",
+ "maven/build-hint-tools/**",
+ "scripts/gen-build-hint-table.sh",
+ ".github/scripts/build_javadocs.sh",
+ "maven/javadoc-hugo-doclet/**",
+ "vm/backend/src/**",
+ "vm/backend/impl/**",
+ "vm/backend/shared-sources.sh",
+ "vm/backend/package-docs/**",
+ "vm/selfhost/perf_baseline.py",
+ ".github/workflows/website-docs.yml"
+ ],
+ "branches": [
+ "main",
+ "master"
+ ]
+ }
+ },
+ "developer-guide-docs": {
+ "pull_request": {
+ "paths": [
+ "scripts/ci/retry.sh",
+ "docs/developer-guide/**",
+ "docs/demos/**",
+ "scripts/developer-guide/**",
+ "scripts/wayline/**",
+ "scripts/savor/**",
+ "scripts/bazaar/**",
+ "scripts/bastion/**",
+ "scripts/pulse/**",
+ "scripts/slate/**",
+ "scripts/splat/**",
+ "scripts/skirmish/**",
+ "scripts/papercut/**",
+ "scripts/dash/**",
+ "scripts/parley/**",
+ "scripts/hellocodenameone/common/src/main/kmp/**",
+ "scripts/reel/**",
+ "maven/cn1-app-kit/**",
+ "Ports/CLDC11/**",
+ ".github/scripts/build_javadocs.sh",
+ ".github/workflows/developer-guide-docs.yml",
+ "CodenameOne/src/com/codename1/annotations/buildhints/**",
+ "maven/build-hint-catalog/**",
+ "maven/build-hint-tools/**",
+ "scripts/gen-build-hint-table.sh",
+ "native-themes/**",
+ "maven/css-compiler/**",
+ "maven/css-cli/**",
+ "scripts/build-native-themes.sh",
+ "CodenameOne/**",
+ "Ports/JavaSE/**",
+ "maven/core/**",
+ "maven/javase/**"
+ ]
+ }
+ },
+ "check-doc-snippets": {
+ "pull_request": {
+ "paths": [
+ "docs/developer-guide/**",
+ "docs/demos/**",
+ "scripts/wayline/**",
+ "scripts/savor/**",
+ "scripts/bazaar/**",
+ "scripts/bastion/**",
+ "scripts/pulse/**",
+ "scripts/slate/**",
+ "scripts/splat/**",
+ "scripts/skirmish/**",
+ "scripts/papercut/**",
+ "scripts/dash/**",
+ "scripts/hellocodenameone/common/src/main/kmp/**",
+ "docs/website/content/blog/**",
+ "CodenameOne/src/**/*.java",
+ "Ports/CLDC11/src/**/*.java",
+ "scripts/cn1playground/common/**",
+ "vm/JavaCompiler/**",
+ "scripts/check-doc-snippets.py",
+ "scripts/doc-snippet-baseline.txt",
+ "scripts/extract-javadoc-java-snippets.sh",
+ ".github/workflows/check-doc-snippets.yml"
+ ]
+ }
+ },
+ "cn1playground-language": {
+ "pull_request": {
+ "paths": [
+ "scripts/cn1playground/**",
+ "vm/JavaCompiler/**",
+ "maven/javac/**",
+ ".github/workflows/cn1playground-language.yml"
+ ],
+ "types": [
+ "opened",
+ "synchronize",
+ "reopened",
+ "ready_for_review"
+ ]
+ }
+ },
+ "blog-prose": {
+ "pull_request": {}
+ }
+}
diff --git a/.github/workflows/_build-ios-port.yml b/.github/workflows/_build-ios-port.yml
index 0588f5a8b1d..71c8bdbcd3d 100644
--- a/.github/workflows/_build-ios-port.yml
+++ b/.github/workflows/_build-ios-port.yml
@@ -13,6 +13,10 @@ on:
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
+ mac_port:
+ description: "Also build the macOS port (scripts/build-mac-port.sh) on the same workspace and ship Ports/MacPort/nativeSources in the bundle. scripts-ios.yml's Apple job runs the macOS suite from this one bundle."
+ 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."
@@ -20,7 +24,7 @@ on:
jobs:
build:
- runs-on: macos-15
+ runs-on: xcode-27
# 90, not 60: without the cn1-built cache this job is setup-workspace plus
# the port build, and setup-workspace alone was measured at 27, 34 and 40+
# minutes on three macOS runners in one night (2026-11-18). See the step
@@ -96,7 +100,18 @@ jobs:
scripts/build-native-themes.sh \
.github/workflows/_build-ios-port.yml \
| shasum -a 256 | awk '{print $1}')
- echo "hash=${SRC_HASH:0:16}-${POM_HASH:0:16}-${SCRIPT_HASH:0:16}" >> "$GITHUB_OUTPUT"
+ HASH="${SRC_HASH:0:16}-${POM_HASH:0:16}-${SCRIPT_HASH:0:16}"
+ # With the macOS port in the bundle the key must also move with
+ # every file the AppKit build consumes -- all of Ports/MacPort, no
+ # extension list (the .metal shaders, .c natives and the
+ # shared-*.exclude manifests decide what is compiled) -- and the
+ # callers without it keep the key they always had.
+ if [ "${{ inputs.mac_port }}" = "true" ]; then
+ MAC_HASH=$( { find Ports/MacPort -type f -print0 | sort -z | xargs -0 shasum -a 256; \
+ shasum -a 256 scripts/build-mac-port.sh; } | shasum -a 256 | awk '{print $1}')
+ HASH="${HASH}-mac${MAC_HASH:0:16}"
+ fi
+ echo "hash=${HASH}" >> "$GITHUB_OUTPUT"
- name: Set TMPDIR
run: echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
@@ -114,7 +129,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
@@ -132,7 +147,7 @@ jobs:
- name: Compute cn1-built cache key
id: cn1_built_key
# Single source of truth for the cache key, exposed as a job output
- # so dependent jobs (build-ios, build-ios-metal in scripts-ios.yml,
+ # so dependent jobs (the suite jobs in scripts-ios.yml,
# the iOS-native and packaging workflows) restore the EXACT key this
# job saved against. Computing the same hash again on each consumer
# job has been observed to produce a different value on some runners
@@ -149,6 +164,7 @@ jobs:
~/.m2/repository/com/codenameone
Themes
Ports/iOSPort/nativeSources
+ Ports/MacPort/nativeSources
key: ${{ steps.cn1_built_key.outputs.key }}
- name: Setup workspace
@@ -175,6 +191,18 @@ jobs:
run: ./scripts/build-ios-port.sh -q -DskipTests
timeout-minutes: 40
+ - name: Verify native macOS font aliases with AppKit
+ if: ${{ inputs.mac_port }}
+ run: python3 scripts/test_mac_native_font.py
+
+ # The macOS port on the same workspace, so one job produces the bundle
+ # every Apple suite reads (it used to be _build-mac-port.yml, a second
+ # macOS runner doing setup-workspace again).
+ - name: Build macOS port
+ if: ${{ inputs.mac_port && steps.cn1_built.outputs.cache-hit != 'true' }}
+ run: ./scripts/build-mac-port.sh -q -Dtest=MacNativeFontModeTest -Dsurefire.failIfNoSpecifiedTests=false
+ timeout-minutes: 40
+
- name: Report cache outcome
run: |
if [ "${{ steps.cn1_built.outputs.cache-hit }}" = "true" ]; then
@@ -192,7 +220,7 @@ jobs:
# not evicted for the life of the run (and survive partial `--failed`
# re-runs), so the handoff is reliable. tar relative to / so the home
# (~/.m2) and workspace paths restore to identical absolute locations on
- # the consumer (same macos-15 image -> same /Users/runner paths).
+ # the consumer (same xcode-27 image -> same /Users/runner paths).
- name: Bundle built CN1 + iOS port artifacts
run: |
set -euo pipefail
@@ -205,10 +233,15 @@ jobs:
# failed with "Workspace tools not found" even after the cn1-built
# restore succeeded. Bundling it into the same artifact makes the
# whole handoff eviction-proof.
+ MAC_SOURCES=""
+ if [ "${{ inputs.mac_port }}" = "true" ]; then
+ MAC_SOURCES="${GITHUB_WORKSPACE#/}/Ports/MacPort/nativeSources"
+ fi
tar -C / -cf "$RUNNER_TEMP/cn1-built-bundle.tar" \
"${HOME#/}/.m2/repository/com/codenameone" \
"${GITHUB_WORKSPACE#/}/Themes" \
"${GITHUB_WORKSPACE#/}/Ports/iOSPort/nativeSources" \
+ ${MAC_SOURCES:+"$MAC_SOURCES"} \
"${RUNNER_TEMP#/}/codenameone-tools"
ls -la "$RUNNER_TEMP/cn1-built-bundle.tar"
@@ -219,7 +252,7 @@ jobs:
# 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
+ # 3 to 3.6 minutes in each macOS 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.
diff --git a/.github/workflows/_build-mac-port.yml b/.github/workflows/_build-mac-port.yml
deleted file mode 100644
index 9f9544fc465..00000000000
--- a/.github/workflows/_build-mac-port.yml
+++ /dev/null
@@ -1,258 +0,0 @@
-name: _Build macOS port (reusable)
-
-# Reusable workflow that runs scripts/setup-workspace.sh + scripts/build-mac-port.sh
-# once per workflow run, and hands the built tree to scripts-macos.yml's test job
-# as both a cache and a workflow artifact.
-#
-# Separate from _build-ios-port.yml on purpose. That one is shared by
-# scripts-ios.yml, scripts-ios-native.yml and ios-packaging.yml through a single
-# cache key, so folding the mac port into its source hash would make an
-# AppKit-only change pay for four iOS rebuilds.
-#
-# The "cn1-built-mac" cache is keyed on the CN1 source hash with no restore-keys
-# (exact match only). On hit, the entire setup-workspace + build-mac-port
-# sequence is skipped -- the port artifacts in ~/.m2/repository/com/codenameone
-# are already correct for the current source state.
-
-on:
- workflow_call:
- outputs:
- cn1_built_mac_cache_key:
- description: "Cache key the build job used for the cn1-built-mac artifact bundle. Dependent jobs should reuse this exact key to avoid recomputing the hash and getting a spurious cache miss."
- value: ${{ jobs.build.outputs.cn1_built_mac_cache_key }}
-
-jobs:
- build:
- runs-on: macos-15
- timeout-minutes: 60
- outputs:
- cn1_built_mac_cache_key: ${{ steps.cn1_built_mac_key.outputs.key }}
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Verify native macOS font aliases with AppKit
- run: python3 scripts/test_mac_native_font.py
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- if ! command -v ruby >/dev/null; then
- echo "ruby not found"; exit 1
- fi
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: |
- set -euo pipefail
- echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Compute CN1 source hash
- id: src_hash
- run: |
- set -euo pipefail
- # `maven/svg-transcoder/src/main` belongs in here: the cn1-built-mac
- # cache contains ~/.m2/repository/com/codenameone, including the
- # svg-transcoder JAR that the test-app build resolves at
- # transcode-svg time. Without svg-transcoder in the source hash, a
- # fix to SVGParser etc. doesn't change the cache key, the cn1-built-mac
- # cache hit short-circuits setup-workspace, the test app keeps
- # generating against the stale JAR, and the SVG render bug never
- # gets fixed in CI (most visible on clipped_badge.svg, whose outer
- # rect kept rendering as a square long after the clip-path
- # forwarding fix landed in the transcoder source).
- # Every file under these roots, with no extension allowlist. The list
- # used to be .java/.m/.h/.xml/.properties/.css, which silently missed
- # most of what the macOS build actually consumes: CN1MetalShaders.metal,
- # the .c natives (Renderer.c, Stroker.c, Curve.c), both
- # Ports/MacPort/shared-*.exclude manifests -- which decide WHICH files
- # are compiled at all -- the macOS template's .plist and .pbxproj, the
- # asset catalog's .json, and the bundled .res themes. A PR touching any
- # of them produced the same key, so build-port skipped the rebuild and
- # the consumer untarred the previous artifact over its checkout: the
- # macOS tests then exercised the old binary and passed on a change they
- # never ran.
- #
- # target/ is pruned so a local build cannot change the key; CI checks
- # out clean, but this hash has to mean the same thing in both places.
- # The whole of maven/, not two hand-picked modules of it. The rule is
- # that this hash must cover at least what the CALLER's path filter
- # triggers on, and scripts-macos.yml triggers on maven/** -- so naming
- # codenameone-maven-plugin and svg-transcoder left every other module
- # able to start this job and then hit an exact cache. build-mac-port.sh
- # runs `-pl css-cli -am` and `-pl mac -am`, so the modules it actually
- # rebuilds are the transitive dependencies of those two: core,
- # css-compiler, project-model, factory and the rest. A CSS compiler
- # change is the concrete case -- the script reinstalls css-cli precisely
- # so it reaches the test app, and the cache key was cancelling that
- # rebuild.
- # Listing them would be the same mistake one module later, so the
- # subtree is hashed and the list is gone.
- #
- # core-unittests is excluded to match the caller's own exclusion; it
- # builds nothing this port consumes. Over-invalidating costs a rebuild,
- # under-invalidating costs a green run against code that was never
- # compiled, so where the two disagree this errs at the former.
- #
- # -print0/-0 and sorting the shasum OUTPUT rather than the file list:
- # widening the scope to maven/ brought in filenames containing spaces
- # (the archetype's Eclipse .launch files), and `sort | xargs shasum`
- # splits those on whitespace -- shasum then reports "No such file" for
- # each fragment and the key is computed from an error message. Sorting
- # the output keeps the result order-independent without needing a
- # null-aware sort.
- # CodenameOneDesigner/src is here because maven/designer is a pom and
- # nothing else -- it sets ../../CodenameOneDesigner/src,
- # so a module setup-workspace.sh installs into the cached repository
- # compiles a tree that lives outside maven/ entirely. Hashing maven/
- # alone would have looked complete and still missed it.
- SRC_HASH=$(find CodenameOne/src Ports/MacPort Ports/iOSPort vm/JavaAPI vm/ByteCodeTranslator Themes native-themes \
- CodenameOneDesigner/src \
- maven \
- \( -name target -o -name .git -o -path 'maven/core-unittests' \) -prune -o -type f -print0 2>/dev/null \
- | xargs -0 shasum -a 256 | sort | shasum -a 256 | awk '{print $1}')
- POM_HASH=$(find . -name 'pom.xml' -not -path './scripts/*' 2>/dev/null \
- | sort | xargs shasum -a 256 | shasum -a 256 | awk '{print $1}')
- SCRIPT_HASH=$(shasum -a 256 \
- scripts/setup-workspace.sh \
- scripts/build-mac-port.sh \
- scripts/build-native-themes.sh \
- .github/workflows/_build-mac-port.yml \
- | shasum -a 256 | awk '{print $1}')
- echo "hash=${SRC_HASH:0:16}-${POM_HASH:0:16}-${SCRIPT_HASH:0:16}" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
-
- - name: Cache codenameone-tools
- id: cn1_tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- # Built CN1 + mac port artifacts. Restored after the m2 cache so it
- # overwrites any stale com/codenameone subtree pulled in by the broader
- # m2 cache (whose key is keyed on POMs, not source).
- - name: Compute cn1-built-mac cache key
- id: cn1_built_mac_key
- # Single source of truth for the cache key, exposed as a job output
- # so the dependent build-macos job restores the EXACT key this job
- # saved against. Computing the same hash again on each consumer
- # job has been observed to produce a different value on some runners
- # (suspected: the find -type f traversal picks up runner-specific
- # filesystem metadata that survives between jobs). Sharing the key
- # via an output sidesteps that.
- run: echo "key=cn1-built-mac-${{ runner.os }}-${{ steps.src_hash.outputs.hash }}" >> "$GITHUB_OUTPUT"
-
- - name: Cache built CN1 + mac port artifacts
- id: cn1_built
- uses: actions/cache@v5
- with:
- path: |
- ~/.m2/repository/com/codenameone
- Themes
- Ports/MacPort/nativeSources
- Ports/iOSPort/nativeSources
- key: ${{ steps.cn1_built_mac_key.outputs.key }}
-
- - name: Setup workspace
- # Run when the prebuilt CN1 jars are missing, OR when the
- # codenameone-tools cache (keyed separately, on setup-workspace.sh) is
- # missing. Without the second condition a jars-cache hit short-circuits
- # setup-workspace and leaves tools/env.sh absent, which the dependent app
- # job (build-macos) needs but only ever restores from cache -- so an
- # evicted tools cache breaks it.
- if: steps.cn1_built.outputs.cache-hit != 'true' || steps.cn1_tools.outputs.cache-hit != 'true'
- run: ./scripts/setup-workspace.sh -q -DskipTests
- timeout-minutes: 40
-
- - name: Build macOS port
- if: steps.cn1_built.outputs.cache-hit != 'true'
- run: ./scripts/build-mac-port.sh -q -Dtest=MacNativeFontModeTest -Dsurefire.failIfNoSpecifiedTests=false
- timeout-minutes: 40
-
- - name: Report cache outcome
- run: |
- if [ "${{ steps.cn1_built.outputs.cache-hit }}" = "true" ]; then
- echo "cn1-built-mac cache HIT for key cn1-built-mac-${{ runner.os }}-${{ steps.src_hash.outputs.hash }} — setup-workspace and build-mac-port were skipped."
- else
- echo "cn1-built-mac cache MISS for key cn1-built-mac-${{ runner.os }}-${{ steps.src_hash.outputs.hash }} — built fresh."
- fi
-
- # Hand the built tree to dependent jobs as a workflow ARTIFACT, not only a
- # cache. The cache above is kept for cross-run build-skip, but caches are
- # LRU-evicted once the repo cache store exceeds quota -- which, during long
- # runner-starvation queues, happened between this job and a dependent job's
- # fail-on-cache-miss restore, hard-failing the dependent job at the
- # restore step before any work. Artifacts are
- # not evicted for the life of the run (and survive partial `--failed`
- # re-runs), so the handoff is reliable. tar relative to / so the home
- # (~/.m2) and workspace paths restore to identical absolute locations on
- # the consumer (same macos-15 image -> same /Users/runner paths).
- - name: Bundle built CN1 + mac port artifacts
- run: |
- set -euo pipefail
- # Include codenameone-tools (the workspace tools dir holding
- # tools/env.sh) alongside the built tree. It is produced by
- # setup-workspace in this job and consumed by every dependent build
- # script (build-macos-app.sh reads ${TMPDIR}/codenameone-tools/
- # tools/env.sh, TMPDIR=runner.temp). It had its own evictable cache
- # too; when that cache was evicted mid-queue the dependent builds
- # failed with "Workspace tools not found" even after the cn1-built-mac
- # restore succeeded. Bundling it into the same artifact makes the
- # whole handoff eviction-proof.
- tar -C / -cf "$RUNNER_TEMP/cn1-built-mac-bundle.tar" \
- "${HOME#/}/.m2/repository/com/codenameone" \
- "${GITHUB_WORKSPACE#/}/Themes" \
- "${GITHUB_WORKSPACE#/}/Ports/MacPort/nativeSources" \
- "${GITHUB_WORKSPACE#/}/Ports/iOSPort/nativeSources" \
- "${RUNNER_TEMP#/}/codenameone-tools"
- ls -la "$RUNNER_TEMP/cn1-built-mac-bundle.tar"
-
- - name: Upload built CN1 + mac port bundle
- uses: actions/upload-artifact@v4
- with:
- name: cn1-built-mac-bundle
- path: ${{ runner.temp }}/cn1-built-mac-bundle.tar
- retention-days: 1
- if-no-files-found: error
diff --git a/.github/workflows/ad-cn1lib-ios-native-check.yml b/.github/workflows/ad-cn1lib-ios-native-check.yml
index 1ea72c595b9..29aa75dc100 100644
--- a/.github/workflows/ad-cn1lib-ios-native-check.yml
+++ b/.github/workflows/ad-cn1lib-ios-native-check.yml
@@ -67,7 +67,7 @@ jobs:
# library. Keep both ARC modes and both AdMob link destinations.
needs: [golden-plan, select]
if: ${{ needs.golden-plan.outputs.run == 'true' && (needs.select.outputs.libraries != '' || needs.select.outputs.link == 'true') }}
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/ai-cn1lib-native-check.yml b/.github/workflows/ai-cn1lib-native-check.yml
index cc0c3870496..086178d43c9 100644
--- a/.github/workflows/ai-cn1lib-native-check.yml
+++ b/.github/workflows/ai-cn1lib-native-check.yml
@@ -57,16 +57,17 @@ jobs:
# library. Keep both ARC modes and both AdMob link destinations.
needs: [golden-plan, select]
if: ${{ needs.golden-plan.outputs.run == 'true' && (needs.select.outputs.libraries != '') }}
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 120
steps:
- uses: actions/checkout@v6
- name: Use Google's copy of Maven Central first
uses: ./.github/actions/maven-central-mirror
- - name: Select Xcode 16
+ # The xcode-27 image carries Xcode 27 only; take the newest installed.
+ - name: Select Xcode
run: |
set -euo pipefail
- XCODE_PATH=$(ls -d /Applications/Xcode_16*.app 2>/dev/null | sort -V | tail -1)
+ XCODE_PATH=$(ls -d /Applications/Xcode_*.app 2>/dev/null | sort -V | tail -1)
test -n "$XCODE_PATH"
sudo xcode-select -s "$XCODE_PATH/Contents/Developer"
xcodebuild -version
diff --git a/.github/workflows/ai-natives.yml b/.github/workflows/ai-natives.yml
index 1a0835a6a56..fa4f3146dc4 100644
--- a/.github/workflows/ai-natives.yml
+++ b/.github/workflows/ai-natives.yml
@@ -19,7 +19,7 @@ concurrency:
jobs:
ios:
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 90
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml
index ea2f1666c2d..c461569851d 100644
--- a/.github/workflows/ant.yml
+++ b/.github/workflows/ant.yml
@@ -66,7 +66,7 @@ jobs:
# compile the natives that call them. clang alone is not enough; without
# these the run failed on "'curl/curl.h' file not found" after translating
# perfectly well. Same four packages, same reason, as archetype-smoke.yml
- # and parparvm-tests.yml.
+ # and linux-build-run.yml.
run: |
bash scripts/ci/apt-get-install.sh xvfb clang \
libcurl4-openssl-dev libssl-dev libnghttp2-dev
diff --git a/.github/workflows/archetype-smoke.yml b/.github/workflows/archetype-smoke.yml
index a38d94fdf31..f29f80a0f54 100644
--- a/.github/workflows/archetype-smoke.yml
+++ b/.github/workflows/archetype-smoke.yml
@@ -129,7 +129,7 @@ jobs:
# OpenSSL's, the HTTP/2 framing is nghttp2's -- and the natives that call
# them need those headers to compile at all: without them this failed on
# "'curl/curl.h' file not found" after translating perfectly well. The same
- # four packages, for the same reason, are in parparvm-tests.yml.
+ # four packages, for the same reason, are in linux-build-run.yml.
#
# xvfb is for the minimal-layout step, which runs cn1:test in the
# simulator's runner, and is left around the archetype smoke as it was.
diff --git a/.github/workflows/bastion.yml b/.github/workflows/bastion.yml
deleted file mode 100644
index d84b1cf3572..00000000000
--- a/.github/workflows/bastion.yml
+++ /dev/null
@@ -1,681 +0,0 @@
-name: Bastion (full-stack sample)
-
-# scripts/bastion is one Maven project holding a banking application and its
-# server: a `shared` module of transfer objects and @RestClient contracts, the
-# Codename One client that calls them, and a Codename One Backend that
-# implements them.
-#
-# Five things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM,
-# on SQLite and again on PostgreSQL and MySQL (backend-database)
-# client-e2e the app's own tests, and the server driven over HTTP the way the
-# app drives it (run-e2e.sh): sign-in with a second factor,
-# device registration, a signed payment, an order that fills and
-# a withdrawal the allow-list refuses -- on the JVM server and
-# the compiled one
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and opened in a headless browser
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# What only a cloud build turns on -- the hardening passes, Play Integrity and
-# the jailbreak checks -- is not built here; the app reports it as inactive.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/bastion/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/bastion.yml'
- # The same paths as pull_request: a change that a PR run would have
- # checked is checked again when it lands.
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/bastion and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/bastion
- run: python3 scripts/sync-initializr-template.py bastion
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/bastion
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/bastion/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: bastion-backend-tests
- path: scripts/bastion/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- chain:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Ether on a development chain
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Deposit, sweep and withdraw on a geth development node
- run: scripts/bastion/run-chain-test.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- MAVEN_OPTS: -Dmaven.repo.local=${{ github.workspace }}/.m2-repo
-
- # The integration test skips itself without a node, which would leave
- # this job green having proved nothing.
- - name: Check that the chain test ran
- working-directory: scripts/bastion/backend/target/surefire-reports
- run: |
- f=TEST-com.codenameone.examples.bastion.chain.ChainIntegrationTest.xml
- grep -o 'tests="[0-9]*"[^>]*skipped="[0-9]*"' "$f"
- if ! grep -q 'skipped="0"' "$f" || grep -q 'tests="0"' "$f"; then
- echo "::error::ChainIntegrationTest did not run"
- exit 1
- fi
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
- # The ledger reads what the writer before it committed, which
- # REPEATABLE READ (MySQL's default) does not answer; the server
- # refuses to start without this (IsolationCheck).
- sudo mysql -uroot -proot -e "SET GLOBAL transaction_isolation = 'READ-COMMITTED';"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/bastion \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: bastion-backend-${{ matrix.database }}-tests
- path: scripts/bastion/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: The app's tests, and the server driven over HTTP (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Ahead of the app's own build: a template that does not build should
- # not wait behind the end-to-end runs to say so. The Initializr's own
- # tests, which cover this template too, run in wayline.yml.
- - name: Build a project generated from the Initializr template
- run: scripts/bastion/check-template.sh "$RUNNER_TEMP/bastion-template"
- env:
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- # The app's own tests run headless in the build: the request signer
- # against the JDK, the network guard, the declared build hints against
- # the settings, the bundle, the QR encoder.
- - name: Build the app and run its tests
- working-directory: scripts/bastion
- run: mvn -B -Dcodename1.platform=javase -Djava.awt.headless=true package
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Drive the JVM server over HTTP
- run: scripts/bastion/run-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Drive the compiled server over HTTP
- run: |
- BASTION_SERVER_LOG="$GITHUB_WORKSPACE/scripts/bastion/target/e2e-server-native.log" \
- scripts/bastion/run-e2e.sh --native
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the server logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: bastion-e2e
- path: scripts/bastion/target/e2e-server*.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/bastion/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: bastion-web-e2e
- path: scripts/bastion/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/bastion
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-bastion-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-bastion-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-bastion-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-bastion-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/bastion
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/bastion-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -sdk iphonesimulator \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/bazaar.yml b/.github/workflows/bazaar.yml
deleted file mode 100644
index 0319676e72d..00000000000
--- a/.github/workflows/bazaar.yml
+++ /dev/null
@@ -1,595 +0,0 @@
-name: Bazaar (full-stack sample)
-
-# scripts/bazaar is one Maven project holding an application and its server:
-# a `shared` module of transfer objects and @RestClient contracts, the
-# Codename One client that calls them, and a Codename One Backend that
-# implements them. It is also what the initializr offers as a template.
-#
-# Six things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it under another name builds: its
-# server's tests pass and its app compiles (a step of client-e2e,
-# which has the artifacts installed)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/bazaar/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/bazaar.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/bazaar and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/bazaar
- run: python3 scripts/sync-initializr-template.py bazaar
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/bazaar
- run: |
- # sample-app is the third-party app sample; its own tests run on the
- # JVM, and RestockAppE2ETest in backend drives it end to end.
- mvn -B -Dcodename1.platform=backend -pl shared,backend,sample-app test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/bazaar/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: bazaar-backend-tests
- path: |
- scripts/bazaar/backend/target/surefire-reports/**
- scripts/bazaar/sample-app/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/bazaar \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: bazaar-backend-${{ matrix.database }}-tests
- path: scripts/bazaar/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/bazaar/check-template.sh "$RUNNER_TEMP/bazaar-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/bazaar/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: bazaar-e2e
- path: |
- scripts/bazaar/target/e2e-shots/**
- scripts/bazaar/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/bazaar/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: bazaar-web-e2e
- path: scripts/bazaar/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/bazaar
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-bazaar-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-bazaar-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-bazaar-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-bazaar-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/bazaar
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/bazaar-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -sdk iphonesimulator \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/blog-prose.yml b/.github/workflows/blog-prose.yml
index 10704b61b48..2c3659e122d 100644
--- a/.github/workflows/blog-prose.yml
+++ b/.github/workflows/blog-prose.yml
@@ -14,12 +14,15 @@ on:
# reports" deadlock that path-filtered workflows cause. The job itself detects
# whether any blog content changed and fast-skips (passing) when none did, so
# non-blog PRs stay cheap.
- pull_request:
schedule:
# Weekly whole-corpus backlog report (Mondays 06:00 UTC). Non-blocking.
- cron: '0 6 * * 1'
workflow_dispatch:
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
permissions:
contents: read
pull-requests: write
@@ -30,25 +33,16 @@ env:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: blog-prose-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
# --------------------------------------------------------------------------- #
# PR gate — fails only on net-new findings in changed posts.
# --------------------------------------------------------------------------- #
gate:
- needs: golden-plan
name: Blog prose gate
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name == 'pull_request') }}
+ if: ${{ (github.event_name == 'pull_request') }}
runs-on: ubuntu-24.04
steps:
- name: Check out repository
@@ -248,8 +242,7 @@ jobs:
# Weekly / on-demand whole-corpus backlog report. NEVER fails the build.
# --------------------------------------------------------------------------- #
report:
- needs: golden-plan
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
+ if: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
runs-on: ubuntu-24.04
steps:
- name: Check out repository
diff --git a/.github/workflows/brickyard.yml b/.github/workflows/brickyard.yml
deleted file mode 100644
index 4c0264367be..00000000000
--- a/.github/workflows/brickyard.yml
+++ /dev/null
@@ -1,275 +0,0 @@
-name: Brickyard (game platform sample)
-
-# scripts/brickyard is a user-generated-content game platform: players play
-# experiences built from Luau scripts and place files, creators build and
-# publish them in an in-app studio, admins moderate. It is one Maven project:
-# `shared` holds the REST contract and the engine both halves run (the Luau
-# interpreter, the engine API, place file I/O, physics and replication),
-# `common` is the Codename One app (with the renderer, play view and studio)
-# and `backend` is the Codename One Backend.
-#
-# Checked here:
-#
-# backend the server's tests on the JVM and compiled by ParparVM,
-# on in-memory SQLite
-# backend-database the same tests on PostgreSQL and MySQL
-# app the engine's tests (the Luau conformance suite, the
-# starter templates played headless, place round trips,
-# replication between a server and two clients) and the
-# client's
-#
-# Not here yet: a simulator or device leg, because the project has no javase
-# module.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- pull_request:
- paths:
- - 'scripts/brickyard/**'
- - '.github/workflows/brickyard.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
-
-jobs:
- backend:
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,backend,backend-test,cn1-app-kit/backend,codenameone-maven-plugin \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/brickyard
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/brickyard/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: brickyard-backend-tests
- path: scripts/brickyard/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value. PostgreSQL and MySQL are what a deployment
- # runs on, and where the ORM's schema validation refuses a mapping that
- # disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,backend,backend-test,cn1-app-kit/backend,codenameone-maven-plugin \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/brickyard \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: brickyard-backend-${{ matrix.database }}-tests
- path: scripts/brickyard/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- app:
- name: Engine and client tests
- runs-on: ubuntu-24.04
- timeout-minutes: 40
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,css-compiler,codenameone-maven-plugin,backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Starter templates match their generator
- # The .rbxlx templates are checked in so the build needs no Python, and
- # generated so their scripts stay editable: a hand edit to either side
- # is drift.
- run: |
- python3 scripts/brickyard/tools/gen-templates.py
- git diff --exit-code -- scripts/brickyard/shared/src/main/resources/com/codenameone/examples/brickyard/rbx/templates
-
- - name: Test the engine and the client
- # The javase profile is the one that runs JUnit; without it the
- # client's tests only compiled. -am brings in shared, whose tests are
- # the engine's.
- working-directory: scripts/brickyard
- run: |
- mvn -B -Dcodename1.platform=javase -pl common -am test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
diff --git a/.github/workflows/call-vpn-native.yml b/.github/workflows/call-vpn-native.yml
index 347fa08273d..17c63aaaa0c 100644
--- a/.github/workflows/call-vpn-native.yml
+++ b/.github/workflows/call-vpn-native.yml
@@ -48,7 +48,7 @@ jobs:
needs: golden-plan
if: needs.golden-plan.outputs.run == 'true'
name: Clang syntax check for the call and VPN natives
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/car-android.yml b/.github/workflows/car-android.yml
index aa00975af40..854bfb47cd8 100644
--- a/.github/workflows/car-android.yml
+++ b/.github/workflows/car-android.yml
@@ -34,17 +34,9 @@ jobs:
permissions:
contents: read
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
car-android:
if: needs.golden-plan.outputs.run == 'true'
- needs: [golden-plan, unity-gallery]
+ needs: [golden-plan]
name: Car Android Auto
permissions:
contents: read
@@ -79,7 +71,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-car-android-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-car-android-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-car-android-
${{ runner.os }}-m2-
@@ -98,10 +90,6 @@ 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
diff --git a/.github/workflows/car-ios.yml b/.github/workflows/car-ios.yml
index 1ab67cd266f..8822ce95058 100644
--- a/.github/workflows/car-ios.yml
+++ b/.github/workflows/car-ios.yml
@@ -37,21 +37,13 @@ jobs:
permissions:
contents: read
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
car-ios:
if: needs.golden-plan.outputs.run == 'true'
- needs: [golden-plan, unity-gallery]
+ needs: [golden-plan]
name: Car CarPlay
permissions:
contents: read
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 75
env:
GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
@@ -75,7 +67,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-car-ios-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-car-ios-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-car-ios-
${{ runner.os }}-m2-
@@ -95,10 +87,6 @@ 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
diff --git a/.github/workflows/check-doc-snippets.yml b/.github/workflows/check-doc-snippets.yml
index 2fe433da666..49c5c8b8de8 100644
--- a/.github/workflows/check-doc-snippets.yml
+++ b/.github/workflows/check-doc-snippets.yml
@@ -7,53 +7,21 @@ name: Documentation snippets run in the Playground
# filter skips docs/.
on:
- pull_request:
- paths:
- - 'docs/developer-guide/**'
- # Every tree a guide page includes Java from: changing an included file
- # changes the published snippet without touching the .asciidoc.
- - 'docs/demos/**'
- - 'scripts/wayline/**'
- - 'scripts/savor/**'
- - 'scripts/bazaar/**'
- - 'scripts/bastion/**'
- - 'scripts/pulse/**'
- - 'scripts/slate/**'
- - 'scripts/splat/**'
- - 'scripts/skirmish/**'
- - 'scripts/papercut/**'
- - 'scripts/dash/**'
- - 'scripts/hellocodenameone/common/src/main/kmp/**'
- - 'docs/website/content/blog/**'
- - 'CodenameOne/src/**/*.java'
- - 'Ports/CLDC11/src/**/*.java'
- - 'scripts/cn1playground/common/**'
- - 'vm/JavaCompiler/**'
- - 'scripts/check-doc-snippets.py'
- - 'scripts/doc-snippet-baseline.txt'
- - 'scripts/extract-javadoc-java-snippets.sh'
- - '.github/workflows/check-doc-snippets.yml'
workflow_dispatch:
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
permissions:
contents: read
concurrency:
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: check-doc-snippets-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
doc-snippets:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/check-workflows.yml b/.github/workflows/check-workflows.yml
index b466a9bb113..97edea55f40 100644
--- a/.github/workflows/check-workflows.yml
+++ b/.github/workflows/check-workflows.yml
@@ -19,31 +19,17 @@ permissions:
on:
workflow_dispatch:
- pull_request:
- branches:
- - master
- push:
- branches:
- - master
-
+ # Pull requests and master pushes run this as part of ci.yml's precheck,
+ # which every other job of that run waits on.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: check-workflows-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
check-workflows:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
@@ -72,17 +58,10 @@ jobs:
run: |
python3 scripts/ci/test_select_cn1lib_checks.py
python3 scripts/ci/test_select_apple_checks.py
+ python3 scripts/ci/test_select_ci_members.py
python3 scripts/ci/test_cn1ss_golden_plan.py
node --test scripts/ci/test-cancel-stale-pr-runs.js
- # Same reasoning one level up: build-ios-metal-27 and fidelity-ios-metal-27
- # are COPIES of the jobs beside them, and a copy nobody checks drifts. Both
- # legs of a pair stay green while diverging, because each passes on its own
- # terms and nothing compares them. Also unfiltered by paths -- a pair can
- # drift through an edit to either side.
- - name: Duplicated CI legs must stay identical
- run: scripts/check-duplicated-ci-legs.py
-
# This workflow is unfiltered, so changes to the spec, its validator, or any
# native reference table are checked before they reach master.
- name: Validate fidelity spec and native reference tables
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000000..fd0b8452936
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,232 @@
+name: CI
+
+# The one workflow a pull request or a master push starts (the sample
+# applications, cn1libs and nightlies keep their own, path-scoped workflows).
+#
+# precheck golden-plan, source-gates and check-workflows, a few minutes on
+# Linux. A missing golden, a missing package-info.java, a bad
+# header, a broken workflow file: anything here fails the run
+# before a single build starts, and NOTHING below runs.
+# select which member workflows the change touches, from each member's
+# old `paths` filter (.github/ci/ci-members.json,
+# scripts/ci/select-ci-members.py).
+# members the selected workflows, as reusable calls in this same run, so
+# they share its artifacts instead of each rebuilding them.
+#
+# Before this, every member triggered on its own: about ninety workflows each
+# ran their own golden-plan copy and then their own builds, so one doomed
+# change kept macOS, Windows and Linux runners busy for hours.
+#
+# A missing golden is not a failure of the change: golden-plan goes red here,
+# and Golden capture (golden-capture.yml) records the goldens and pushes them,
+# which starts this workflow again.
+
+on:
+ pull_request:
+ push:
+ branches: [master, main]
+ workflow_dispatch:
+
+concurrency:
+ group: ci-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ golden-plan:
+ uses: ./.github/workflows/golden-plan.yml
+ permissions:
+ contents: read
+
+ source-gates:
+ uses: ./.github/workflows/source-gates.yml
+ permissions:
+ contents: read
+
+ check-workflows:
+ uses: ./.github/workflows/check-workflows.yml
+ permissions:
+ contents: read
+
+ select:
+ runs-on: ubuntu-24.04
+ timeout-minutes: 10
+ permissions:
+ contents: read
+ outputs:
+ scripts-ios: ${{ steps.select.outputs.scripts-ios }}
+ scripts-android: ${{ steps.select.outputs.scripts-android }}
+ scripts-javascript: ${{ steps.select.outputs.scripts-javascript }}
+ scripts-javase: ${{ steps.select.outputs.scripts-javase }}
+ linux-build-run: ${{ steps.select.outputs.linux-build-run }}
+ pr: ${{ steps.select.outputs.pr }}
+ javadocs: ${{ steps.select.outputs.javadocs }}
+ website-docs: ${{ steps.select.outputs.website-docs }}
+ developer-guide-docs: ${{ steps.select.outputs.developer-guide-docs }}
+ check-doc-snippets: ${{ steps.select.outputs.check-doc-snippets }}
+ cn1playground-language: ${{ steps.select.outputs.cn1playground-language }}
+ blog-prose: ${{ steps.select.outputs.blog-prose }}
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ persist-credentials: false
+ # Commits and trees only: the selection reads names, never contents.
+ fetch-depth: 0
+ filter: blob:none
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - id: select
+ env:
+ EVENT: ${{ github.event_name }}
+ BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
+ run: |
+ set -euo pipefail
+ python3 scripts/ci/select-ci-members.py --event "$EVENT" --base "$BASE" --head HEAD
+
+ scripts-ios:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.scripts-ios == 'true' }}
+ uses: ./.github/workflows/scripts-ios.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ scripts-android:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.scripts-android == 'true' }}
+ uses: ./.github/workflows/scripts-android.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ scripts-javascript:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.scripts-javascript == 'true' }}
+ uses: ./.github/workflows/scripts-javascript.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ scripts-javase:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.scripts-javase == 'true' }}
+ uses: ./.github/workflows/scripts-javase.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ linux-build-run:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.linux-build-run == 'true' }}
+ uses: ./.github/workflows/linux-build-run.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ pr:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.pr == 'true' }}
+ uses: ./.github/workflows/pr.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ # pr.yml's Java 8 leg builds the same javadocs (build_javadocs.sh) and uploads
+ # the same artifact name, which a second upload in one run may not reuse.
+ javadocs:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.javadocs == 'true' && needs.select.outputs.pr != 'true' }}
+ uses: ./.github/workflows/javadocs.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ website-docs:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.website-docs == 'true' }}
+ uses: ./.github/workflows/website-docs.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ developer-guide-docs:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.developer-guide-docs == 'true' }}
+ uses: ./.github/workflows/developer-guide-docs.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ check-doc-snippets:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.check-doc-snippets == 'true' }}
+ uses: ./.github/workflows/check-doc-snippets.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ cn1playground-language:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.cn1playground-language == 'true' }}
+ uses: ./.github/workflows/cn1playground-language.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
+
+ blog-prose:
+ needs: [golden-plan, source-gates, check-workflows, select]
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.source-gates.result == 'success' && needs.check-workflows.result == 'success' && needs.select.outputs.blog-prose == 'true' }}
+ uses: ./.github/workflows/blog-prose.yml
+ secrets: inherit
+ permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+ actions: write
+ packages: read
diff --git a/.github/workflows/cn1playground-language.yml b/.github/workflows/cn1playground-language.yml
index c3143111433..57c600ca00c 100644
--- a/.github/workflows/cn1playground-language.yml
+++ b/.github/workflows/cn1playground-language.yml
@@ -4,40 +4,25 @@ on:
# Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
# fails), and on a pull request only when this workflow's own tree changes.
# Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- types: [opened, synchronize, reopened, ready_for_review]
- paths:
- - 'scripts/cn1playground/**'
- # Playground code is compiled by the in-tree compiler and, in the browser,
- # translated by ParparVM and loaded into the running VM.
- - 'vm/JavaCompiler/**'
- - 'maven/javac/**'
- - '.github/workflows/cn1playground-language.yml'
workflow_dispatch:
schedule:
- cron: '11 0 * * *'
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
permissions:
contents: read
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: cn1playground-language-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
language-smoke:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
name: Playground language smoke
runs-on: ubuntu-24.04
@@ -81,8 +66,6 @@ jobs:
xvfb-run -a bash tools/run-playground-smoke-tests.sh
browser-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
name: Playground in the browser
# The job has taken 24-58 minutes; see the browser step for why it has a limit.
timeout-minutes: 90
diff --git a/.github/workflows/dart-flutter-tests.yml b/.github/workflows/dart-flutter-tests.yml
index 366fc22c3de..b9700dcad73 100644
--- a/.github/workflows/dart-flutter-tests.yml
+++ b/.github/workflows/dart-flutter-tests.yml
@@ -93,7 +93,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2
- key: ${{ runner.os }}-m2-dart-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-dart-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-dart-
${{ runner.os }}-m2
diff --git a/.github/workflows/dash.yml b/.github/workflows/dash.yml
deleted file mode 100644
index 9de9984b8da..00000000000
--- a/.github/workflows/dash.yml
+++ /dev/null
@@ -1,561 +0,0 @@
-name: Dash (runner sample)
-
-# scripts/dash is one Maven project holding a game and its server: a
-# `shared` module (the deterministic simulation both sides run, plus the
-# transfer objects and @RestClient contracts), the Codename One client
-# (`common`), a Codename One Backend that implements the contracts, and an `ios`
-# module for the device build. It is modelled on savor.yml.
-#
-# Five things are checked here, because each fails without the others noticing:
-#
-# rules the simulation's own tests (in `shared`), on the JVM, with no server
-# backend the server's own tests, on the JVM and compiled by ParparVM,
-# then the same tests on PostgreSQL and MySQL
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server (run-e2e.sh builds and starts
-# the server itself)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# Savor's `web` job (the browser build hosted by the server) is dropped: Dash
-# has no run-web-e2e.sh, so there is nothing to run. The two device builds stop
-# at a build: the screens are covered by the simulator run, and neither port
-# holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/dash/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/dash.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/dash and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/dash
- run: |
- python3 scripts/sync-initializr-template.py dash
-
- rules:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Rules tests (deterministic simulation)
- runs-on: ubuntu-24.04
- timeout-minutes: 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the simulation tests
- working-directory: scripts/dash
- run: mvn -B -pl shared test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: dash-simulation-tests
- path: scripts/dash/shared/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/dash
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/dash/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: dash-backend-tests
- path: scripts/dash/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/dash \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: dash-backend-${{ matrix.database }}-tests
- path: scripts/dash/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/dash/check-template.sh "$RUNNER_TEMP/dash-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/dash/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: dash-e2e
- path: |
- scripts/dash/target/e2e-shots/**
- scripts/dash/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/dash
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-dash-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-dash-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-dash-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-dash-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/dash
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/dash-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
- # embedded watch app included, whose watch-only icon then has nothing to
- # compile for. The destination picks each target's own SDK.
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/developer-guide-docs.yml b/.github/workflows/developer-guide-docs.yml
index caa16119ca3..cf96c472190 100644
--- a/.github/workflows/developer-guide-docs.yml
+++ b/.github/workflows/developer-guide-docs.yml
@@ -1,105 +1,22 @@
name: Build Developer Guide Docs
on:
- pull_request:
- paths:
- - 'scripts/ci/retry.sh'
- - 'docs/developer-guide/**'
- - 'docs/demos/**'
- - 'scripts/developer-guide/**'
- # The Wayline chapters include the sample's own sources by tag, so moving
- # or deleting a tagged region there changes the guide without touching
- # docs/. Only the trigger, not the `docs` filter below: the Asciidoctor
- # lint runs on every trigger and fails on a tag it cannot find, and the
- # sample itself is compiled and tested by wayline.yml, so the demo build
- # and the figure render have nothing to add for it.
- - 'scripts/wayline/**'
- # The Savor and Parley chapters, the same way; savor.yml and parley.yml
- # compile and test the samples.
- - 'scripts/savor/**'
- - 'scripts/bazaar/**'
- # The Bastion chapters, the same way; bastion.yml compiles and tests it.
- - 'scripts/bastion/**'
- - 'scripts/pulse/**'
- - 'scripts/slate/**'
- - 'scripts/splat/**'
- - 'scripts/skirmish/**'
- - 'scripts/papercut/**'
- - 'scripts/dash/**'
- - 'scripts/parley/**'
- - 'scripts/hellocodenameone/common/src/main/kmp/**'
- - 'scripts/reel/**'
- # The Wayline chapter includes the app kit's push senders.
- - 'maven/cn1-app-kit/**'
- # The API-name check derives the published pages from the javadoc's own
- # sources, and the guide links into the java.* compatibility classes --
- # java/util/List.html among them. A change that renames or deletes one
- # of those without touching docs/ would otherwise skip this job and
- # leave a dead link behind.
- - 'Ports/CLDC11/**'
- # And the script that decides what javadoc publishes at all. The check
- # mirrors its source roots, its excluded package and its -protected
- # setting, so a change to any of those moves which links are alive
- # without touching a page.
- - '.github/scripts/build_javadocs.sh'
- - '.github/workflows/developer-guide-docs.yml'
- # The build hint table is rendered rather than committed, so a change to
- # anything it is rendered FROM changes what this guide contains without
- # touching a single file under docs/. While the table was checked in that
- # edit showed up as a docs diff and triggered this workflow for free;
- # generating it on the fly took that away, and a malformed table would then
- # have merged and surfaced in the release documentation build.
- #
- # All four inputs, not just the catalog: the annotations are the source of
- # truth for the hints they expose and their prose goes straight into the
- # Description column, and build-hint-tools is the renderer itself.
- - 'CodenameOne/src/com/codename1/annotations/buildhints/**'
- - 'maven/build-hint-catalog/**'
- - 'maven/build-hint-tools/**'
- - 'scripts/gen-build-hint-table.sh'
- # The themed figures are rendered against the compiled native themes, so
- # what those themes look like is an input to this guide exactly the way the
- # build hint sources above are. build-native-themes.sh compiles
- # native-themes//theme.css with maven/css-compiler through its
- # command line in maven/css-cli, so a change to any of them changes the
- # pictures without touching docs/ at all -- and the committed figures
- # would then go stale silently until some later run failed against them.
- - 'native-themes/**'
- - 'maven/css-compiler/**'
- - 'maven/css-cli/**'
- - 'scripts/build-native-themes.sh'
- # The figures are rendered by the framework itself, so a change to how a
- # component paints, how a layout measures, or how the JavaSE port
- # rasterizes changes every generated PNG without touching docs/ at all.
- # The comparison is byte-exact, so without these the committed figures go
- # stale silently and some later docs or release build is the one that
- # fails.
- - 'CodenameOne/**'
- - 'Ports/JavaSE/**'
- - 'maven/core/**'
- - 'maven/javase/**'
release:
types: [published]
workflow_dispatch:
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: developer-guide-docs-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
build:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
permissions:
contents: write
diff --git a/.github/workflows/fidelity-desktop-native-ref.yml b/.github/workflows/fidelity-desktop-native-ref.yml
index c53d03f0a69..66c3d369c07 100644
--- a/.github/workflows/fidelity-desktop-native-ref.yml
+++ b/.github/workflows/fidelity-desktop-native-ref.yml
@@ -132,7 +132,7 @@ jobs:
macos-ref:
if: ${{ inputs.targets == 'all' || inputs.targets == 'macos' }}
name: macOS (AppKit)
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 30
env:
CN1SS_FIDELITY_GOLDEN_SET: macos-aqua
diff --git a/.github/workflows/fieldline.yml b/.github/workflows/fieldline.yml
deleted file mode 100644
index f658080e325..00000000000
--- a/.github/workflows/fieldline.yml
+++ /dev/null
@@ -1,592 +0,0 @@
-name: Fieldline (full-stack sample)
-
-# scripts/fieldline is one Maven project holding a field service application and
-# its server: a `shared` module of transfer objects, @RestClient contracts and
-# the scheduling engine,
-# the Codename One client that calls them, and a Codename One Backend that
-# implements them.
-#
-# Five things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it builds (client-e2e)
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/fieldline/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/fieldline.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/fieldline and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/fieldline
- run: python3 scripts/sync-initializr-template.py fieldline
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/fieldline
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/fieldline/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: fieldline-backend-tests
- path: scripts/fieldline/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/fieldline \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: fieldline-backend-${{ matrix.database }}-tests
- path: scripts/fieldline/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/fieldline/check-template.sh "$RUNNER_TEMP/fieldline-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/fieldline/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: fieldline-e2e
- path: |
- scripts/fieldline/target/e2e-shots/**
- scripts/fieldline/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/fieldline/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: fieldline-web-e2e
- path: scripts/fieldline/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/fieldline
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-fieldline-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-fieldline-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-fieldline-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-fieldline-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/fieldline
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/fieldline-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
- # embedded watch app included, whose watch-only icon then has nothing to
- # compile for. The destination picks each target's own SDK.
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/flutter-acceptance.yml b/.github/workflows/flutter-acceptance.yml
index 64ca368da86..1709be99c77 100644
--- a/.github/workflows/flutter-acceptance.yml
+++ b/.github/workflows/flutter-acceptance.yml
@@ -67,7 +67,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2
- key: ${{ runner.os }}-m2-flutter-acceptance-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-flutter-acceptance-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-flutter-acceptance-
${{ runner.os }}-m2
diff --git a/.github/workflows/golden-harvest.yml b/.github/workflows/golden-harvest.yml
index 15ebfb84c13..589886d343a 100644
--- a/.github/workflows/golden-harvest.yml
+++ b/.github/workflows/golden-harvest.yml
@@ -32,10 +32,10 @@ on:
- Test iOS UI build scripts
- Test Android build scripts
- Test JavaScript screenshot scripts
- - Linux native build + run (GTK3, x64 + arm64)
- - ParparVM Java Tests (Windows)
- - Windows cross-build + run (Linux build -> Windows run)
+ - Native ParparVM (Linux + Windows) build, run and tests
- Test macOS UI build scripts
+ # Pull request runs of the workflows above run inside ci.yml.
+ - CI
types: [completed]
# By hand, for a head whose capture completed without starting this (see
# DISPATCH_TOKEN in golden-capture.yml): runs this file from master, like
diff --git a/.github/workflows/gradle-smoke.yml b/.github/workflows/gradle-smoke.yml
index 21793058cfe..91249fddcab 100644
--- a/.github/workflows/gradle-smoke.yml
+++ b/.github/workflows/gradle-smoke.yml
@@ -200,7 +200,7 @@ jobs:
# are the scarce pool, and the Linux job above already holds every other
# target to Maven/Gradle parity on the pull request.
if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'pull_request') }}
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 60
env:
CN1_GRADLE_REQUIRED: '1'
diff --git a/.github/workflows/guibuilder.yml b/.github/workflows/guibuilder.yml
index e07c139bfa9..35a05e0519d 100644
--- a/.github/workflows/guibuilder.yml
+++ b/.github/workflows/guibuilder.yml
@@ -77,7 +77,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
diff --git a/.github/workflows/health-android.yml b/.github/workflows/health-android.yml
index 4dfde892e60..7e9128a970d 100644
--- a/.github/workflows/health-android.yml
+++ b/.github/workflows/health-android.yml
@@ -47,17 +47,9 @@ jobs:
permissions:
contents: read
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
health-android:
if: needs.golden-plan.outputs.run == 'true'
- needs: [golden-plan, unity-gallery]
+ needs: [golden-plan]
name: Health Connect Android
permissions:
contents: read
@@ -80,7 +72,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-health-android-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-health-android-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-health-android-
${{ runner.os }}-m2-
@@ -99,10 +91,6 @@ 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: Make the smoke app a health app
run: |
diff --git a/.github/workflows/identity-stack.yml b/.github/workflows/identity-stack.yml
index 276e46357be..bf875810b16 100644
--- a/.github/workflows/identity-stack.yml
+++ b/.github/workflows/identity-stack.yml
@@ -90,7 +90,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-identity-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-identity-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-identity-
${{ runner.os }}-m2-
@@ -264,7 +264,7 @@ jobs:
needs: golden-plan
if: needs.golden-plan.outputs.run == 'true'
name: Clang syntax check for iOS native sources
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/input-validation.yml b/.github/workflows/input-validation.yml
index d9a2e40dba0..e87e95338ee 100644
--- a/.github/workflows/input-validation.yml
+++ b/.github/workflows/input-validation.yml
@@ -64,7 +64,7 @@ jobs:
needs: [golden-plan, build-port]
permissions:
contents: read
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 35
env:
GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
@@ -121,7 +121,10 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ # Not '**/pom.xml': the post step evaluates the key again after the build,
+ # and walking the generated Xcode and Pods trees took past GitHub's 120s
+ # limit on a macOS runner, failing a job whose tests had passed.
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
diff --git a/.github/workflows/ios-accessibility-thread.yml b/.github/workflows/ios-accessibility-thread.yml
index b17a8cc038a..433fe8f4f43 100644
--- a/.github/workflows/ios-accessibility-thread.yml
+++ b/.github/workflows/ios-accessibility-thread.yml
@@ -35,7 +35,7 @@ jobs:
native-contract:
needs: golden-plan
if: needs.golden-plan.outputs.run == 'true'
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/ios-packaging.yml b/.github/workflows/ios-packaging.yml
index b63623db442..2116f8852b8 100644
--- a/.github/workflows/ios-packaging.yml
+++ b/.github/workflows/ios-packaging.yml
@@ -8,11 +8,6 @@ on:
port_prepared:
type: boolean
default: false
- # True when the caller already ran unity-gallery-prebuilt.yml in this run:
- # its artifact has a fixed name and cannot be uploaded twice.
- unity_prepared:
- type: boolean
- default: false
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
@@ -31,12 +26,6 @@ env:
CN1_CULL_TRAP: '1'
jobs:
- # The application has a Unity project in it. One Linux job compiles it and
- # hands the result to the job below as an artifact, unless the caller did.
- unity-gallery:
- if: ${{ !inputs.unity_prepared }}
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
build-port:
if: ${{ !inputs.port_prepared }}
uses: ./.github/workflows/_build-ios-port.yml
@@ -44,11 +33,11 @@ jobs:
test_server: true
packaging:
- if: ${{ !cancelled() && (inputs.port_prepared || needs.build-port.result == 'success') && (inputs.unity_prepared || needs.unity-gallery.result == 'success') }}
- needs: [build-port, unity-gallery]
+ if: ${{ !cancelled() && (inputs.port_prepared || needs.build-port.result == 'success') }}
+ needs: [build-port]
permissions:
contents: read
- runs-on: macos-15
+ runs-on: xcode-27
# This job runs device Release and simulator UI builds in sequence. The
# numbers below are from when a third build, for the notification tests,
# followed them; it is gone (see the end of the job) and the limit has been
@@ -66,10 +55,12 @@ jobs:
# signature drift between hand-written iOS port .m files and the
# ParparVM-generated `set_field_*` headers, which is otherwise invisible
# until a customer enables Google sign-in.
+ # The pod is MBProgressHUD, not AFNetworking: AFNetworking is archived and
+ # includes netinet6/in6.h directly, which the iOS 27 SDK rejects with modules on.
env:
IOS_DEPENDENCY_ARGS: >-
-Dcodename1.arg.ios.dependencyManager=both
- -Dcodename1.arg.ios.pods=AFNetworking
+ -Dcodename1.arg.ios.pods=MBProgressHUD
-Dcodename1.arg.ios.spm.packages=swift-collections|https://github.com/apple/swift-collections.git|from:1.1.0
-Dcodename1.arg.ios.spm.products.swift-collections=Collections
-Dcodename1.arg.ios.gplus.clientId=000000000000-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.apps.googleusercontent.com
@@ -145,7 +136,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
@@ -180,11 +171,6 @@ jobs:
echo "No prebuilt test server in the bundle; the suite builds its own."
fi
- # 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
id: build_ios_app
run: ./scripts/build-ios-app.sh -q -DskipTests
diff --git a/.github/workflows/ios-push-completion.yml b/.github/workflows/ios-push-completion.yml
index 597d9264a9c..2b4ce550035 100644
--- a/.github/workflows/ios-push-completion.yml
+++ b/.github/workflows/ios-push-completion.yml
@@ -34,7 +34,7 @@ jobs:
native-contract:
needs: golden-plan
if: needs.golden-plan.outputs.run == 'true'
- runs-on: macos-15
+ runs-on: xcode-27
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/javadocs.yml b/.github/workflows/javadocs.yml
index 32d6f70cd3a..680b7785c4f 100644
--- a/.github/workflows/javadocs.yml
+++ b/.github/workflows/javadocs.yml
@@ -1,46 +1,23 @@
name: Build JavaDocs
on:
- pull_request:
- paths:
- - 'CodenameOne/src/**/*.java'
- - 'Ports/**/src/**/*.java'
- # The backend API reference is built by the same script, from these.
- - 'vm/backend/src/**/*.java'
- - 'vm/backend/impl/**/*.java'
- - 'vm/backend/shared-sources.sh'
- - 'vm/backend/package-docs/**'
- - 'maven/**/src/main/java/**/*.java'
- - '.github/scripts/build_javadocs.sh'
- - 'scripts/check-package-info.sh'
- - '.github/workflows/javadocs.yml'
- push:
- branches:
- - master
- - main
release:
types:
- published
workflow_dispatch:
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: javadocs-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
build-javadocs:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
permissions:
contents: write
diff --git a/.github/workflows/linux-build-run.yml b/.github/workflows/linux-build-run.yml
index b681bd8ccd5..6f879fc4fba 100644
--- a/.github/workflows/linux-build-run.yml
+++ b/.github/workflows/linux-build-run.yml
@@ -1,32 +1,39 @@
-# Native Linux (GTK3) build + run pipeline. The Linux port builds natively on the
-# runner -- no cross-compile -- so each architecture both builds and runs the
-# binary. It runs on BOTH architectures GitHub hosts natively: x86_64
-# (ubuntu-24.04) and arm64 (ubuntu-24.04-arm), giving the port the same two-arch
-# screenshot coverage the native Windows port has.
+# Native ParparVM: every Linux- and Windows-native translation suite, and the
+# ParparVM JVM tests, in one workflow so the inputs they share are built once.
#
-# The hellocodenameone screenshot suite is compiled by the codenameone maven
-# plugin, which depends on CEF -- and CEF has no linux-arm64 build, so the plugin
-# (hence the suite's *.class) only builds on x64. The translated C is
-# architecture-independent, so the suite classes are built once on x64 and shared;
-# each arch then builds only core + the Linux port (which build fine on arm64),
-# translates the shared classes with the "linux" app type, native-builds the ELF
-# (CMake/Ninja), runs it headless under Xvfb and captures the suite over the cn1ss
-# WebSocket.
+# prepare-suite (Linux x64) is the one build of the hellocodenameone
+# application: the plugin, the common module, the libraries
+# it ships (translation-libs) and the CI test server, uploaded as
+# linux-suite-classes. Those are bytecode and a runnable java copy, so every
+# leg below downloads them instead of rebuilding them -- on Linux and Windows.
+#
+# What each leg still builds is what genuinely belongs to its platform: core
+# and its own port (Linux natively per arch, so the per-arch native build
+# matches; Windows x64 on its own runner, which hands its core + port classes
+# to the arm64 leg, because Temurin has no JDK 8 for Windows/aarch64), the
+# ByteCodeTranslator and JavaAPI that each test module compiles as part of
+# `mvn -pl tests -am`, and the native toolchain output.
#
# Jobs:
-# prepare-suite (x64) -> builds the plugin + hellocodenameone-common,
-# uploads the suite classes and those of
-# the libraries it ships (translation-libs)
-# build-run (matrix x64 + arm64) -> core + Linux port, translate + build + run,
-# uploads PNGs/arch
-# compare-comment (ubuntu) -> diffs each arch vs its in-repo baseline,
-# posts the PR comment
+# prepare-suite -> the shared suite build (Linux x64)
+# build-run (x64 + arm64), build-run-musl, compare-comment
+# -> Linux GTK3 port, translate + run + capture
+# wincross-build, wincross-run, wincross-compare-comment
+# -> Windows exe cross-built on Linux, run on Windows
+# windows-port-screenshot(-arm64), windows-port-screenshot-comment-*
+# -> Windows port built and run natively (clang-cl)
+# vm-tests-windows, widgetboard-compile-check
+# -> ParparVM clean-target build on Windows
+# ablation-arms, vm-tests, backend-*, python-backend-native, release-jars
+# -> ParparVM JVM tests (Linux); the
+# quality-report-previews-parparvm push is in vm-tests
+#
+# golden-capture.sh dispatches this file for scripts/linux and scripts/windows;
+# a capture runs only the screenshot legs whose rendering is the golden (the
+# Linux legs and the native Windows x64 leg).
name: Linux native build + run (GTK3, x64 + arm64)
on:
- # Manual dispatch: this PR's changed-file count exceeds GitHub's paths-filter
- # diff limit, so pull_request triggers stopped firing -- dispatch with
- # gh workflow run --ref
workflow_dispatch:
inputs:
cn1ss_capture:
@@ -36,94 +43,19 @@ on:
type: string
schedule:
- cron: '45 1 * * *'
- 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/compose-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/linux-build-run.yml'
- # The package install goes through these, and they run from this workflow
- # too -- a change to either must be exercised by the job that depends on
- # it, the same way archetype-smoke, designer and pr.yml list them.
- - 'scripts/ci/apt-get-install.sh'
- - 'scripts/ci/apt-get-update.sh'
- - 'scripts/ci/steam-runtime-smoke.sh'
- - 'scripts/test_gc_heap_removal.py'
- - 'vm/**'
- - 'Ports/LinuxPort/**'
- - 'maven/linux/**'
- - 'scripts/linux/**'
- - 'scripts/hellocodenameone/**'
- # The Rive screenshot tests draw classes this translator generates.
- - 'maven/rive-transcoder/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- # The screenshots these legs compare are produced by the core renderer and
- # the port's native theme, so a change to either can move them. Without
- # these the leg does not run on the pull request that changes them and the
- # baselines only go stale on master - which is how the Sheet and
- # AppReviewDialog captures were left recording a double paint (issue
- # #5606). scripts/linux holds the baselines themselves, so a reseed is
- # verified by the leg that produced it.
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'native-themes/gnome-adwaita/**'
- - '!native-themes/gnome-adwaita/**/*.md'
- - '!vm/**/README.md'
- - '!vm/**/readme.md'
- - '!vm/**/docs/**'
- push:
- branches: [ master, main ]
- 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/compose-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/linux-build-run.yml'
- - 'scripts/ci/apt-get-install.sh'
- - 'scripts/ci/apt-get-update.sh'
- - 'scripts/ci/steam-runtime-smoke.sh'
- - 'scripts/test_gc_heap_removal.py'
- - 'vm/**'
- - 'Ports/LinuxPort/**'
- - 'maven/linux/**'
- - 'scripts/linux/**'
- - 'scripts/hellocodenameone/**'
- # The Rive screenshot tests draw classes this translator generates.
- - 'maven/rive-transcoder/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- # The screenshots these legs compare are produced by the core renderer and
- # the port's native theme, so a change to either can move them. Without
- # these the leg does not run on the pull request that changes them and the
- # baselines only go stale on master - which is how the Sheet and
- # AppReviewDialog captures were left recording a double paint (issue
- # #5606). scripts/linux holds the baselines themselves, so a reseed is
- # verified by the leg that produced it.
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'native-themes/gnome-adwaita/**'
- - '!native-themes/gnome-adwaita/**/*.md'
-
+ # Publishing a release attaches the JavaAPI and ByteCodeTranslator jars
+ # (release-jars); the screenshot legs skip it.
+ release:
+ types:
+ - published
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: linux-build-run-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
@@ -135,31 +67,18 @@ env:
# BytecodeMethod.appendMethodC. Not in the size or perf benchmarks, whose
# binaries should be the ones customers get.
CN1_CULL_TRAP: '1'
+ # CN1_NATIVE_VERIFY (strict) is set per job on the ParparVM test and Windows
+ # native jobs, as their own workflows did; the MSVC STL mismatch switch
+ # (CFLAGS/CXXFLAGS) is set on the Windows native jobs only, since a Linux
+ # compile must not see it.
jobs:
- # First, so a PR whose new screenshot tests have no goldens yet runs nothing
- # here; Golden capture (golden-capture.yml) records them instead.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- with:
- capture: ${{ inputs.cn1ss_capture || '' }}
-
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
# Build the codenameone maven plugin (it needs CEF, which is x64-only on Linux)
# and the hellocodenameone screenshot suite, then publish the suite *.class
# and the *.class of the libraries it ships (common/target/translation-libs:
- # the mock ad provider, the Unity runtime). These are architecture-independent (they are translated to C later),
+ # the mock ad provider). These are architecture-independent (they are translated to C later),
# so both arch legs translate from these same classes.
prepare-suite:
- if: needs.golden-plan.outputs.run == 'true'
- needs: [golden-plan, unity-gallery]
name: build suite classes (x64)
runs-on: ubuntu-24.04
timeout-minutes: 60
@@ -200,11 +119,6 @@ jobs:
mvn -B -pl codenameone-maven-plugin,cn1-ads-mock,compose-compat,rive-runtime,backend,backend-test -am \
-DskipTests '-Dmaven.javadoc.skip=true' '-Plocal-dev-javase' install
- # 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: Enter golden capture mode
uses: ./.github/actions/cn1ss-capture
with:
@@ -248,9 +162,8 @@ jobs:
retention-days: 1
build-run:
- if: needs.golden-plan.outputs.run == 'true'
name: build + run suite (${{ matrix.arch }})
- needs: [golden-plan, prepare-suite]
+ needs: [prepare-suite]
runs-on: ${{ matrix.runner }}
# 90 for the suite plus the ParparVM vs JDK 25 performance gate below.
timeout-minutes: 140
@@ -547,7 +460,10 @@ jobs:
# A timed-out CMake parent can leave compiler children running. Do not
# measure performance after a failed build/suite with that extra load.
# The earlier failure still fails this job and its logs are uploaded.
- if: success()
+ # Not in a capture either: that run renders goldens, and the gate's
+ # timing runs pushed the x64 capture past the job timeout, so the
+ # compare job never got its screenshots.
+ if: ${{ success() && inputs.cn1ss_capture == '' }}
# Names this pull request's overlay (perf-baseline/pr/.json) in the
# comment. A workflow_dispatch run carries no pull request, so the gate asks gh.
env:
@@ -675,9 +591,9 @@ jobs:
# using the host's glibc node.
build-run-musl:
name: build + run suite (musl, Alpine x64)
- needs: [golden-plan, prepare-suite]
+ needs: [prepare-suite]
# No golden directory of its own, so a golden capture skips it.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (inputs.cn1ss_capture == '') }}
+ if: ${{ (inputs.cn1ss_capture == '') }}
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
@@ -753,7 +669,7 @@ jobs:
# sync (mirrors the iOS/watch jobs).
compare-comment:
name: screenshot-comment
- needs: [golden-plan, build-run]
+ needs: [build-run]
# !cancelled() rather than a plain event check: without it GitHub skips this
# job whenever a build-run leg fails, and skipping it is precisely the wrong
# response to a failing suite. Normalization is what publishes the fail /
@@ -761,7 +677,7 @@ jobs:
# green report -- a failure masked as a pass. The workflow still goes red
# because build-run itself failed; this only keeps the reporting honest.
if: >-
- needs.golden-plan.outputs.run == 'true' && (
+ (
!cancelled() &&
(github.event_name == 'pull_request' || github.event_name == 'push' ||
github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
@@ -966,3 +882,2374 @@ jobs:
name: cn1ss-capture-linux
path: artifacts/cn1ss-capture
if-no-files-found: ignore
+
+ wincross-build:
+ if: ${{ inputs.cn1ss_capture == '' }} # a capture renders scripts/windows on the native x64 leg alone
+ needs: [prepare-suite]
+ name: cross-build suite exe (Linux, x64 + WebView2)
+ runs-on: ubuntu-24.04
+ timeout-minutes: 60
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v6
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ # The native BrowserComponent peer (cn1_windows_browser.cpp) is C++ that
+ # uses the MSVC STL via the xwin headers; the MSVC STL gates on a recent
+ # clang (older clang-cl trips STL1000 "Unexpected compiler version"), so
+ # pin LLVM 19 for the cross-build rather than the distro default.
+ - name: Install LLVM 19 + CMake/Ninja
+ # Capped well inside the job's 60 minutes. The inner bounds give a stalled mirror a
+ # second chance; this one guarantees that however they compound, the step cannot eat
+ # the budget the build itself needs -- which is what happened twice on 2026-08-19,
+ # each time surfacing as "Artifact not found" in a different job.
+ timeout-minutes: 20
+ run: |
+ set -e
+ # No explicit index refresh here: apt-get-install.sh does one itself, and doing it
+ # twice doubles the time a stalling mirror can take before anything is installed.
+ # No xvfb: nothing in this job opens a window. The sample build's css
+ # goal compiles theme.css headless, and the PE this job produces is
+ # run by the Windows jobs downstream, not here.
+ # Every network call here is bounded and retried. On 2026-08-19 this step sat in
+ # its first line for a full hour and was cancelled having installed nothing, which
+ # then failed the screenshot-comment job downstream for a missing artifact. That is
+ # the same hang apt-get-install.sh was written for -- a hung mirror should cost one
+ # attempt, not the job -- and this workflow had never adopted it.
+ bash scripts/ci/apt-get-install.sh cmake ninja-build unzip
+ # apt.llvm.org is a single host with no mirror, and llvm.sh both adds its repo and
+ # installs from it, so it is the likeliest thing in this step to stall forever.
+ RETRY_ATTEMPTS=3 bash scripts/ci/retry.sh \
+ wget -q --timeout=30 --tries=3 -O llvm.sh https://apt.llvm.org/llvm.sh
+ chmod +x llvm.sh
+ # Two attempts of ten minutes, not three of fifteen: the point of a bound is to
+ # leave the job enough budget to do its actual work afterwards, and 3x900s is
+ # three quarters of the runner's hour.
+ RETRY_ATTEMPTS=2 bash scripts/ci/retry.sh timeout 600 sudo ./llvm.sh 19
+ bash scripts/ci/apt-get-install.sh clang-19 lld-19 llvm-19
+ echo "/usr/lib/llvm-19/bin" >> "$GITHUB_PATH"
+ /usr/lib/llvm-19/bin/clang-cl --version
+ /usr/lib/llvm-19/bin/lld-link --version 2>&1 | head -1 || true
+ /usr/lib/llvm-19/bin/llvm-rc --version 2>&1 | head -1 || true
+
+ # JDK matrix the translator harness auto-discovers (JDK_*_HOME). JDK 8 is
+ # restored last so it is the active JAVA_HOME (it builds codename1-core and
+ # is what CompilerHelper translates with). JDK 17 builds the sample app.
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with: { distribution: 'temurin', java-version: '8' }
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
+ - name: Set up JDK 11
+ uses: actions/setup-java@v5
+ with: { distribution: 'temurin', java-version: '11' }
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - run: echo "JDK_11_HOME=$JAVA_HOME" >> $GITHUB_ENV
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with: { distribution: 'temurin', java-version: '17' }
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
+ - name: Restore JDK 8 as the active JDK
+ uses: actions/setup-java@v5
+ with: { distribution: 'temurin', java-version: '8' }
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Install xwin + lay out the Windows SDK (x64)
+ env:
+ # `cargo install xwin` and `xwin splat` flake on transient crates.io /
+ # download errors ("curl [16] HTTP2 framing layer", "[55] OpenSSL
+ # SSL_read unexpected eof"). Disable HTTP/2 multiplexing (forces
+ # HTTP/1.1, which avoids the framing errors) and let cargo retry.
+ CARGO_NET_RETRY: "10"
+ CARGO_HTTP_MULTIPLEXING: "false"
+ # --manifest-version 16 (SDK 10.0.22621): the current VS 17 manifest
+ # lists Win11SDK_10.0.26100 without the per-arch header packages xwin
+ # 0.9.0 looks for, so the default splat fails with "unable to find
+ # x86_64 headers". Every target here builds against 22621.
+ run: |
+ set -e
+ # Retry the whole install/splat a few times for non-cargo download
+ # hiccups (the xwin SDK fetch from Microsoft).
+ n=0
+ until [ "$n" -ge 3 ]; do
+ cargo install xwin --version 0.9.0 --locked \
+ && xwin --accept-license --manifest-version 16 --arch x86_64 splat --output "$RUNNER_TEMP/xwin-sdk" \
+ && break
+ n=$((n+1))
+ echo "xwin install/splat attempt $n failed; retrying after backoff..."
+ rm -rf "$RUNNER_TEMP/xwin-sdk"
+ sleep $((n*15))
+ done
+ test -d "$RUNNER_TEMP/xwin-sdk/crt/include"
+ test -f "$RUNNER_TEMP/xwin-sdk/sdk/include/um/d2d1.h"
+
+ # Fetch the WebView2 NuGet SDK on Linux (portable bash counterpart of the
+ # Windows fetch script). It is a plain zip of headers + the x64/arm64 static
+ # loader libs, so the cross-build links the BrowserComponent peer exactly
+ # like the Windows runners do. Non-fatal: if the download fails the browser
+ # natives compile as stubs (WEBVIEW2_SDK_DIR stays unset) and the suite runs
+ # without the BrowserComponent tile rather than failing the whole pipeline.
+ - name: Fetch WebView2 SDK (Linux)
+ continue-on-error: true
+ run: |
+ set -e
+ LINE="$(bash scripts/windows/fetch-webview2-sdk.sh "$RUNNER_TEMP/webview2sdk" | tail -1)"
+ echo "Resolved: $LINE"
+ case "$LINE" in
+ WEBVIEW2_SDK_DIR=*) echo "$LINE" >> "$GITHUB_ENV" ;;
+ *) echo "WebView2 fetch did not yield a dir; browser will be stubbed" ;;
+ esac
+
+ # Build codename1-core + the Windows port, the codenameone maven plugin
+ # (runs transcode-svg / css / annotation processing during the sample build)
+ # and cn1-ads-mock (a sample dependency) -- the same inputs the native
+ # Windows screenshot job installs. JDK 8: core is source/target 1.5.
+ - name: Build core + Windows port + CN1 maven plugin (JDK 8)
+ env:
+ # A build-only step: it compiles and then asserts two class files
+ # exist, so there is no test for a blanket retry to launder. Narrowed
+ # to resolution failures anyway, on the same principle the steps below
+ # apply -- this died on `Connection reset` pulling maven-plugin-api
+ # from Central, which is the canonical set's business and not this
+ # branch's.
+ RETRY_ONLY_MATCHING: transient
+ run: |
+ cd maven
+ JAVA_HOME="$JDK_8_HOME" bash ../scripts/ci/retry.sh \
+ mvn -B -pl windows -am \
+ -DskipTests '-Dmaven.javadoc.skip=true' '-Plocal-dev-javase' install
+ test -f core/target/classes/com/codename1/ui/Form.class
+ test -f windows/target/classes/com/codename1/impl/windows/WindowsImplementation.class
+
+ # The suite classes, the libraries it ships and the test server, built
+ # once by prepare-suite (they are architecture- and OS-independent).
+ - name: Download suite classes
+ uses: ./.github/actions/download-artifact-with-retry
+ with:
+ name: linux-suite-classes
+ path: .
+ - name: Unpack suite classes
+ run: tar xzf suite-classes.tgz
+ # Translate the full suite and cross-compile it to a Windows x64 PE with
+ # clang-cl + xwin. WEBVIEW2_SDK_DIR (exported above when the fetch worked)
+ # flows into the generated CMake and links the BrowserComponent peer. The
+ # exe is written to CN1_CROSS_EXE_OUT for the upload below.
+ - name: Cross-build the full suite exe (clang-cl + xwin + WebView2)
+ env:
+ CN1_XWIN_SYSROOT: ${{ runner.temp }}/xwin-sdk
+ CN1_CLANG_CL: clang-cl
+ CN1_LLVM_RC: llvm-rc
+ CN1_CROSS_EXE_OUT: ${{ github.workspace }}/artifacts/WinHelloMain.exe
+ # Narrowed to resolution failures, because this step RUNS A TEST. The wrapper
+ # retries every nonzero exit unless it is told what to look for, so a cross-build or
+ # translation failure that came and went would have passed on attempt two and taken
+ # the gate green with it -- laundering exactly the kind of intermittent product bug
+ # this job exists to catch. The unit test workflow narrows it for the same reason.
+ RETRY_ONLY_MATCHING: transient
+ run: |
+ cd vm
+ # Through the retry wrapper: this resolves plugins from Maven Central and the runner
+ # edge intermittently resets the connection mid-download, which Maven treats as a
+ # permanent resolution failure -- this run died on a truncated plexus-utils with nothing
+ # compiled yet. A real failure fails the same way on every attempt.
+ JAVA_HOME="$JDK_8_HOME" bash ../scripts/ci/retry.sh mvn -B -pl tests -am test \
+ '-Dtest=CleanTargetIntegrationTest#crossBuildsHelloSuiteExe' \
+ '-Dsurefire.failIfNoSpecifiedTests=false'
+ test -f "$CN1_CROSS_EXE_OUT"
+ ls -l "$CN1_CROSS_EXE_OUT"
+
+ - name: Upload cross-built suite exe
+ uses: actions/upload-artifact@v4
+ with:
+ name: windows-cross-suite-exe
+ # The .exe plus its separate .pdb symbol companion (for crash symbolication).
+ path: |
+ artifacts/WinHelloMain.exe
+ artifacts/WinHelloMain.pdb
+ artifacts/cn1ss-server/**
+ if-no-files-found: error
+ retention-days: 1
+
+ wincross-run:
+ name: run cross-built exe + capture (Windows x64)
+ needs: [wincross-build]
+ runs-on: windows-latest
+ timeout-minutes: 60
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+
+ # Only a JDK is needed here: with CN1_PREBUILT_EXE set the capture test
+ # neither translates nor builds -- it runs the test server the cross-build
+ # job built (CN1SS_SERVER_DIST), launches the prebuilt exe and collects the
+ # PNGs it streams. No MSVC /
+ # Ninja / clang. windows-latest ships the WebView2 Evergreen runtime the
+ # BrowserComponent peer loads at activation.
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ cache: 'maven'
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Download cross-built suite exe
+ uses: actions/download-artifact@v4
+ with:
+ name: windows-cross-suite-exe
+ path: artifacts
+
+ - name: Verify the downloaded exe
+ shell: pwsh
+ run: |
+ $exe = "artifacts/WinHelloMain.exe"
+ if (!(Test-Path $exe)) { Write-Error "cross-built exe missing: $exe"; exit 1 }
+ Write-Host "Cross-built exe: $((Get-Item $exe).Length) bytes"
+
+ # Run the Linux-cross-compiled exe and capture the screenshot suite over the
+ # cn1ss WebSocket. CN1_PREBUILT_EXE makes the capture test run this exact
+ # binary instead of building one. ~112 PNGs land in CN1_SHOT_OUTPUT_DIR.
+ - name: Run cross-built suite + capture screenshots
+ working-directory: vm
+ shell: pwsh
+ env:
+ CN1_PREBUILT_EXE: ${{ github.workspace }}\artifacts\WinHelloMain.exe
+ CN1SS_SERVER_DIST: ${{ github.workspace }}\artifacts\cn1ss-server
+ CN1_PERFORMANCE_BINARY_OUT: ${{ github.workspace }}\artifacts\windows-port\raw\benchmark-app.exe
+ CN1_REQUIRE_PERFORMANCE: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
+ CN1_SHOT_OUTPUT_DIR: ${{ github.workspace }}\artifacts\windows-port\raw
+ run: |
+ mvn -B clean package -pl JavaAPI -am -DskipTests
+ mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest#capturesHelloSuiteOverWebSocket' '-Dsurefire.failIfNoSpecifiedTests=false'
+
+ - name: Upload screenshot artifact (cross-compiled, x64)
+ if: ${{ !cancelled() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: windows-cross-screenshot-raw
+ path: artifacts/windows-port/raw
+ if-no-files-found: warn
+ retention-days: 14
+
+ # Diffs the screenshots produced by the Linux-cross-compiled binary against the
+ # in-repo baseline (scripts/windows/screenshots) and posts them to the PR, with
+ # a marker distinct from the native-Windows screenshot comment so both coexist.
+ wincross-compare-comment:
+ name: cross-compiled screenshot-comment
+ needs: [wincross-run]
+ # !cancelled(), for the same reason as linux-build-run.yml: without it GitHub
+ # skips this job whenever run-on-windows fails, so the run that most needs
+ # reporting uploads raw evidence but no port-status artifact. The nightly
+ # sweep then falls back to an older run, and while that one is still inside
+ # the freshness window the public table keeps showing it -- the current
+ # Windows failure masked by a stale pass. The workflow still goes red because
+ # run-on-windows itself failed.
+ # Not in a capture: the native x64 leg's rendering is the golden.
+ if: >-
+ inputs.cn1ss_capture == '' &&
+ (
+ !cancelled() &&
+ (github.event_name == 'pull_request' || github.event_name == 'push' ||
+ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
+ )
+ runs-on: ubuntu-24.04
+ permissions:
+ # write, because this job publishes the normalized report to the
+ # port-status-data branch itself (see the publish step below).
+ contents: write
+ # write, to dispatch website-docs.yml -- the Port Status page is static,
+ # so a published report is invisible until Hugo rebuilds.
+ actions: write
+ pull-requests: write
+ issues: write
+ env:
+ GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
+ GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Download cross-compiled screenshot artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: windows-cross-screenshot-raw
+ path: artifacts/windows-port/raw-x64
+
+ - name: Enter golden capture mode
+ uses: ./.github/actions/cn1ss-capture
+ with:
+ tests: ${{ inputs.cn1ss_capture }}
+ mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
+
+ - name: Post screenshots to PR
+ shell: bash
+ env:
+ CN1SS_COMMENT_MARKER: ''
+ CN1SS_COMMENT_LOG_PREFIX: '[windows-cross-compiled]'
+ CN1SS_PREVIEW_SUBDIR: 'windows-cross'
+ CN1SS_SUCCESS_MESSAGE: 'Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.'
+ run: |
+ set -e
+ ART="artifacts/windows-port"
+ entries=()
+ if [ -d "$ART/raw-x64" ]; then
+ for f in "$ART"/raw-x64/*.png; do
+ [ -f "$f" ] || continue
+ name=$(basename "$f" .png)
+ entries+=("$name=$f")
+ done
+ fi
+ if [ ${#entries[@]} -eq 0 ]; then
+ # A run that died before its first PNG still persists app-output.log,
+ # and that log is what normalization reads to produce the fail /
+ # not-run counts. Bailing out here left the failed capture with no
+ # port-status artifact at all, so the nightly sweep fell back to an
+ # older report and the table kept showing it. Carry on with an empty
+ # entry list when there is a log; only a run with neither has nothing
+ # to say. (Same handling as linux-build-run.yml.)
+ if [ ! -f "$ART/raw-x64/app-output.log" ]; then
+ echo "No screenshots and no app log; nothing to normalize."
+ exit 0
+ fi
+ echo "No screenshots were produced; normalizing from the app log so the failure reaches the table."
+ fi
+ echo "Posting ${#entries[@]} screenshot(s)"
+ mkdir -p "$ART/previews"
+ # Lift the SIMD benchmark tally (captured next to the PNGs) to the dir
+ # cn1ss scans for --extra-stats, so it renders in the comment.
+ cp -f "$ART"/raw-x64/windows-benchmark-stats.txt "$ART/" 2>/dev/null || true
+ source scripts/lib/cn1ss.sh
+ cn1ss_setup "$JAVA_HOME/bin/java" "$(pwd)/scripts/common/java"
+ # Gate for real: differing or missing screenshots FAIL the job (the
+ # comparison previously only posted diffs to the PR and exited green,
+ # which let 100+ render changes land unreviewed).
+ export CN1SS_FAIL_ON_MISMATCH=1
+ REF_DIR="$(pwd)/scripts/windows/screenshots"
+ # Gate like the Linux port: fail on any mismatch/error or a new
+ # screenshot with no committed golden. Previously this job only
+ # posted the comparison as a PR comment, so stale goldens sailed
+ # through green CI.
+ export CN1SS_FAIL_ON_MISMATCH=1
+ export CN1SS_ALLOWED_MISSING=0
+ export CN1SS_PORT_ID=windows-x64
+ export CN1SS_SUITE_LOG="$ART/raw-x64/app-output.log"
+ export CN1SS_BINARY_PATH="$ART/raw-x64/benchmark-app.exe"
+ if [ "${{ github.event_name }}" != "pull_request" ]; then export CN1SS_SKIP_COMMENT=1; fi
+ # Assertion-only failures count here as they do on every other producer.
+ # A test like CryptoApiTest can fail while the suite still emits its
+ # completion marker and every screenshot matches, and without this the
+ # step exited zero: the workflow stayed green and published a report
+ # containing failed tests. Linux, Android, JavaScript, iOS and Mac all
+ # set this; Windows was the one producer that did not.
+ export CN1SS_FAIL_ON_TEST_PROBLEMS=1
+ set +e
+ cn1ss_process_and_report \
+ "Native Windows port (cross-compiled)" \
+ "$ART/compare.json" "$ART/summary.txt" "$ART/comment.md" \
+ "$REF_DIR" "$ART/previews" "$ART" \
+ ${entries[@]+"${entries[@]}"}
+ gate_rc=$?
+ set -e
+ fail=0
+ if [ "$gate_rc" -ne 0 ]; then
+ echo "[windows-cross] FATAL: screenshot gate failed (rc=$gate_rc)"; fail=1
+ fi
+ if [ -f "$ART/summary.txt" ] && grep -q "^missing_expected|" "$ART/summary.txt"; then
+ me="$(grep -c "^missing_expected|" "$ART/summary.txt" || echo 0)"
+ echo "[windows-cross] FATAL: $me screenshot(s) streamed with no stored golden (missing_expected) -- add them to $REF_DIR."; fail=1
+ fi
+ if [ "$fail" -ne 0 ]; then echo "Windows cross screenshot gate failed."; exit 1; fi
+
+ - name: Upload Windows port status
+ if: ${{ !cancelled() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: port-status-windows-x64
+ path: artifacts/windows-port/port-status-windows-x64.json
+ if-no-files-found: warn
+ retention-days: 14
+
+ # Publish from here rather than waiting for port-status-publish.yml.
+ # That workflow reacts to a workflow_run "completed" event, and GitHub has
+ # never delivered one for this workflow: ports/windows-x64.json had never
+ # existed on the data branch, so the public table served the checked-in
+ # fallback for the Windows x64 column. The report is already on disk in
+ # this job, so publish it directly and depend on no event.
+ #
+ # if: ${{ !cancelled() }} for the same reason the job itself runs on failure -- a
+ # report recording real failures is the one the table most needs.
+ - name: Publish the Windows report to the data branch
+ if: >-
+ !cancelled() && github.ref == 'refs/heads/master' &&
+ (github.event_name == 'push' || github.event_name == 'schedule' ||
+ github.event_name == 'workflow_dispatch')
+ env:
+ GH_TOKEN: ${{ github.token }}
+ PORT_STATUS_PUBLISH: '1'
+ run: |
+ set -euo pipefail
+ report=artifacts/windows-port/port-status-windows-x64.json
+ if [ ! -f "$report" ]; then
+ echo "No normalized Windows report to publish." >&2
+ exit 1
+ fi
+ ./scripts/hellocodenameone/conformance/publish_port_status.sh "$report"
+ # Publishing to the data branch is only half the job. The Port Status
+ # page is STATIC -- Hugo reads the reports at build time -- and
+ # website-docs.yml is triggered by pushes to master, not by the data
+ # branch, so a report published here would sit unseen until the next
+ # daily rebuild. That is the same stale window this whole change
+ # exists to close. port-status-publish.yml dispatches the rebuild for
+ # the producers it handles; do the same for the ones that publish
+ # themselves. In the same step as the publish, so it runs only when
+ # the publish actually succeeded.
+ gh workflow run website-docs.yml --ref master -f deploy_production=true
+
+ - name: Upload golden capture
+ if: always()
+ uses: actions/upload-artifact@v7
+ with:
+ name: cn1ss-capture-windows-cross-x64
+ path: artifacts/cn1ss-capture
+ if-no-files-found: ignore
+
+ # EVERY DOCUMENTED RUNTIME CONFIGURATION MUST STILL COMPILE.
+ #
+ # ParparVM's runtime carries ~40 compile-time arms: QA instruments, and ablations
+ # that exist so a gate can prove it is able to FAIL (GcSteadyStateIntegrationTest
+ # rebuilds with -DCN1_SATB_LOG_FRESH and REQUIRES its assertions to fail). None of
+ # them is a user-facing option and none may become one.
+ #
+ # Their failure mode is silent rot, and it is not hypothetical. The first sweep of
+ # this check found FOUR arms that no longer built, one of them (CN1_NURSERY) broken
+ # for as long as the bulk SATB barrier had existed, and another
+ # (-DCN1_DISABLE_CONSERVATIVE_GC_ROOTS) the only arm in the tree that can falsify a
+ # GC rooting claim. A third, -DCN1_DISABLE_BIBOP, is what run-bibop-adaptive.sh
+ # builds as its comparison baseline, so that script could not have run either.
+ #
+ # Its own job, in parallel with vm-tests, because it shares nothing with them: it is
+ # a compile-and-link sweep, not a behaviour suite, and what each arm DOES is its own
+ # gate's business.
+ ablation-arms:
+ if: ${{ inputs.cn1ss_capture == '' }} # not a screenshot suite
+ runs-on: ubuntu-latest
+ env:
+ CN1_NATIVE_VERIFY: strict
+ timeout-minutes: 60
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Install native build tools
+ run: |
+ bash scripts/ci/apt-get-update.sh
+ sudo apt-get install -y clang
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ cache: 'maven'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
+ # -O1 rather than the release shape: this asks whether a configuration still
+ # COMPILES AND LINKS, not how well it optimises, and the arms that broke broke on
+ # undeclared identifiers and an undefined symbol -- neither needs -O3 to surface.
+ - name: Every ablation arm still builds
+ run: vm/benchmarks/check-ablation-arms.sh
+ env:
+ CN1_ABLATION_CFLAGS: -O1
+ - name: Preserve ablation failure logs
+ if: failure()
+ uses: actions/upload-artifact@v7
+ with:
+ name: ablation-failure-logs
+ path: |
+ vm/benchmarks/target/ablation/*.log
+ vm/benchmarks/target/ablation/*.run
+ if-no-files-found: warn
+
+ vm-tests:
+ if: ${{ inputs.cn1ss_capture == '' }} # not a screenshot suite
+ runs-on: ubuntu-24.04
+ env:
+ CN1_NATIVE_VERIFY: strict
+ # The full suite and serial GC benchmarks took 69 and 47 minutes in run
+ # 38355108612. Both passed, but setup plus reporting exceeded two hours.
+ # Leave reporting headroom; each GC workload retains its own timeout.
+ #
+ # The tests of the runtime library no longer run once per JDK
+ # (CompilerHelper.getBookendCompilers), which gives back some of that
+ # time; the limit stays where a slow runner still fits inside it.
+ timeout-minutes: 150
+ # The two database engines the backend speaks a wire protocol to.
+ #
+ # BackendDatabaseTest and BackendOrmTest run one body of assertions against
+ # SQLite, PostgreSQL and MySQL and require the same answers from all three --
+ # that is the whole of the claim that a handler cannot tell which engine
+ # answered it, and that one entity class is stored by any of them. SQLite
+ # needs nothing installed, so without these two services the tests ran their
+ # easiest arm and reported green: the engines with a wire protocol, a
+ # different schema syntax and a different way of generating a key are exactly
+ # the ones worth running.
+ services:
+ postgres:
+ image: postgres:16
+ env:
+ POSTGRES_USER: cn1
+ POSTGRES_PASSWORD: cn1secret
+ POSTGRES_DB: cn1
+ ports:
+ - 5432:5432
+ options: >-
+ --health-cmd "pg_isready -U cn1"
+ --health-interval 5s
+ --health-timeout 5s
+ --health-retries 20
+ mariadb:
+ # The LTS, and the version that rejects MySQL's NO PAD collation -- which
+ # is the whole reason this service is here. Its own is utf8mb4_nopad_bin,
+ # which MySQL in turn does not have.
+ image: mariadb:10.11
+ env:
+ MARIADB_ROOT_PASSWORD: cn1secret
+ MARIADB_DATABASE: cn1
+ MARIADB_USER: cn1
+ MARIADB_PASSWORD: cn1secret
+ ports:
+ - 3307:3306
+ options: >-
+ --health-cmd "healthcheck.sh --connect --innodb_initialized"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 20
+
+ mysql:
+ # 8.0 rather than 8, because 8.4 no longer LOADS mysql_native_password
+ # and a service container cannot be given server flags to turn it back
+ # on: GitHub's `services` supports image, env, ports and options, and
+ # none of those appends a command. See the step below for why the plugin
+ # has to be reachable at all.
+ image: mysql:8.0
+ env:
+ MYSQL_ROOT_PASSWORD: cn1secret
+ MYSQL_USER: cn1
+ MYSQL_PASSWORD: cn1secret
+ MYSQL_DATABASE: cn1
+ ports:
+ - 3306:3306
+ options: >-
+ --health-cmd "mysqladmin ping -h 127.0.0.1 -ucn1 -pcn1secret"
+ --health-interval 5s
+ --health-timeout 5s
+ --health-retries 30
+
+ sqlserver:
+ # 2017, the oldest release the backend supports; the samples' jobs run
+ # 2022. The image creates no database of its own, so the tests use
+ # master.
+ image: mcr.microsoft.com/mssql/server:2017-latest
+ env:
+ ACCEPT_EULA: 'Y'
+ MSSQL_SA_PASSWORD: Cn1-Secret-9x
+ ports:
+ - 1433:1433
+ options: >-
+ --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Cn1-Secret-9x -Q 'SELECT 1'"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 30
+
+ oracle:
+ # Oracle Free. 19c, the oldest release supported, is not pullable
+ # without an Oracle account.
+ image: gvenzl/oracle-free:23-slim
+ env:
+ ORACLE_PASSWORD: cn1secret
+ APP_USER: cn1
+ APP_USER_PASSWORD: cn1secret
+ ports:
+ - 1521:1521
+ options: >-
+ --health-cmd healthcheck.sh
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 40
+ # Oracle XE 21, the newest release WITHOUT 23ai's relaxations: SELECT
+ # with no FROM, BOOLEAN, IF [NOT] EXISTS. A statement that needs one of
+ # them passes on Free and fails here, as it would on 19c.
+ oracle21:
+ image: gvenzl/oracle-xe:21-slim
+ env:
+ ORACLE_PASSWORD: cn1secret
+ APP_USER: cn1
+ APP_USER_PASSWORD: cn1secret
+ ports:
+ - 1522:1521
+ options: >-
+ --health-cmd healthcheck.sh
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 60
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v6
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ # Migrations serialise on DBMS_LOCK, which an ordinary user may not call.
+ - name: Let the Oracle test user take migration locks
+ run: |
+ docker exec -i "${{ job.services.oracle.id }}" sqlplus -s -L sys/cn1secret@FREEPDB1 as sysdba <<'SQL'
+ WHENEVER SQLERROR EXIT FAILURE
+ GRANT EXECUTE ON SYS.DBMS_LOCK TO cn1;
+ SQL
+ docker exec -i "${{ job.services.oracle21.id }}" sqlplus -s -L sys/cn1secret@XEPDB1 as sysdba <<'SQL'
+ WHENEVER SQLERROR EXIT FAILURE
+ GRANT EXECUTE ON SYS.DBMS_LOCK TO cn1;
+ SQL
+
+ # TDS 8.0 on the native runtime: TLS first, ALPN tds/8.0. A step, not a
+ # service, because the server needs a certificate generated first.
+ - name: Start SQL Server 2025 for sslmode=strict
+ run: |
+ URL=$(bash scripts/ci/start-sqlserver-strict.sh "$RUNNER_TEMP/sqlstrict")
+ echo "CN1_DBCHECK_SQLSERVER_STRICT=$URL" >> "$GITHUB_ENV"
+
+ # The backend's MySQL client REFUSES to complete caching_sha2_password's
+ # full exchange on an unencrypted connection, because that exchange sends
+ # the password itself. That refusal is the client behaving correctly, and
+ # it means a freshly created service container -- whose password cache is
+ # empty -- cannot be reached over plaintext loopback at all: the first
+ # connection is exactly the one with nothing cached.
+ #
+ # The alternative to this step is TLS, and the container's auto-generated
+ # certificate chains to nothing and carries no name the client could
+ # verify, so `sslmode=require` fails for a different reason. Native
+ # password authentication is what CI can actually offer, and the code path
+ # under test -- the wire protocol, the schema, the generated keys -- is the
+ # same either way.
+ - name: Let the MySQL service authenticate our client
+ run: |
+ docker exec ${{ job.services.mysql.id }} mysql -uroot -pcn1secret -e \
+ "ALTER USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'cn1secret'; \
+ FLUSH PRIVILEGES;"
+
+ - name: Install native build tools
+ run: |
+ bash scripts/ci/apt-get-update.sh
+ # clang alone is not enough to LINK a backend binary. vm/backend's
+ # build.sh links -lcurl -lssl -lcrypto -lnghttp2 (outbound TLS is
+ # libcurl's, the auth primitives are OpenSSL's, the HTTP/2 framing is
+ # nghttp2's) and needs their headers to compile the natives that call
+ # them. Without these, every test that builds a server binary --
+ # BackendDatabaseTest, BackendOrmTest, BackendRuntimeSelfTest --
+ # compiled, failed at the link, and SKIPPED, which this job reported
+ # as green for as long as it has existed.
+ sudo apt-get install -y clang libcurl4-openssl-dev libssl-dev libnghttp2-dev
+
+ # Install JDKs and export their paths
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ cache: 'maven'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 11 Path
+ run: echo "JDK_11_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '21'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 21 Path
+ run: echo "JDK_21_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ - name: Set up JDK 25
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '25'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 25 Path
+ run: echo "JDK_25_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ # Restore JDK 8 as the main runner (cache is on the first setup-java JDK 8 above)
+ - name: Restore JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Set up Node
+ uses: actions/setup-node@v6
+ with:
+ node-version: '20'
+
+ # WITHOUT THIS EVERY BACKEND TEST SKIPS. generate-contract.sh compiles the
+ # shared @RestClient/@Entity contract against codenameone-core and runs the
+ # Codename One maven plugin over it, so both have to be in the local repo
+ # the backend scripts use -- and this job never built the maven modules, so
+ # they never were. BackendDatabaseTest, BackendOrmTest,
+ # BackendRuntimeSelfTest and BackendJavaSeRuntimeTest all reported
+ # "codenameone-core:8.0-SNAPSHOT is not in .m2-repo" and skipped, which is
+ # why CN1_BACKEND_REQUIRED below found four of them at once: the PostgreSQL
+ # and MySQL services this job stands up were serving nobody.
+ #
+ # -Plocal-dev-javase and the repo-local .m2-repo are what the scripts
+ # expect; the path is $GITHUB_WORKSPACE/.m2-repo because that is where
+ # generate-contract.sh looks (CN1_M2 overrides it, and nothing sets one).
+ #
+ # The static-analysis gates are OFF here on purpose. This step exists to
+ # put jars in a repo, and -am drags in every port because the maven plugin
+ # depends on them -- so with them on, a SpotBugs finding in the Android
+ # port fails THIS workflow, where nobody would look for it and where it
+ # says nothing about ParparVM. pr.yml owns those gates and runs them over
+ # the same modules.
+ - name: Install core + maven plugin for the backend contract
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+
+ - name: Run ParparVM JVM tests
+ working-directory: vm
+ # Maven Central intermittently serves 403/429 from the runner CDN edge
+ # and Maven treats it as a permanent resolution failure (killed this job
+ # at dependency download, before any test ran). See scripts/ci/retry.sh.
+ #
+ # Narrowed with RETRY_ONLY_MATCHING because the second command RUNS THE
+ # TESTS: without it the wrapper retries every nonzero exit, so a test that
+ # failed once and passed on the retry would take this gate green and hide
+ # the race that produced it. The Windows counterpart restricts it for the
+ # same reason.
+ run: |
+ retry() { bash ../scripts/ci/retry.sh "$@"; }
+ retry mvn -B clean package -pl JavaAPI -am -DskipTests
+ retry mvn -B test -pl tests -am -DexcludedGroups=benchmark
+ env:
+ RETRY_ONLY_MATCHING: transient
+ # BackendHttpIntegrationTest runs the backend with io_uring, and twice
+ # with it refused by seccomp. This makes the first copy FAIL unless it
+ # really got the ring: without it, a runner image that turned io_uring
+ # off would test the thread pool three times and stay green.
+ CN1_REQUIRE_IO_URING: '1'
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ JDK_11_HOME: ${{ env.JDK_11_HOME }}
+ JDK_17_HOME: ${{ env.JDK_17_HOME }}
+ JDK_21_HOME: ${{ env.JDK_21_HOME }}
+ JDK_25_HOME: ${{ env.JDK_25_HOME }}
+ # The services above. sslmode=disable because these are loopback
+ # containers with no certificate: the default, prefer, would attempt
+ # TLS and fail verification rather than quietly downgrading, which is
+ # the behaviour the database layer is supposed to have.
+ CN1_DBCHECK_POSTGRES: postgres://cn1:cn1secret@127.0.0.1:5432/cn1?sslmode=disable
+ CN1_DBCHECK_MYSQL: mysql://cn1:cn1secret@127.0.0.1:3306/cn1?sslmode=disable
+ # MARIADB REACHED THROUGH A mysql:// URL, deliberately: the dialect is
+ # chosen from the server's handshake banner rather than from the
+ # scheme, and this is the case that proves it. The two families have
+ # no case-sensitive NO PAD collation in common, so picking the wrong
+ # one is an unknown-collation error on every CREATE TABLE.
+ CN1_DBCHECK_MARIADB: mysql://cn1:cn1secret@127.0.0.1:3307/cn1?sslmode=disable
+ CN1_DBCHECK_SQLSERVER: sqlserver://sa:Cn1-Secret-9x@127.0.0.1:1433/master?sslmode=disable
+ CN1_DBCHECK_ORACLE: oracle://cn1:cn1secret@127.0.0.1:1521/FREEPDB1?sslmode=disable
+ CN1_DBCHECK_ORACLE21: oracle://cn1:cn1secret@127.0.0.1:1522/XEPDB1?sslmode=disable
+ # WITHOUT THIS THE BACKEND TESTS CAN SKIP AND THE JOB STAYS GREEN.
+ # BackendTestSupport.skipOrFail turns a backend build failure into a
+ # JUnit assumption abort, because a developer machine with no C
+ # toolchain must not fail the suite -- and a missing link library in CI
+ # looks exactly the same from inside the test. This is the only job
+ # that runs the whole tests module, so it is the one place that has to
+ # say the backend is expected to build here: a compile, link or
+ # toolchain regression fails the workflow rather than quietly
+ # subtracting BackendDatabaseTest, BackendOrmTest and the rest from it.
+ CN1_BACKEND_REQUIRED: 1
+ # BackendWebSocketIntegrationTest translates scripts/hellocodenameone/backend
+ # through server.sh, which would otherwise re-install the backend runtime
+ # the step above just installed from this same checkout.
+ CN1SS_BACKEND_SKIP_INSTALL: 1
+
+ # The SQLAlchemy conformance programs against the PostgreSQL service
+ # above: the suite in python-transpiler runs them on SQLite only, so this
+ # is the one place the postgresql dialect and the _cn1db bridge meet a
+ # real server. PostgreSQL and the job's MySQL service; MariaDB is run by
+ # hand. Last of the steps using MySQL: each program drops and recreates
+ # the cn1 database.
+ # python-runtime compiles at release 17, hence JDK 17 for the install.
+ - name: Python SQLAlchemy on PostgreSQL and MySQL
+ run: |
+ (cd maven && bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl python-runtime,python-transpiler \
+ install -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo")
+ # The test transpiles against JavaAPI from the same repository, and
+ # the step that installs it for the native samples runs after this.
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -f vm/pom.xml -pl JavaAPI install -DskipTests \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ bash scripts/python-backend/sqlalchemy-realdb-test.sh "$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JAVA17_HOME: ${{ env.JDK_17_HOME }}
+ CN1_SQLA_POSTGRES: postgres://cn1:cn1secret@127.0.0.1:5432/cn1?sslmode=disable
+ CN1_SQLA_MYSQL: mysql://cn1:cn1secret@127.0.0.1:3306/cn1?sslmode=disable
+
+ - name: Run ParparVM Benchmark
+ working-directory: vm
+ # Each benchmark already creates its own mutator/collector threads. Run
+ # classes serially: competing benchmarks change GC sizing and timings as
+ # they start and finish, invalidating comparisons within a measured run.
+ run: bash $GITHUB_WORKSPACE/scripts/ci/retry.sh mvn -B test -pl tests -am -Dgroups=benchmark -Dparparvm.test.forkCount=1 -Djacoco.skip=true
+ env:
+ # Narrowed because this step RUNS TESTS: retry.sh retries every nonzero exit
+ # without it, so a test that failed once and passed on a later attempt would take
+ # this gate green and hide the race that produced it. The wrapper's own docs
+ # require this filter for test-running commands.
+ RETRY_ONLY_MATCHING: transient
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ JDK_11_HOME: ${{ env.JDK_11_HOME }}
+ JDK_17_HOME: ${{ env.JDK_17_HOME }}
+ JDK_21_HOME: ${{ env.JDK_21_HOME }}
+ JDK_25_HOME: ${{ env.JDK_25_HOME }}
+
+ - name: Publish ByteCodeTranslator quality previews
+ if: ${{ !cancelled() && github.server_url == 'https://github.com' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
+ id: publish-bytecode-quality-previews
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ SERVER_URL: ${{ github.server_url }}
+ REPOSITORY: ${{ github.repository }}
+ RUN_ID: ${{ github.run_id }}
+ RUN_ATTEMPT: ${{ github.run_attempt }}
+ run: |
+ set -euo pipefail
+ if [ "${SERVER_URL}" != "https://github.com" ]; then
+ echo "HTML previews are only published for github.com instances."
+ exit 0
+ fi
+
+ coverage_dir="vm/tests/target/site/jacoco"
+ if [ ! -f "${coverage_dir}/index.html" ]; then
+ echo "No HTML outputs detected; skipping preview publishing."
+ exit 0
+ fi
+
+ # Its own branch: pr.yml force-pushes quality-report-previews in the same ci.yml
+ # run, and a force-push replaces the whole branch.
+ run_dir="runs/${RUN_ID}-${RUN_ATTEMPT}-parparvm"
+ tmp_dir=$(mktemp -d)
+ dest_dir="${tmp_dir}/${run_dir}/coverage"
+ mkdir -p "${dest_dir}"
+ cp -R "${coverage_dir}/." "${dest_dir}/"
+
+ printf '%s\n%s\n%s\n' \
+ '# Quality report previews' \
+ '' \
+ 'This branch is automatically managed by the PR CI workflow and may be force-pushed.' \
+ > "${tmp_dir}/README.md"
+
+ git -C "${tmp_dir}" init -b previews >/dev/null
+ git -C "${tmp_dir}" config user.name "github-actions[bot]"
+ git -C "${tmp_dir}" config user.email "github-actions[bot]@users.noreply.github.com"
+ git -C "${tmp_dir}" add .
+ git -C "${tmp_dir}" commit -m "Publish quality report previews for run ${RUN_ID} (attempt ${RUN_ATTEMPT})" >/dev/null
+
+ remote_url="${SERVER_URL}/${REPOSITORY}.git"
+ token_remote_url="${remote_url/https:\/\//https://x-access-token:${GITHUB_TOKEN}@}"
+ for push_attempt in 1 2 3 4 5; do
+ if git -C "${tmp_dir}" push --force "${token_remote_url}" previews:quality-report-previews-parparvm >/dev/null; then
+ break
+ fi
+ if [ "${push_attempt}" -eq 5 ]; then
+ echo "Failed to publish quality report previews after ${push_attempt} attempts." >&2
+ exit 1
+ fi
+ sleep $((push_attempt * 3))
+ done
+
+ commit_sha=$(git -C "${tmp_dir}" rev-parse HEAD)
+ raw_base="https://raw.githubusercontent.com/${REPOSITORY}/${commit_sha}/${run_dir}"
+ preview_base="https://htmlpreview.github.io/?${raw_base}"
+ echo "jacoco_url=${preview_base}/coverage/index.html" >> "$GITHUB_OUTPUT"
+
+ - name: Generate ByteCodeTranslator quality report
+ if: ${{ !cancelled() }}
+ env:
+ QUALITY_REPORT_TARGET_DIRS: vm/tests/target
+ QUALITY_REPORT_SERVER_URL: ${{ github.server_url }}
+ QUALITY_REPORT_REPOSITORY: ${{ github.repository }}
+ QUALITY_REPORT_REF: ${{ github.event.pull_request.head.sha || github.sha }}
+ QUALITY_REPORT_TITLE: "✅ ByteCodeTranslator Quality Report"
+ JACOCO_HTML_URL: ${{ steps.publish-bytecode-quality-previews.outputs.jacoco_url }}
+ run: python3 .github/scripts/generate-quality-report.py
+
+ - name: Publish ByteCodeTranslator quality comment
+ if: ${{ github.event_name == 'pull_request' }}
+ uses: actions/github-script@v9
+ with:
+ # Retried rather than fatal on a transient 5xx. The publisher
+ # already warns instead of throwing; this is the cheaper half of
+ # the same fix, so the comment usually still lands. 4xx codes the
+ # action treats as permanent are not retried.
+ retries: 3
+ script: |
+ const { publishQualityComment } = require('./.github/scripts/publish-quality-comment.js');
+ await publishQualityComment({
+ github,
+ context,
+ core,
+ marker: '',
+ reportPath: 'quality-report.md',
+ });
+
+ # The websocket frame parser, against the Autobahn|Testsuite.
+ #
+ # Its own job rather than a step inside vm-tests: that job already carries three
+ # database service containers and a long budget, and a conformance failure
+ # deserves its own red check instead of being buried behind a MySQL health
+ # probe. Ubuntu because `--network host` means the host's network stack here,
+ # which is what lets the container reach a server on 127.0.0.1.
+ #
+ # ~300 cases, almost all of them frames no conformant client would send. The
+ # gate in vm/backend/conformance/check-autobahn.py has no per-case tolerance:
+ # every case must be strictly green, NON-STRICT included, and the set that ran
+ # has to match the committed manifest so the suite cannot quietly shrink to the
+ # cases it happens to pass.
+ backend-compiled-tests:
+ if: ${{ inputs.cn1ss_capture == '' }} # not a screenshot suite
+ # The backend test framework's two runners over one test source: surefire on
+ # the JVM, then the same classes translated by ParparVM into a native test
+ # binary (cn1:backend-test), the way an application's own tests run when it
+ # asks for -Dcn1.backend.compiledTests=true. The project is the CI test server,
+ # scripts/hellocodenameone/backend, so these are also its self-checks.
+ #
+ # The compiled leg leaves out the Mockito-based test classes on its own; the
+ # report check at the end is what proves the binary actually ran tests, since
+ # a goal that skipped would otherwise leave this job green.
+ runs-on: ubuntu-24.04
+ env:
+ CN1_NATIVE_VERIFY: strict
+ timeout-minutes: 60
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Install native build tools
+ run: |
+ bash scripts/ci/apt-get-update.sh
+ sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
+
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ cache: 'maven'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ # Gates off for the reason the vm-tests install step gives.
+ - name: Install the backend runtime, its test support and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl backend,backend-test,codenameone-maven-plugin \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+
+ - name: Run the backend tests on the JVM and compiled
+ working-directory: scripts/hellocodenameone
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+
+ - name: Check that both runners reported
+ working-directory: scripts/hellocodenameone/backend/target/surefire-reports
+ run: |
+ jvm=$(ls TEST-*.xml | grep -vc -- '-compiled.xml' || true)
+ compiled=$(ls TEST-*-compiled.xml 2>/dev/null | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+
+ - name: Upload the test reports
+ if: ${{ !cancelled() }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: backend-compiled-tests
+ path: scripts/hellocodenameone/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+
+ python-backend-native:
+ if: ${{ inputs.cn1ss_capture == '' }} # not a screenshot suite
+ # The Flask and FastAPI samples built NATIVELY (ParparVM, clang) and
+ # driven over sockets by the same client as the JVM run. The only place
+ # Python handlers run on the backend's virtual threads, so the only run
+ # of the GIL's scheduler path. A job of its own: it takes most of an
+ # hour, and vm-tests already fills its limit without it.
+ runs-on: ubuntu-24.04
+ env:
+ CN1_NATIVE_VERIFY: strict
+ timeout-minutes: 90
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Install native build tools
+ run: |
+ bash scripts/ci/apt-get-update.sh
+ sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
+
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ cache: 'maven'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
+
+ # Gates off for the reason the vm-tests install step gives.
+ - name: Install core, the backend and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+
+ # python-runtime compiles at release 17, hence JDK 17 for the install.
+ - name: Install the Python transpiler and runtime, and JavaAPI
+ run: |
+ (cd maven && bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl python-runtime,python-transpiler \
+ install -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo")
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -f vm/pom.xml -pl JavaAPI install -DskipTests \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+
+ - name: Python backend end to end, native
+ run: bash scripts/python-backend/e2e-test.sh --native "$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ JAVA17_HOME: ${{ env.JDK_17_HOME }}
+
+ backend-websocket-conformance:
+ if: ${{ inputs.cn1ss_capture == '' }} # not a screenshot suite
+ name: WebSocket conformance (Autobahn)
+ runs-on: ubuntu-24.04
+ env:
+ CN1_NATIVE_VERIFY: strict
+ timeout-minutes: 45
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Cache the Autobahn image
+ id: autobahn-cache
+ uses: actions/cache@v5
+ with:
+ path: ${{ runner.temp }}/autobahn-image.tar
+ key: autobahn-testsuite-image-v1
+
+ - name: Load or pull the Autobahn image
+ run: |
+ if [ -f "${{ runner.temp }}/autobahn-image.tar" ]; then
+ docker load -i "${{ runner.temp }}/autobahn-image.tar"
+ else
+ docker pull crossbario/autobahn-testsuite
+ docker save crossbario/autobahn-testsuite \
+ -o "${{ runner.temp }}/autobahn-image.tar"
+ fi
+
+ - name: Run the Autobahn fuzzing client
+ env:
+ CN1_BACKEND_JAVA: ${{ env.JAVA_HOME }}
+ run: vm/backend/ws-conformance.sh --arm javase
+
+ - name: Upload the Autobahn report
+ if: ${{ !cancelled() }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: autobahn-report
+ path: vm/backend/target/autobahn/**
+ if-no-files-found: warn
+ retention-days: 14
+
+ release-jars:
+ if: ${{ (github.event_name == 'release' && github.event.action == 'published') }}
+ runs-on: ubuntu-24.04
+ env:
+ CN1_NATIVE_VERIFY: strict
+ timeout-minutes: 45
+ permissions:
+ contents: write
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v6
+
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ cache: 'maven'
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Build release jars
+ # This job runs once per published release, so a transient Maven Central
+ # 403/429 here silently ships a release without its ParparVM jars (that
+ # is what happened to 7.0.264). Retry, as the vm-tests job already does.
+ run: |
+ bash scripts/ci/retry.sh mvn -B -f vm/JavaAPI/pom.xml package
+ bash scripts/ci/retry.sh mvn -B -f vm/ByteCodeTranslator/pom.xml package
+
+ - name: Verify release jars
+ run: |
+ test -f vm/JavaAPI/target/JavaAPI-1.0-SNAPSHOT.jar
+ test -f vm/ByteCodeTranslator/target/ByteCodeTranslator-1.0-SNAPSHOT.jar
+
+ - name: Attach JavaAPI and ByteCodeTranslator jars to release
+ uses: softprops/action-gh-release@v1
+ with:
+ files: |
+ vm/JavaAPI/target/JavaAPI-1.0-SNAPSHOT.jar
+ vm/ByteCodeTranslator/target/ByteCodeTranslator-1.0-SNAPSHOT.jar
+
+ vm-tests-windows:
+ # Not a screenshot suite: a golden capture skips it.
+ if: ${{ inputs.cn1ss_capture == '' && github.event_name != 'release' }}
+ name: clean-target (${{ matrix.name }})
+ runs-on: ${{ matrix.runner }}
+ env:
+ CN1_NATIVE_VERIFY: strict
+ CFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ CXXFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ timeout-minutes: 45
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - name: x64
+ runner: windows-latest
+ msvc_arch: amd64
+ - name: arm64
+ runner: windows-11-arm
+ msvc_arch: arm64
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v6
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ # clang-cl uses the MSVC headers, CRT and linker, so the MSVC developer
+ # environment has to be on PATH for the spawned cmake/clang-cl to work.
+ # The arch is matched to the runner so the arm64 leg builds native arm64.
+ - name: Set up MSVC environment
+ uses: ilammy/msvc-dev-cmd@v1
+ with:
+ arch: ${{ matrix.msvc_arch }}
+
+ - name: Set up Ninja
+ shell: pwsh
+ run: |
+ # Install Ninja from PyPI wheels rather than the gha-setup-ninja action,
+ # whose GitHub-release download intermittently arrives corrupted ("No END
+ # header found") and fails the toolchain setup. pip wheels exist for both
+ # win_amd64 and win_arm64; retry to absorb transient network blips. The
+ # console script lands on PATH (the runner's Python Scripts dir).
+ $ok = $false
+ for ($i = 1; $i -le 3; $i++) {
+ python -m pip install --upgrade ninja
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ Write-Host "ninja install attempt $i failed; retrying..."
+ Start-Sleep -Seconds 5
+ }
+ if (-not $ok) { throw "Failed to install Ninja after 3 attempts" }
+ ninja --version
+
+ # The runner image's MSVC STL (14.52) static_asserts "expected Clang 22
+ # or newer" (STL1000) while the image's own LLVM is 20, which failed every
+ # C++ unit of the native suite (cn1_windows_browser.cpp first) on x64.
+ # The image pairs the two, not us, so take Microsoft's documented escape
+ # hatch for that check; CMake seeds CMAKE_CXX_FLAGS from CXXFLAGS in the
+ # configure the tests spawn. Drop it once the image's clang catches up.
+ - name: Allow the image's clang with its newer STL
+ shell: pwsh
+ run: |
+ "CXXFLAGS=/D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
+
+ - name: Verify LLVM / Ninja toolchain
+ shell: pwsh
+ run: |
+ clang-cl --version
+ ninja --version
+ cmake --version
+
+ # Install JDKs and export their paths (CompilerHelper reads JDK_*_HOME and
+ # also auto-discovers any others). Temurin does not publish Windows/aarch64
+ # builds for JDK 8/11, so those legs are x64-only; 17/21/25 run on both
+ # architectures, which still exercises every JavaAPI bytecode level the
+ # clean target supports.
+ - name: Set up JDK 8
+ if: ${{ matrix.name == 'x64' }}
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ cache: 'maven'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ if: ${{ matrix.name == 'x64' }}
+ shell: pwsh
+ run: echo "JDK_8_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
+
+ - name: Set up JDK 11
+ if: ${{ matrix.name == 'x64' }}
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 11 Path
+ if: ${{ matrix.name == 'x64' }}
+ shell: pwsh
+ run: echo "JDK_11_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
+
+ # Temurin publishes Windows/aarch64 only from JDK 21, so on arm64 the only
+ # JDK set up is 21; x64 covers 8/11/17/21/25. The translator test harness
+ # adapts to whatever JDKs are present.
+ - name: Set up JDK 17
+ if: ${{ matrix.name == 'x64' }}
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ if: ${{ matrix.name == 'x64' }}
+ shell: pwsh
+ run: echo "JDK_17_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '21'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 21 Path
+ shell: pwsh
+ run: echo "JDK_21_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
+
+ - name: Set up JDK 25
+ if: ${{ matrix.name == 'x64' }}
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '25'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 25 Path
+ if: ${{ matrix.name == 'x64' }}
+ shell: pwsh
+ run: echo "JDK_25_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
+
+ # Restore the active runner JDK that drives Maven: JDK 8 on x64 (matching
+ # the cache above), and JDK 21 on arm64 where 8/11/17 are unavailable.
+ - name: Restore JDK 8 (x64)
+ if: ${{ matrix.name == 'x64' }}
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ - name: Restore JDK 21 (arm64)
+ if: ${{ matrix.name == 'arm64' }}
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '21'
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ # Only the native-compilation tests are run here: this runner exists to
+ # prove the translated C compiles with clang-cl (LLVM) and executes on
+ # Windows, which is exactly what CleanTargetIntegrationTest does (translate
+ # Java -> C -> cmake/clang-cl build -> run the binary), including the
+ # "windows" app-type case that links the Direct2D/DirectWrite/Win32 stack.
+ # The rest of the vm suite is platform-agnostic Java already covered by
+ # parparvm-tests.yml on Linux, and the JavaScript integration tests
+ # additionally require Node.
+ - name: Run ParparVM clean-target build on Windows (clang-cl)
+ working-directory: vm
+ shell: pwsh
+ run: |
+ # Retried, in the same spirit as the Ninja install above: Maven Central
+ # answers 429 Too Many Requests under load and the build dies during
+ # dependency RESOLUTION, before a line of this project is compiled. Nothing
+ # about the failure involves the code under test, and a fresh runner IP is
+ # not something a re-run can be relied on to produce. Backoff is in tens of
+ # seconds rather than the 5 used for the pip blip, because a rate limit needs
+ # waiting out rather than retrying through.
+ # Written in the same plain loop shape as the Ninja install above rather
+ # than with a function and splatting, because that shape is already proven
+ # on these runners and this is not the place to find out about a quoting
+ # difference.
+ # Five attempts out to five minutes rather than three out to ninety seconds: a run
+ # that took all three still ended on "status code: 429, reason phrase: Too Many
+ # Requests" two minutes after it started, which is a rate limit that had not lifted
+ # yet rather than a blip. This step only downloads and builds, so waiting longer costs
+ # time and cannot turn a failing test green.
+ $ok = $false
+ foreach ($delay in 0, 30, 90, 180, 300) {
+ # Maven records a download that failed as a *.lastUpdated marker and then
+ # answers later resolutions from it instead of the network -- the "(absent)"
+ # in "Could not transfer artifact ... (absent)". Left in place, every retry
+ # below replays the first 403 offline and cannot succeed: one Central refusal
+ # of org.junit:junit-bom took all five attempts and the job. And because
+ # setup-java's cache: 'maven' restores ~/.m2 between runs, a marker can also
+ # arrive from an earlier run, so this clears them before EVERY attempt, not
+ # just the retries. A marker records only a failure, never an artifact, so
+ # deleting one costs at most a repeated question to Central.
+ Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
+ Remove-Item -Force -ErrorAction SilentlyContinue
+ if ($delay -gt 0) {
+ Write-Host "mvn failed; retrying in $delay s..."
+ Start-Sleep -Seconds $delay
+ }
+ mvn -B clean package -pl JavaAPI -am -DskipTests
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ }
+ if (-not $ok) { throw "mvn clean package failed after all retries" }
+ # This one RUNS TESTS, so the retry is restricted to the failure shape it
+ # exists for. A blanket loop lets an intermittent product regression pass on
+ # attempt two and turns a blocking gate green -- which is the opposite of what
+ # a gate is for, and worse than the flake it was hiding.
+ $resolutionFailure = 'status: (403|429|50[0-9])|Could not transfer artifact|Failed to read artifact descriptor|Unresolveable build extension|Non-resolvable import POM|Could not resolve dependencies|UnknownHostException|Could not resolve host|Temporary failure in name resolution'
+ $ok = $false
+ foreach ($delay in 0, 30, 90, 180, 300) {
+ # Clear Maven's cached resolution failures first; see the first retry loop above.
+ Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
+ Remove-Item -Force -ErrorAction SilentlyContinue
+ if ($delay -gt 0) {
+ Write-Host "mvn failed on a dependency-resolution error; retrying in $delay s..."
+ Start-Sleep -Seconds $delay
+ }
+ # Single-quote the -D args: PowerShell otherwise mangles the dotted
+ # property name (splitting it at the '.').
+ # Tee-Object keeps the log on the console AND gives us something to match.
+ # GcForeignThreadIntegrationTest runs here because Windows is where most of what it
+ # guards lives: no stop signal and no cross-thread stack bounds, so without the
+ # suspend fallback every sweep was skipped. No other Windows job reaches it.
+ mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest,GcForeignThreadIntegrationTest' '-Dsurefire.failIfNoSpecifiedTests=false' 2>&1 |
+ Tee-Object -Variable mvnOutput
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ if (-not ($mvnOutput -match $resolutionFailure)) {
+ throw "mvn test failed for a reason that is not a transient dependency-resolution error; not retrying"
+ }
+ }
+ if (-not $ok) { throw "mvn test failed after all retries" }
+ env:
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ JDK_11_HOME: ${{ env.JDK_11_HOME }}
+ JDK_17_HOME: ${{ env.JDK_17_HOME }}
+ JDK_21_HOME: ${{ env.JDK_21_HOME }}
+ JDK_25_HOME: ${{ env.JDK_25_HOME }}
+
+ # Renders the native Windows port's UI headlessly and captures a PNG. This is
+ # the GUI/screenshot signal for the port (the "softer" signal in the plan): it
+ # builds codename1-core + the Windows port, translates a real Display/Form app
+ # with the "windows" app type, links it with clang-cl, and runs it in headless
+ # mode -- the app paints into an offscreen Direct2D/WIC bitmap (no window) and
+ # writes a PNG. The PNG is uploaded as an artifact; the companion comment job
+ # posts it to the PR. This x64 leg also publishes the compiled core + port
+ # bytecode for the native arm64 leg (windows-port-screenshot-arm64). Pull
+ # requests render review artifacts; master runs also produce the durable
+ # Windows ARM64 compliance report consumed by the static Port Status page.
+ # Separate from the clean-target gate so rendering failures are reported as
+ # their own blocking check with dedicated diagnostics.
+ windows-port-screenshot:
+ needs: [prepare-suite]
+ name: screenshot-capture (x64)
+ if: ${{ (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
+ runs-on: windows-latest
+ env:
+ CN1_NATIVE_VERIFY: strict
+ CFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ CXXFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ # 90 for the suite plus the ParparVM vs JDK 25 performance gate.
+ timeout-minutes: 140
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Set up MSVC environment
+ uses: ilammy/msvc-dev-cmd@v1
+ with:
+ arch: amd64
+
+ - name: Set up Ninja
+ shell: pwsh
+ run: |
+ # Install Ninja from PyPI wheels rather than the gha-setup-ninja action,
+ # whose GitHub-release download intermittently arrives corrupted ("No END
+ # header found") and fails the toolchain setup. pip wheels exist for both
+ # win_amd64 and win_arm64; retry to absorb transient network blips. The
+ # console script lands on PATH (the runner's Python Scripts dir).
+ $ok = $false
+ for ($i = 1; $i -le 3; $i++) {
+ python -m pip install --upgrade ninja
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ Write-Host "ninja install attempt $i failed; retrying..."
+ Start-Sleep -Seconds 5
+ }
+ if (-not $ok) { throw "Failed to install Ninja after 3 attempts" }
+ ninja --version
+
+ # JDK 17 compiles the hellocodenameone-common Java (release 17). Set up first
+ # so the JDK 8 below ends up the active JAVA_HOME.
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 path
+ shell: pwsh
+ run: echo "JDK_17_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
+
+ # JDK 8 builds codename1-core (source/target 1.5), runs the Kotlin 1.6.0
+ # compiler (it aborts on JDK 17+), and is the JDK the translator harness uses
+ # (CompilerHelper auto-discovers JDK_8_HOME). Set up last so it stays active.
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '8'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 path
+ shell: pwsh
+ run: echo "JDK_8_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
+
+ # The Maven repository, restored from the NEAREST earlier run rather than an
+ # exact match. setup-java's cache: 'maven' keys on the hash of every pom.xml
+ # and restores nothing on a miss, so any change to a pom started this job
+ # from an empty repository -- and Central rate-limits Windows runners hard:
+ # one such run got 429 Too Many Requests on junit-bom through all five
+ # attempts of the retry loop below, over ten minutes, before building
+ # anything. A near match already holds almost every artifact, so the few new
+ # ones are all that has to come from Central.
+ - name: Maven repository cache
+ uses: actions/cache@v4
+ with:
+ path: ~/.m2/repository
+ key: maven-${{ runner.os }}-screenshot-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
+ restore-keys: |
+ maven-${{ runner.os }}-screenshot-
+
+ # Install the locally-built artifacts the hellocodenameone Maven build needs:
+ # codename1-core + the Windows port (translator inputs), the codenameone
+ # maven plugin (runs transcode-svg / css / annotation processing during the
+ # app build, '-am' also builds its svg-/lottie-transcoder + css-compiler
+ # deps), and cn1-ads-mock (a common-module dependency). With these in the
+ # local repo the sample resolves the 8.0-SNAPSHOT it pins and builds with the
+ # plugin exactly like a fresh initializr project.
+ - name: Build core + Windows port + CN1 maven plugin (JDK 8)
+ working-directory: maven
+ shell: pwsh
+ # Single-quote the dotted -D arg: PowerShell otherwise splits it at the
+ # dots and treats ".javadoc.skip=true" as a (bogus) lifecycle phase.
+ #
+ # Retried on the same backoff the clean-target job uses, and for the same
+ # reason: a Maven Central fetch that resets the connection takes the whole
+ # job down before a line of this repository's code has been compiled. It
+ # reached the build EXTENSION here -- central-publishing-maven-plugin,
+ # resolved while the POM is still being read -- so not even a module was
+ # built. This step only downloads and builds, so a blanket loop cannot
+ # turn a failing test green.
+ run: |
+ $ok = $false
+ foreach ($delay in 0, 30, 90, 180, 300) {
+ # Clear Maven's cached resolution failures first; see the first retry loop above.
+ Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
+ Remove-Item -Force -ErrorAction SilentlyContinue
+ if ($delay -gt 0) {
+ Write-Host "mvn failed; retrying in $delay s..."
+ Start-Sleep -Seconds $delay
+ }
+ mvn -B -pl windows -am -DskipTests '-Dmaven.javadoc.skip=true' '-Plocal-dev-javase' install
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ }
+ if (-not $ok) { throw "mvn install failed after all retries" }
+
+ - name: Enter golden capture mode
+ uses: ./.github/actions/cn1ss-capture
+ with:
+ tests: ${{ inputs.cn1ss_capture }}
+ mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
+
+ # The suite classes, the libraries it ships and the test server, built
+ # once by prepare-suite (they are architecture- and OS-independent).
+ - name: Download suite classes
+ uses: ./.github/actions/download-artifact-with-retry
+ with:
+ name: linux-suite-classes
+ path: .
+ - name: Unpack suite classes
+ shell: pwsh
+ run: tar xzf suite-classes.tgz
+ # Publish the compiled (architecture-independent) core + port bytecode right
+ # after building it, so the native arm64 screenshot leg can translate +
+ # clang-cl-build an arm64 exe without rebuilding core -- codename1-core needs
+ # JDK 8 (source/target 1.5), which Temurin does not publish for Windows/
+ # aarch64. Uploaded before the capture step so an x64 capture flake does not
+ # block the arm64 leg.
+ - name: Upload compiled core + port classes
+ uses: ./.github/actions/upload-artifact-with-retry
+ with:
+ name: windows-port-classes
+ path: |
+ maven/core/target/classes
+ maven/windows/target/classes
+ if-no-files-found: error
+ retention-days: 1
+
+ # Build the ParparVM JavaAPI, then run the FULL hellocodenameone screenshot
+ # suite over the cn1ss WebSocket: capturesHelloSuiteOverWebSocket builds the
+ # suite exe (app + core + port + nativeSources via clang-cl), starts the
+ # cn1ss test server (scripts/hellocodenameone/backend), runs the exe (it renders each test Form offscreen
+ # with Direct2D/DirectWrite and streams each PNG over com.codename1.io
+ # WebSocket), waits for CN1SS:SUITE:FINISHED, and copies every received PNG
+ # to CN1_SHOT_OUTPUT_DIR (~112 images). This is the CI equivalent of
+ # scripts/windows/run-hello.bat.
+ # Fetch the WebView2 SDK so buildHelloCodenameOneExe's CMake compiles the
+ # native BrowserComponent peer (cn1_windows_browser.cpp) and links the
+ # static loader. WEBVIEW2_SDK_DIR is exported for the capture step below.
+ # The fetch script retries transient NuGet failures and fails after bounded
+ # exhaustion. Building browser stubs would silently drop BrowserComponent
+ # coverage, so an unavailable SDK must remain a blocking failure.
+ - name: Fetch WebView2 SDK (for the BrowserComponent peer)
+ shell: pwsh
+ run: |
+ & "${{ github.workspace }}\scripts\windows\fetch-webview2-sdk.ps1"
+ if (!(Test-Path "C:\webview2sdk\pkg\build\native\include\WebView2.h")) {
+ throw "WebView2 SDK header missing after successful fetch"
+ }
+ "WEBVIEW2_SDK_DIR=C:\webview2sdk\pkg\build\native" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
+
+ - name: Build JavaAPI + capture screenshot suite over WebSocket
+ working-directory: vm
+ shell: pwsh
+ env:
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ CN1SS_SERVER_DIST: ${{ github.workspace }}\artifacts\cn1ss-server
+ CN1_SHOT_OUTPUT_DIR: ${{ github.workspace }}\artifacts\windows-port\raw
+ CN1_PERFORMANCE_BINARY_OUT: ${{ github.workspace }}\artifacts\windows-port\raw\benchmark-app.exe
+ # The suite's own translation, replayed by the performance gate below.
+ CN1_TRANSLATION_RECORD: ${{ github.workspace }}\artifacts\windows-port\raw\translation-record.jsonl
+ CN1_REQUIRE_SUITE: ${{ github.event_name != 'pull_request' }}
+ CN1_REQUIRE_PERFORMANCE: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
+ run: |
+ # Both retried the way the clean-target job does. The package is a
+ # download-and-build, so a blanket loop is safe; the test is restricted
+ # to the resolution failure shape, because a blanket loop there would
+ # let an intermittent product regression pass on attempt two and turn a
+ # blocking gate green.
+ $ok = $false
+ foreach ($delay in 0, 30, 90, 180, 300) {
+ # Clear Maven's cached resolution failures first; see the first retry loop above.
+ Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
+ Remove-Item -Force -ErrorAction SilentlyContinue
+ if ($delay -gt 0) {
+ Write-Host "mvn failed; retrying in $delay s..."
+ Start-Sleep -Seconds $delay
+ }
+ mvn -B clean package -pl JavaAPI -am -DskipTests
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ }
+ if (-not $ok) { throw "mvn clean package failed after all retries" }
+ $resolutionFailure = 'status: (403|429|50[0-9])|Could not transfer artifact|Unresolveable build extension|Non-resolvable import POM|Could not resolve dependencies|UnknownHostException|Could not resolve host|Temporary failure in name resolution'
+ $ok = $false
+ foreach ($delay in 0, 30, 90, 180, 300) {
+ # Clear Maven's cached resolution failures first; see the first retry loop above.
+ Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
+ Remove-Item -Force -ErrorAction SilentlyContinue
+ if ($delay -gt 0) {
+ Write-Host "mvn failed on a dependency-resolution error; retrying in $delay s..."
+ Start-Sleep -Seconds $delay
+ }
+ mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest#capturesHelloSuiteOverWebSocket' '-Dsurefire.failIfNoSpecifiedTests=false' 2>&1 |
+ Tee-Object -Variable mvnOutput
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ if (-not ($mvnOutput -match $resolutionFailure)) {
+ throw "mvn test failed for a reason that is not a transient dependency-resolution error; not retrying"
+ }
+ }
+ if (-not $ok) { throw "mvn test failed after all retries" }
+
+ # Preserve the native cn1WindowsLog output so the offscreen-capture path is
+ # confirmable on the green x64 gate too (compare against the arm64 leg).
+ - name: Collect native windows log (x64)
+ if: ${{ !cancelled() }}
+ shell: pwsh
+ run: |
+ New-Item -ItemType Directory -Force -Path artifacts/windows-port/raw | Out-Null
+ $log = Join-Path $env:TEMP 'cn1windows.log'
+ if (Test-Path $log) {
+ Copy-Item $log artifacts/windows-port/raw/cn1windows-native.log -Force
+ Write-Host "collected native log ($((Get-Item $log).Length) bytes)"
+ } else {
+ "no native cn1windows.log found at $log" | Out-File artifacts/windows-port/raw/cn1windows-native.log
+ Write-Host "no native log at $log"
+ }
+
+ # ParparVM against JDK 25 on this runner: this job's own suite translation, the
+ # translator translating itself, and every Bench workload. The table lands in this
+ # arch's screenshot comment and the job's last step fails it on a regression.
+ # JDK_8_HOME falls back to the job's JDK where there is no JDK 8 (arm64): the
+ # builds only ask javac for -source/-target 1.8 against an explicit bootclasspath.
+ - name: ParparVM vs JDK 25 (performance gate, x64)
+ if: success() || failure()
+ # Names this pull request's overlay (perf-baseline/pr/.json) in the
+ # comment. A workflow_dispatch run carries no pull request, so the gate asks gh.
+ env:
+ GH_TOKEN: ${{ github.token }}
+ shell: bash
+ run: |
+ export JDK_8_HOME="${JDK_8_HOME:-$JAVA_HOME}"
+ vm/selfhost/ci-perf-gate.sh run windows-x64 artifacts/windows-port/raw/perf \
+ --hello-workload "$(cygpath -m "$GITHUB_WORKSPACE/artifacts/windows-port/raw/translation-record.jsonl")" \
+ --hello-app WinHelloMain
+
+ - name: Upload screenshot artifact (x64)
+ if: ${{ !cancelled() }}
+ uses: ./.github/actions/upload-artifact-with-retry
+ with:
+ name: windows-port-screenshot-raw-x64
+ path: artifacts/windows-port/raw
+ if-no-files-found: warn
+ retention-days: 14
+
+ # Read by perf-baseline.yml's nightly tighten job, which lowers a baseline once
+ # master has beaten it consistently, so a win cannot be given back unnoticed.
+ - name: Upload the performance gate results
+ if: success() || failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: perf-results-windows-x64
+ path: artifacts/windows-port/raw/perf/perf-results.json
+ if-no-files-found: ignore
+ retention-days: 14
+
+ - name: Fail on a ParparVM performance regression (x64)
+ # Not in a capture (cn1ss_capture): that run exists to render goldens,
+ # and a timing gate failing it only marks the capture red.
+ if: ${{ (success() || failure()) && inputs.cn1ss_capture == '' }}
+ shell: bash
+ run: vm/selfhost/ci-perf-gate.sh verdict artifacts/windows-port/raw/perf
+
+ # Native arm64 leg of the screenshot capture: reuses the core + port bytecode
+ # compiled by the x64 job (architecture-independent), then translates +
+ # clang-cl-builds a native arm64 exe on the windows-11-arm runner and captures
+ # the same Contacts UI over the cn1ss WebSocket. Failures are blocking on pull
+ # requests and on master-report runs.
+ windows-port-screenshot-arm64:
+ name: screenshot-capture (arm64)
+ needs: [windows-port-screenshot]
+ # Runs when the x64 job FAILED too, not only when it passed: what this leg needs
+ # from it (the compiled classes) is uploaded early, and the x64 job's last step is
+ # the performance verdict. Requiring success let an x64 perf regression skip the
+ # whole arm64 leg, its screenshots and its own perf gate included. An x64 failure
+ # before the upload still fails here, at the download, with its own message.
+ # Not in a golden capture: the x64 leg's rendering is the golden
+ # (golden-capture.sh), and this leg is held to it by the normal run.
+ if: >-
+ inputs.cn1ss_capture == '' && (
+ !cancelled() && needs.windows-port-screenshot.result != 'skipped' &&
+ (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
+ )
+ runs-on: windows-11-arm
+ env:
+ CN1_NATIVE_VERIFY: strict
+ CFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ CXXFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ # 60 for the suite plus the ParparVM vs JDK 25 performance gate.
+ timeout-minutes: 110
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Set up MSVC environment
+ uses: ilammy/msvc-dev-cmd@v1
+ with:
+ arch: arm64
+
+ - name: Set up Ninja
+ shell: pwsh
+ run: |
+ # Install Ninja from PyPI wheels rather than the gha-setup-ninja action,
+ # whose GitHub-release download intermittently arrives corrupted ("No END
+ # header found") and fails the toolchain setup. pip wheels exist for both
+ # win_amd64 and win_arm64; retry to absorb transient network blips. The
+ # console script lands on PATH (the runner's Python Scripts dir).
+ $ok = $false
+ for ($i = 1; $i -le 3; $i++) {
+ python -m pip install --upgrade ninja
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ Write-Host "ninja install attempt $i failed; retrying..."
+ Start-Sleep -Seconds 5
+ }
+ if (-not $ok) { throw "Failed to install Ninja after 3 attempts" }
+ ninja --version
+
+ # Temurin publishes Windows/aarch64 from JDK 21; that JDK drives the
+ # translator harness and builds the JavaAPI. Core + port come pre-compiled.
+ # setup-java's archive extraction can crash PowerShell on ARM64.
+ # Retry only setup; the final attempt and every build/test stay blocking.
+ - name: Set up JDK 21
+ id: jdk21
+ continue-on-error: true
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '21'
+ cache: 'maven'
+ - name: Retry JDK 21 setup
+ if: steps.jdk21.outcome == 'failure'
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '21'
+ cache: 'maven'
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ - name: Restore compiled core + port classes
+ uses: ./.github/actions/download-artifact-with-retry
+ with:
+ name: windows-port-classes
+ path: maven
+
+ # The suite classes, the libraries it ships and the test server, built
+ # once by prepare-suite (they are architecture- and OS-independent).
+ - name: Download suite classes
+ uses: ./.github/actions/download-artifact-with-retry
+ with:
+ name: linux-suite-classes
+ path: .
+ - name: Unpack suite classes
+ shell: pwsh
+ run: tar xzf suite-classes.tgz
+ # Fail loudly if the artifacts did not land where the test reads them --
+ # otherwise the capture test would silently skip (assumeTrue) and post nothing.
+ - name: Verify restored classes
+ shell: pwsh
+ run: |
+ $core = "maven/core/target/classes/com/codename1/ui/Form.class"
+ $port = "maven/windows/target/classes/com/codename1/impl/windows/WindowsImplementation.class"
+ $common = "scripts/hellocodenameone/common/target/classes/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.class"
+ if (!(Test-Path $core)) { Write-Error "core classes missing after download: $core"; exit 1 }
+ if (!(Test-Path $port)) { Write-Error "port classes missing after download: $port"; exit 1 }
+ if (!(Test-Path $common)) { Write-Error "common classes missing after download: $common"; exit 1 }
+ $libs = "scripts/hellocodenameone/common/target/translation-libs"
+ foreach ($lib in "com/codename1/ads/mock/MockAdProvider.class") {
+ if (!(Test-Path "$libs/$lib")) { Write-Error "application libraries missing after download: $libs/$lib"; exit 1 }
+ }
+ Write-Host "Restored core + Windows port + common classes OK"
+
+ # Fetch the WebView2 SDK so buildHelloCodenameOneExe's CMake compiles the
+ # native BrowserComponent peer (cn1_windows_browser.cpp) and links the
+ # static loader. WEBVIEW2_SDK_DIR is exported for the capture step below.
+ # The fetch script retries transient NuGet failures and fails after bounded
+ # exhaustion. Building browser stubs would silently drop BrowserComponent
+ # coverage, so an unavailable SDK must remain a blocking failure.
+ - name: Fetch WebView2 SDK (for the BrowserComponent peer)
+ shell: pwsh
+ run: |
+ & "${{ github.workspace }}\scripts\windows\fetch-webview2-sdk.ps1"
+ if (!(Test-Path "C:\webview2sdk\pkg\build\native\include\WebView2.h")) {
+ throw "WebView2 SDK header missing after successful fetch"
+ }
+ "WEBVIEW2_SDK_DIR=C:\webview2sdk\pkg\build\native" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
+
+ - name: Build JavaAPI + capture screenshot suite over WebSocket
+ working-directory: vm
+ shell: pwsh
+ env:
+ CN1SS_SERVER_DIST: ${{ github.workspace }}\artifacts\cn1ss-server
+ CN1_SHOT_OUTPUT_DIR: ${{ github.workspace }}\artifacts\windows-port\raw
+ CN1_PERFORMANCE_BINARY_OUT: ${{ github.workspace }}\artifacts\windows-port\raw\benchmark-app.exe
+ # The suite's own translation, replayed by the performance gate below.
+ CN1_TRANSLATION_RECORD: ${{ github.workspace }}\artifacts\windows-port\raw\translation-record.jsonl
+ CN1_REQUIRE_PERFORMANCE: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
+ # Master reports must include the non-rendering tail of the suite too.
+ # PR screenshot jobs may still stop after the visual set stabilizes.
+ CN1_REQUIRE_SUITE: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
+ run: |
+ # Both retried the way the clean-target job does. The package is a
+ # download-and-build, so a blanket loop is safe; the test is restricted
+ # to the resolution failure shape, because a blanket loop there would
+ # let an intermittent product regression pass on attempt two and turn a
+ # blocking gate green.
+ $ok = $false
+ foreach ($delay in 0, 30, 90, 180, 300) {
+ # Clear Maven's cached resolution failures first; see the first retry loop above.
+ Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
+ Remove-Item -Force -ErrorAction SilentlyContinue
+ if ($delay -gt 0) {
+ Write-Host "mvn failed; retrying in $delay s..."
+ Start-Sleep -Seconds $delay
+ }
+ mvn -B clean package -pl JavaAPI -am -DskipTests
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ }
+ if (-not $ok) { throw "mvn clean package failed after all retries" }
+ $resolutionFailure = 'status: (403|429|50[0-9])|Could not transfer artifact|Unresolveable build extension|Non-resolvable import POM|Could not resolve dependencies|UnknownHostException|Could not resolve host|Temporary failure in name resolution'
+ $ok = $false
+ foreach ($delay in 0, 30, 90, 180, 300) {
+ # Clear Maven's cached resolution failures first; see the first retry loop above.
+ Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
+ Remove-Item -Force -ErrorAction SilentlyContinue
+ if ($delay -gt 0) {
+ Write-Host "mvn failed on a dependency-resolution error; retrying in $delay s..."
+ Start-Sleep -Seconds $delay
+ }
+ mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest#capturesHelloSuiteOverWebSocket' '-Dsurefire.failIfNoSpecifiedTests=false' 2>&1 |
+ Tee-Object -Variable mvnOutput
+ if ($LASTEXITCODE -eq 0) { $ok = $true; break }
+ if (-not ($mvnOutput -match $resolutionFailure)) {
+ throw "mvn test failed for a reason that is not a transient dependency-resolution error; not retrying"
+ }
+ }
+ if (-not $ok) { throw "mvn test failed after all retries" }
+
+ # Preserve the native cn1WindowsLog output (%TEMP%\cn1windows.log) so an
+ # offscreen-target / capture failure is diagnosable from the artifact, and
+ # so the raw dir is never empty (the arm64 artifact would otherwise not be
+ # produced when the suite stalls before writing any PNG).
+ - name: Collect native windows log (arm64)
+ if: ${{ !cancelled() }}
+ shell: pwsh
+ run: |
+ New-Item -ItemType Directory -Force -Path artifacts/windows-port/raw | Out-Null
+ $log = Join-Path $env:TEMP 'cn1windows.log'
+ if (Test-Path $log) {
+ Copy-Item $log artifacts/windows-port/raw/cn1windows-native.log -Force
+ Write-Host "collected native log ($((Get-Item $log).Length) bytes)"
+ } else {
+ "no native cn1windows.log found at $log" | Out-File artifacts/windows-port/raw/cn1windows-native.log
+ Write-Host "no native log at $log"
+ }
+
+ # ParparVM against JDK 25 on this runner: this job's own suite translation, the
+ # translator translating itself, and every Bench workload. The table lands in this
+ # arch's screenshot comment and the job's last step fails it on a regression.
+ # JDK_8_HOME falls back to the job's JDK where there is no JDK 8 (arm64): the
+ # builds only ask javac for -source/-target 1.8 against an explicit bootclasspath.
+ - name: ParparVM vs JDK 25 (performance gate, arm64)
+ if: success() || failure()
+ # Names this pull request's overlay (perf-baseline/pr/.json) in the
+ # comment. A workflow_dispatch run carries no pull request, so the gate asks gh.
+ env:
+ GH_TOKEN: ${{ github.token }}
+ shell: bash
+ run: |
+ export JDK_8_HOME="${JDK_8_HOME:-$JAVA_HOME}"
+ vm/selfhost/ci-perf-gate.sh run windows-arm64 artifacts/windows-port/raw/perf \
+ --hello-workload "$(cygpath -m "$GITHUB_WORKSPACE/artifacts/windows-port/raw/translation-record.jsonl")" \
+ --hello-app WinHelloMain
+
+ - name: Upload screenshot artifact (arm64)
+ if: ${{ !cancelled() }}
+ uses: ./.github/actions/upload-artifact-with-retry
+ with:
+ name: windows-port-screenshot-raw-arm64
+ path: artifacts/windows-port/raw
+ if-no-files-found: warn
+ retention-days: 14
+
+ # Read by perf-baseline.yml's nightly tighten job, which lowers a baseline once
+ # master has beaten it consistently, so a win cannot be given back unnoticed.
+ - name: Upload the performance gate results
+ if: success() || failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: perf-results-windows-arm64
+ path: artifacts/windows-port/raw/perf/perf-results.json
+ if-no-files-found: ignore
+ retention-days: 14
+
+ - name: Fail on a ParparVM performance regression (arm64)
+ # Not in a capture (cn1ss_capture): that run exists to render goldens,
+ # and a timing gate failing it only marks the capture red.
+ if: ${{ (success() || failure()) && inputs.cn1ss_capture == '' }}
+ shell: bash
+ run: vm/selfhost/ci-perf-gate.sh verdict artifacts/windows-port/raw/perf
+
+ # Per-architecture PR comments. x64 (Intel/AMD) and arm64 (Apple Silicon / Arm)
+ # post SEPARATE comments with DISTINCT markers, each depending only on its own
+ # screenshot leg -- so a failure or re-run in one architecture's pipeline never
+ # overrides or hides the other's result (the previous single combined comment
+ # showed only x64 and was skipped entirely if the x64 leg failed). Each comment
+ # carries that arch's own benchmark table (SSE2 on x64, NEON on arm64).
+ windows-port-screenshot-comment-x64:
+ name: screenshot-comment (x64)
+ needs: [windows-port-screenshot]
+ if: >-
+ (
+ !cancelled() &&
+ needs.windows-port-screenshot.result != 'cancelled' &&
+ needs.windows-port-screenshot.result != 'skipped' &&
+ (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
+ )
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: read
+ pull-requests: write
+ issues: write
+ env:
+ GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
+ GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Download x64 screenshot artifact
+ uses: ./.github/actions/download-artifact-with-retry
+ with:
+ name: windows-port-screenshot-raw-x64
+ path: artifacts/windows-port/raw
+ - name: Enter golden capture mode
+ uses: ./.github/actions/cn1ss-capture
+ with:
+ tests: ${{ inputs.cn1ss_capture }}
+ mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
+
+ - name: Post x64 screenshots to PR
+ shell: bash
+ env:
+ CN1SS_COMMENT_MARKER: ''
+ # This arch's ParparVM vs JDK 25 table, measured by its capture job.
+ CN1SS_EXTRA_MARKDOWN: artifacts/windows-port/raw/perf/perf-comment.md
+ CN1SS_COMMENT_LOG_PREFIX: '[windows-native-port x64]'
+ CN1SS_PREVIEW_SUBDIR: 'windows-native-x64'
+ CN1SS_SUCCESS_MESSAGE: 'Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.'
+ run: |
+ set -e
+ ART="artifacts/windows-port"
+ entries=()
+ if [ -d "$ART/raw" ]; then
+ for f in "$ART"/raw/*.png; do
+ [ -f "$f" ] || continue
+ entries+=("$(basename "$f" .png)=$f")
+ done
+ fi
+ # Empty captures must produce not-run evidence and fail the gate.
+ mkdir -p "$ART"
+ echo "Posting ${#entries[@]} x64 screenshot(s)"
+ mkdir -p "$ART/previews"
+ cp -f "$ART"/raw/windows-benchmark-stats.txt "$ART/" 2>/dev/null || true
+ source scripts/lib/cn1ss.sh
+ cn1ss_setup "$JAVA_HOME/bin/java" "$(pwd)/scripts/common/java"
+ REF_DIR="$(pwd)/scripts/windows/screenshots"
+ # Gate the Windows port like the Linux one: fail on any mismatch/error or
+ # a new screenshot with no committed golden (missing_expected). Without
+ # this the comparison only posted a PR comment and stale goldens slipped
+ # through green CI (the picker case-conversion refresh was missed here).
+ export CN1SS_FAIL_ON_MISMATCH=1
+ export CN1SS_ALLOWED_MISSING=0
+ # PR capture may stop after the visual set; durable reports require the full suite.
+ if [ "${{ github.event_name }}" != "pull_request" ] || [ ${#entries[@]} -eq 0 ]; then
+ export CN1SS_FAIL_ON_TEST_PROBLEMS=1
+ fi
+ export CN1SS_PORT_ID=windows-x64
+ export CN1SS_BINARY_PATH="$ART/raw/benchmark-app.exe"
+ export CN1SS_SUITE_LOG="$ART/raw/app-output.log"
+ if [ "${{ github.event_name }}" != "pull_request" ]; then export CN1SS_SKIP_COMMENT=1; fi
+ set +e
+ cn1ss_process_and_report \
+ "Native Windows port (x64)" \
+ "$ART/compare.json" "$ART/summary.txt" "$ART/comment.md" \
+ "$REF_DIR" "$ART/previews" "$ART" \
+ "${entries[@]}"
+ gate_rc=$?
+ set -e
+ fail=0
+ if [ "$gate_rc" -ne 0 ]; then
+ echo "[windows-native-port x64] FATAL: screenshot gate failed (rc=$gate_rc)"; fail=1
+ fi
+ if [ -f "$ART/summary.txt" ] && grep -q "^missing_expected|" "$ART/summary.txt"; then
+ me="$(grep -c "^missing_expected|" "$ART/summary.txt" || echo 0)"
+ echo "[windows-native-port x64] FATAL: $me screenshot(s) streamed with no stored golden (missing_expected) -- add them to $REF_DIR."; fail=1
+ fi
+ if [ "$fail" -ne 0 ]; then echo "Windows x64 screenshot gate failed."; exit 1; fi
+
+ # The cross-build jobs (wincross-*) own the public windows-x64 report. Keep
+ # native-build diagnostics out of the publisher/backfill port-status-*
+ # selection so a green native run cannot hide a shipping-pipeline failure.
+ - name: Upload Windows native x64 diagnostics
+ if: ${{ !cancelled() }}
+ uses: ./.github/actions/upload-artifact-with-retry
+ with:
+ name: windows-native-x64-diagnostics
+ path: artifacts/windows-port/port-status-windows-x64.json
+ # A capture (cn1ss_capture) renders goldens and writes no port
+ # status; requiring the file failed every capture's comment job.
+ if-no-files-found: ${{ inputs.cn1ss_capture != '' && 'ignore' || 'error' }}
+ retention-days: 14
+
+ - name: Upload golden capture
+ if: always()
+ uses: actions/upload-artifact@v7
+ with:
+ name: cn1ss-capture-windows-x64
+ path: artifacts/cn1ss-capture
+ if-no-files-found: ignore
+
+ windows-port-screenshot-comment-arm64:
+ name: screenshot-comment (arm64)
+ needs: [windows-port-screenshot-arm64]
+ # The capture job uploads its raw evidence with if: ${{ !cancelled() }}. Normalize it
+ # even when capture failed so diagnostics remain available. The failed
+ # capture still remains a blocking red check.
+ if: >-
+ (
+ !cancelled() &&
+ needs.windows-port-screenshot-arm64.result != 'cancelled' &&
+ needs.windows-port-screenshot-arm64.result != 'skipped' &&
+ (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
+ )
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: read
+ pull-requests: write
+ issues: write
+ env:
+ GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
+ GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Download arm64 screenshot artifact
+ uses: ./.github/actions/download-artifact-with-retry
+ with:
+ name: windows-port-screenshot-raw-arm64
+ path: artifacts/windows-port/raw
+ - name: Enter golden capture mode
+ uses: ./.github/actions/cn1ss-capture
+ with:
+ tests: ${{ inputs.cn1ss_capture }}
+ mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
+
+ - name: Post arm64 screenshots to PR
+ shell: bash
+ env:
+ CN1SS_COMMENT_MARKER: ''
+ # This arch's ParparVM vs JDK 25 table, measured by its capture job.
+ CN1SS_EXTRA_MARKDOWN: artifacts/windows-port/raw/perf/perf-comment.md
+ CN1SS_COMMENT_LOG_PREFIX: '[windows-native-port arm64]'
+ CN1SS_PREVIEW_SUBDIR: 'windows-native-arm64'
+ CN1SS_SUCCESS_MESSAGE: 'Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.'
+ run: |
+ set -e
+ ART="artifacts/windows-port"
+ entries=()
+ if [ -d "$ART/raw" ]; then
+ for f in "$ART"/raw/*.png; do
+ [ -f "$f" ] || continue
+ entries+=("$(basename "$f" .png)=$f")
+ done
+ fi
+ # Empty captures must produce not-run evidence and fail the gate.
+ mkdir -p "$ART"
+ echo "Posting ${#entries[@]} arm64 screenshot(s)"
+ mkdir -p "$ART/previews"
+ cp -f "$ART"/raw/windows-benchmark-stats.txt "$ART/" 2>/dev/null || true
+ source scripts/lib/cn1ss.sh
+ cn1ss_setup "$JAVA_HOME/bin/java" "$(pwd)/scripts/common/java"
+ REF_DIR="$(pwd)/scripts/windows/screenshots"
+ # Same blocking gate as the x64 leg.
+ export CN1SS_FAIL_ON_MISMATCH=1
+ export CN1SS_ALLOWED_MISSING=0
+ # PR capture may stop after the visual set; durable reports require the full suite.
+ if [ "${{ github.event_name }}" != "pull_request" ] || [ ${#entries[@]} -eq 0 ]; then
+ export CN1SS_FAIL_ON_TEST_PROBLEMS=1
+ fi
+ export CN1SS_PORT_ID=windows-arm64
+ export CN1SS_BINARY_PATH="$ART/raw/benchmark-app.exe"
+ export CN1SS_SUITE_LOG="$ART/raw/app-output.log"
+ if [ "${{ github.event_name }}" != "pull_request" ]; then export CN1SS_SKIP_COMMENT=1; fi
+ set +e
+ cn1ss_process_and_report \
+ "Native Windows port (arm64)" \
+ "$ART/compare.json" "$ART/summary.txt" "$ART/comment.md" \
+ "$REF_DIR" "$ART/previews" "$ART" \
+ "${entries[@]}"
+ gate_rc=$?
+ set -e
+ fail=0
+ if [ "$gate_rc" -ne 0 ]; then
+ echo "[windows-native-port arm64] FATAL: screenshot gate failed (rc=$gate_rc)"; fail=1
+ fi
+ if [ -f "$ART/summary.txt" ] && grep -q "^missing_expected|" "$ART/summary.txt"; then
+ me="$(grep -c "^missing_expected|" "$ART/summary.txt" || echo 0)"
+ echo "[windows-native-port arm64] FATAL: $me screenshot(s) streamed with no stored golden (missing_expected) -- add them to $REF_DIR."; fail=1
+ fi
+ if [ "$fail" -ne 0 ]; then echo "Windows arm64 screenshot gate failed."; exit 1; fi
+
+ - name: Upload Windows ARM64 port status
+ if: ${{ !cancelled() }}
+ uses: ./.github/actions/upload-artifact-with-retry
+ with:
+ name: port-status-windows-arm64
+ path: artifacts/windows-port/port-status-windows-arm64.json
+ # A capture (cn1ss_capture) renders goldens and writes no port
+ # status; requiring the file failed every capture's comment job.
+ if-no-files-found: ${{ inputs.cn1ss_capture != '' && 'ignore' || 'error' }}
+ retention-days: 14
+
+ - name: Upload golden capture
+ if: always()
+ uses: actions/upload-artifact@v7
+ with:
+ name: cn1ss-capture-windows-arm64
+ path: artifacts/cn1ss-capture
+ if-no-files-found: ignore
+
+ # Widgets Board provider compile check: compiles the one nativeSources TU no
+ # other CI leg ever compiles -- cn1_windows_widgetboard.cpp, which is gated
+ # behind CN1_WIDGETBOARD (the default CMake build never defines it and the
+ # Linux xwin cross leg has no Windows App SDK) -- against the real Windows App
+ # SDK winmds + cppwinrt-generated C++/WinRT projections on a Windows host.
+ # This mirrors exactly what WindowsNativeBuilder does for windows.msix=true
+ # builds: clang-cl (the port is clang-cl-only by design -- cn1_globals.h uses
+ # `_Atomic` and `__thread`, which MSVC cl.exe rejects in C++ -- and the
+ # builder sets CMAKE_CXX_COMPILER to clang-cl on Windows hosts and cross
+ # builds alike), /std:c++17 (the translator-emitted CMAKE_CXX_STANDARD),
+ # /EHsc (C++/WinRT requires exceptions) and /DCN1_WIDGETBOARD=1 plus the
+ # WinAppSDK include dir. The same step also re-compiles
+ # cn1_windows_widgets.cpp (the plain-exe floating-widget TU) with the
+ # Windows-host toolchain as a second real-compiler check beyond the Linux
+ # xwin leg. Compile-only (/c): any compile error fails the job.
+ widgetboard-compile-check:
+ # Not a screenshot suite: a golden capture skips it.
+ if: ${{ inputs.cn1ss_capture == '' && github.event_name != 'release' }}
+ name: widgetboard-compile-check (x64)
+ runs-on: windows-latest
+ env:
+ CN1_NATIVE_VERIFY: strict
+ CFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ CXXFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
+ timeout-minutes: 20
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v6
+
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+
+ # clang-cl uses the MSVC STL/CRT headers and the Windows SDK, which reach
+ # the compiler through the INCLUDE/LIB environment vcvarsall sets up.
+ - name: Set up MSVC environment
+ uses: ilammy/msvc-dev-cmd@v1
+ with:
+ arch: amd64
+
+ # The Microsoft.WindowsAppSDK nupkg ships winmd metadata + MddBootstrap.h
+ # but NO prebuilt C++/WinRT headers, so the projection (winrt/base.h, the
+ # referenced Windows.* namespaces from the OS metadata, and
+ # winrt/Microsoft.Windows.Widgets[.Providers].h) is generated with
+ # cppwinrt.exe. Versions are pinned for reproducibility: the 1.5 servicing
+ # release matches the 1.5 series the provider bootstraps at runtime
+ # (CN1_WINAPPSDK_MAJORMINOR 0x00010005 in the TU). nuget.exe is
+ # preinstalled on the windows runners.
+ - name: Fetch Windows App SDK + generate C++/WinRT projections
+ shell: pwsh
+ run: |
+ $ErrorActionPreference = 'Stop'
+ $wasdkVer = '1.5.250108004'
+ $cppwinrtVer = '2.0.240405.15'
+ nuget install Microsoft.WindowsAppSDK -Version $wasdkVer -OutputDirectory nupkgs -NonInteractive
+ if ($LASTEXITCODE -ne 0) { throw "nuget install Microsoft.WindowsAppSDK failed" }
+ nuget install Microsoft.Windows.CppWinRT -Version $cppwinrtVer -OutputDirectory nupkgs -NonInteractive
+ if ($LASTEXITCODE -ne 0) { throw "nuget install Microsoft.Windows.CppWinRT failed" }
+ $wasdk = "nupkgs/Microsoft.WindowsAppSDK.$wasdkVer"
+ $cppwinrt = "nupkgs/Microsoft.Windows.CppWinRT.$cppwinrtVer/bin/cppwinrt.exe"
+ # -in local merges the OS metadata (C:\Windows\System32\WinMetadata)
+ # so the Windows.Foundation types the Widgets winmd references are
+ # projected by the same cppwinrt version (mixing SDK-shipped headers
+ # with a different generator version trips base.h's version check).
+ & $cppwinrt -in "$wasdk/lib/uap10.0/Microsoft.Windows.Widgets.winmd" -in local -output winrt-gen
+ if ($LASTEXITCODE -ne 0) { throw "cppwinrt projection generation failed" }
+ if (!(Test-Path 'winrt-gen/winrt/Microsoft.Windows.Widgets.Providers.h')) {
+ throw "cppwinrt did not produce winrt/Microsoft.Windows.Widgets.Providers.h"
+ }
+ "CN1_WASDK_DIR=$wasdk" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
+
+ - name: Widgets Board provider compile check (clang-cl)
+ shell: pwsh
+ run: |
+ $ErrorActionPreference = 'Stop'
+ clang-cl --version
+ # The runner's clang-cl is the standalone LLVM on PATH, not one matched
+ # to the image's MSVC STL. Image 20261116 moved the STL to 14.52, which
+ # refuses any clang older than 22 (STL1000) while the runner ships 20, so
+ # the check is a statement about the image, not about these sources. The
+ # STL's own escape hatch turns it off; a real incompatibility still fails
+ # the compile on the line that uses it.
+ $mismatch = '/D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH'
+ # The widgetboard TU deliberately avoids the cn1 headers (cn1_globals.h's
+ # C11 stdatomic conflicts with the C++ the winrt headers pull) and
+ # compiles at C++20: C++/WinRT at C++17 falls back to
+ # , which the modern MSVC STL rejects under clang
+ # (STL1009). This mirrors the -DCMAKE_CXX_STANDARD=20 WindowsNativeBuilder
+ # passes for windows.msix=true builds.
+ clang-cl /c /std:c++20 /EHsc $mismatch /DCN1_WIDGETBOARD=1 /Iwinrt-gen "/I$env:CN1_WASDK_DIR/include" `
+ Ports/WindowsPort/nativeSources/cn1_windows_widgetboard.cpp /Fowidgetboard.obj
+ if ($LASTEXITCODE -ne 0) { throw "cn1_windows_widgetboard.cpp failed to compile with CN1_WIDGETBOARD=1" }
+ # A translated app supplies the generated cn1_class_method_index.h; the
+ # floating-widget TU includes cn1_windows.h -> cn1_globals.h, which only
+ # needs this one constant from it here.
+ New-Item -ItemType Directory -Force stub-index | Out-Null
+ "#define cn1_array_start_offset 1000" | Set-Content stub-index/cn1_class_method_index.h -Encoding ascii
+ clang-cl /c /std:c++17 /EHsc $mismatch /Istub-index /Ivm/ByteCodeTranslator/src `
+ Ports/WindowsPort/nativeSources/cn1_windows_widgets.cpp /Fowidgets.obj
+ if ($LASTEXITCODE -ne 0) { throw "cn1_windows_widgets.cpp failed to compile" }
+ Write-Host "Widgets Board provider + floating-widget TUs compiled clean."
diff --git a/.github/workflows/native-themes-sync.yml b/.github/workflows/native-themes-sync.yml
index 9ecc4249ce0..e3b6f3d00a4 100644
--- a/.github/workflows/native-themes-sync.yml
+++ b/.github/workflows/native-themes-sync.yml
@@ -60,7 +60,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
diff --git a/.github/workflows/papercut.yml b/.github/workflows/papercut.yml
deleted file mode 100644
index c62b917f2da..00000000000
--- a/.github/workflows/papercut.yml
+++ /dev/null
@@ -1,506 +0,0 @@
-name: Papercut (arena shooter sample)
-
-# scripts/papercut is one Maven project holding a game and its server: a
-# `shared` module of transfer objects, @RestClient contracts and the bounds a
-# score is held to, the Codename One client (`common`, where the arena runs), a
-# Codename One Backend that implements the contracts, and an `ios` module for
-# the device build. There is no `rules` module: the server never re-simulates a
-# run, so nothing but the app runs the game. It is modelled on splat.yml.
-#
-# Four things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM,
-# then the same tests on PostgreSQL and MySQL
-# client-e2e the application's tests in the simulator -- the arena's own
-# tests among them -- driven against a running server
-# (run-e2e.sh builds and starts the server itself)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/papercut/**'
- - '.github/workflows/papercut.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/papercut and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/papercut
- run: |
- python3 scripts/sync-initializr-template.py papercut
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/papercut
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/papercut/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: papercut-backend-tests
- path: scripts/papercut/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/papercut \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: papercut-backend-${{ matrix.database }}-tests
- path: scripts/papercut/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/papercut/check-template.sh "$RUNNER_TEMP/papercut-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- # ArenaTest: the bot plays whole runs and every score stays inside the
- # bounds the server accepts (ScoreBounds), so the two cannot drift apart.
- - name: Arena tests
- run: |
- export JAVA_HOME="${JAVA_HOME_17}"
- cd scripts/papercut
- mvn -B -pl shared,common -am test -Dtest=ArenaTest -Dsurefire.failIfNoSpecifiedTests=false
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/papercut/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: papercut-e2e
- path: |
- scripts/papercut/target/e2e-shots/**
- scripts/papercut/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/papercut
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-papercut-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-papercut-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-papercut-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-papercut-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/papercut
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/papercut-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
- # embedded watch app included, whose watch-only icon then has nothing to
- # compile for. The destination picks each target's own SDK.
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/parley.yml b/.github/workflows/parley.yml
deleted file mode 100644
index 77b7176a7b0..00000000000
--- a/.github/workflows/parley.yml
+++ /dev/null
@@ -1,591 +0,0 @@
-name: Parley (full-stack sample)
-
-# scripts/parley is one Maven project holding an application and its server:
-# a `shared` module of transfer objects and @RestClient contracts, the
-# Codename One client that calls them, and a Codename One Backend that
-# implements them. It is also what the initializr offers as a template.
-#
-# Six things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it under another name builds: its
-# server's tests pass and its app compiles (a step of client-e2e,
-# which has the artifacts installed)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/parley/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/parley.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/parley and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/parley
- run: python3 scripts/sync-initializr-template.py parley
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/parley
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/parley/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: parley-backend-tests
- path: scripts/parley/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/parley/check-template.sh "$RUNNER_TEMP/parley-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/parley/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: parley-e2e
- path: |
- scripts/parley/target/e2e-shots/**
- scripts/parley/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/parley \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: savor-backend-${{ matrix.database }}-tests
- path: scripts/parley/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/parley/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: parley-web-e2e
- path: scripts/parley/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/parley
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-parley-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-parley-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-parley-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-parley-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/parley
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/parley-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -sdk iphonesimulator \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/parparvm-parallel-mark.yml b/.github/workflows/parparvm-parallel-mark.yml
index f4e78bac5f6..c28475c24e8 100644
--- a/.github/workflows/parparvm-parallel-mark.yml
+++ b/.github/workflows/parparvm-parallel-mark.yml
@@ -147,7 +147,7 @@ jobs:
# dependency. Packaging alone without -am (and without install) leaves
# nothing for the tests module to resolve against, which is how the first
# revision of this workflow failed on all three arms including the control.
- # This mirrors parparvm-tests.yml.
+ # This mirrors linux-build-run.yml.
# Through retry.sh, transient failures only: a TLS handshake that did not
# complete fetching maven-clean-plugin from Central failed this step once,
# before anything under test had been built.
diff --git a/.github/workflows/parparvm-selfhost.yml b/.github/workflows/parparvm-selfhost.yml
index c00497e62b0..5bcfb34b94b 100644
--- a/.github/workflows/parparvm-selfhost.yml
+++ b/.github/workflows/parparvm-selfhost.yml
@@ -138,8 +138,8 @@ jobs:
com.codename1.tools.translator
# PERFORMANCE MOVED OUT, into every platform's own build: vm/selfhost/ci-perf-gate.sh
- # runs in linux-build-run.yml (x64, arm64), parparvm-tests-windows.yml (x64, arm64)
- # and scripts-macos.yml, fails that build on a regression and puts the per-benchmark
+ # runs in linux-build-run.yml (Linux x64/arm64, Windows x64/arm64)
+ # and scripts-ios.yml (Apple job), fails that build on a regression and puts the per-benchmark
# table in that platform's PR comment.
#
# It used to live here, building the translator a second time at -O3 and then
diff --git a/.github/workflows/parparvm-tests-windows.yml b/.github/workflows/parparvm-tests-windows.yml
deleted file mode 100644
index 8904e1cd9b5..00000000000
--- a/.github/workflows/parparvm-tests-windows.yml
+++ /dev/null
@@ -1,1347 +0,0 @@
-name: ParparVM Java Tests (Windows)
-
-# Builds the ParparVM "clean" C target on Windows with an LLVM toolchain
-# (clang-cl on the MSVC ABI) and runs the translator test suite, including the
-# clean-target integration test that translates Java -> C, compiles it with
-# clang-cl and runs the resulting binary. This proves translated C compiles and
-# executes on Windows via LLVM, and -- via the "windows" app-type case -- that
-# the native Windows port's Direct2D/DirectWrite/Win32 link set resolves. The
-# Linux workflow (parparvm-tests.yml) still owns the quality-report publishing
-# and release jars.
-#
-# The build runs on a matrix of both Windows architectures:
-# * x64 (windows-latest) -- the reliable gate; Intel/AMD desktops.
-# * arm64 (windows-11-arm) -- matches Apple-Silicon dev VMs and Arm desktops.
-#
-# windows-11-arm is a public-preview runner that is free ONLY on public
-# repositories (it fails on private repos), and its image differs from x64 (some
-# tooling / JDK architectures are not published for Windows-on-Arm). The arm64
-# leg uses a different toolchain, but failures remain blocking on every event.
-# fail-fast is disabled so the x64 leg always runs to completion.
-
-on:
- workflow_dispatch:
- inputs:
- cn1ss_capture:
- description: Golden capture only (golden-capture.yml) - the tests without goldens, for the log; the full suite runs
- required: false
- default: ''
- type: string
- schedule:
- - cron: '5 2 * * *'
- 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/compose-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/parparvm-tests-windows.yml'
- - 'vm/**'
- - 'Ports/WindowsPort/**'
- - 'scripts/hellocodenameone/**'
- # The Rive screenshot tests draw classes this translator generates.
- - 'maven/rive-transcoder/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- # The screenshots this leg compares are produced by the core renderer and
- # the port's native theme, so a change to either can move them. Without
- # these the leg does not run on the pull request that changes them and the
- # baselines only go stale on master - which is how the Sheet and
- # AppReviewDialog captures were left recording a double paint (issue
- # #5606). scripts/windows holds the baselines themselves, so a reseed is
- # verified by the leg that produced it.
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'native-themes/windows-fluent/**'
- - '!native-themes/windows-fluent/**/*.md'
- - 'scripts/windows/**'
- - '!scripts/windows/**/*.md'
- - '!vm/**/README.md'
- - '!vm/**/readme.md'
- - '!vm/**/docs/**'
- push:
- branches: [ master, main ]
- 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/compose-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/parparvm-tests-windows.yml'
- - 'vm/**'
- - 'Ports/WindowsPort/**'
- - 'scripts/hellocodenameone/**'
- # The Rive screenshot tests draw classes this translator generates.
- - 'maven/rive-transcoder/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- # The screenshots this leg compares are produced by the core renderer and
- # the port's native theme, so a change to either can move them. Without
- # these the leg does not run on the pull request that changes them and the
- # baselines only go stale on master - which is how the Sheet and
- # AppReviewDialog captures were left recording a double paint (issue
- # #5606). scripts/windows holds the baselines themselves, so a reseed is
- # verified by the leg that produced it.
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'native-themes/windows-fluent/**'
- - '!native-themes/windows-fluent/**/*.md'
- - 'scripts/windows/**'
- - '!scripts/windows/**/*.md'
- - '!vm/**/README.md'
- - '!vm/**/readme.md'
- - '!vm/**/docs/**'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-env:
- # Turn on the ParparVM native-signature check for every translation this
- # workflow forks (a forked process inherits the environment). Off by default in
- # the translator so a customer build that succeeds today keeps succeeding; see
- # NativeSignatureVerifier.
- CN1_NATIVE_VERIFY: strict
- # A method the translator culled as unreachable is still emitted as a stub,
- # because dispatch tables name it. With this on, the stub aborts with the
- # method's name instead of returning 0, so a wrong cull fails the suite that
- # reached it rather than shipping a silent null. Ours to enforce, like
- # CN1_NATIVE_VERIFY: customer builds keep the plain stub. See
- # BytecodeMethod.appendMethodC. Not in the size or perf benchmarks, whose
- # binaries should be the ones customers get.
- CN1_CULL_TRAP: '1'
- # The windows-latest image ships MSVC STL headers (14.52) that refuse any
- # clang older than 22 with "error STL1000: Unexpected compiler version", while
- # the clang-cl on PATH is the image's older standalone LLVM. Every C++ native
- # failed to compile. This is Microsoft's documented switch for that check;
- # the cmake the tests fork inherits it, and the generated CMakeLists never sets
- # the base CMAKE_C_FLAGS/CMAKE_CXX_FLAGS, so it reaches every compile. The
- # cross-build workflows compile on Linux against pinned xwin headers and do
- # not need it.
- CFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
- CXXFLAGS: -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
-
-jobs:
- # First, so a PR whose new screenshot tests have no goldens yet runs nothing
- # here; Golden capture (golden-capture.yml) records them instead.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- with:
- capture: ${{ inputs.cn1ss_capture || '' }}
-
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
- vm-tests-windows:
- needs: golden-plan
- # Not a screenshot suite: a golden capture skips it.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (inputs.cn1ss_capture == '') }}
- name: clean-target (${{ matrix.name }})
- runs-on: ${{ matrix.runner }}
- timeout-minutes: 45
- strategy:
- fail-fast: false
- matrix:
- include:
- - name: x64
- runner: windows-latest
- msvc_arch: amd64
- - name: arm64
- runner: windows-11-arm
- msvc_arch: arm64
- steps:
- - name: Check out repository
- uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # clang-cl uses the MSVC headers, CRT and linker, so the MSVC developer
- # environment has to be on PATH for the spawned cmake/clang-cl to work.
- # The arch is matched to the runner so the arm64 leg builds native arm64.
- - name: Set up MSVC environment
- uses: ilammy/msvc-dev-cmd@v1
- with:
- arch: ${{ matrix.msvc_arch }}
-
- - name: Set up Ninja
- shell: pwsh
- run: |
- # Install Ninja from PyPI wheels rather than the gha-setup-ninja action,
- # whose GitHub-release download intermittently arrives corrupted ("No END
- # header found") and fails the toolchain setup. pip wheels exist for both
- # win_amd64 and win_arm64; retry to absorb transient network blips. The
- # console script lands on PATH (the runner's Python Scripts dir).
- $ok = $false
- for ($i = 1; $i -le 3; $i++) {
- python -m pip install --upgrade ninja
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- Write-Host "ninja install attempt $i failed; retrying..."
- Start-Sleep -Seconds 5
- }
- if (-not $ok) { throw "Failed to install Ninja after 3 attempts" }
- ninja --version
-
- # The runner image's MSVC STL (14.52) static_asserts "expected Clang 22
- # or newer" (STL1000) while the image's own LLVM is 20, which failed every
- # C++ unit of the native suite (cn1_windows_browser.cpp first) on x64.
- # The image pairs the two, not us, so take Microsoft's documented escape
- # hatch for that check; CMake seeds CMAKE_CXX_FLAGS from CXXFLAGS in the
- # configure the tests spawn. Drop it once the image's clang catches up.
- - name: Allow the image's clang with its newer STL
- shell: pwsh
- run: |
- "CXXFLAGS=/D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
-
- - name: Verify LLVM / Ninja toolchain
- shell: pwsh
- run: |
- clang-cl --version
- ninja --version
- cmake --version
-
- # Install JDKs and export their paths (CompilerHelper reads JDK_*_HOME and
- # also auto-discovers any others). Temurin does not publish Windows/aarch64
- # builds for JDK 8/11, so those legs are x64-only; 17/21/25 run on both
- # architectures, which still exercises every JavaAPI bytecode level the
- # clean target supports.
- - name: Set up JDK 8
- if: ${{ matrix.name == 'x64' }}
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- if: ${{ matrix.name == 'x64' }}
- shell: pwsh
- run: echo "JDK_8_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
-
- - name: Set up JDK 11
- if: ${{ matrix.name == 'x64' }}
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '11'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 11 Path
- if: ${{ matrix.name == 'x64' }}
- shell: pwsh
- run: echo "JDK_11_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
-
- # Temurin publishes Windows/aarch64 only from JDK 21, so on arm64 the only
- # JDK set up is 21; x64 covers 8/11/17/21/25. The translator test harness
- # adapts to whatever JDKs are present.
- - name: Set up JDK 17
- if: ${{ matrix.name == 'x64' }}
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- if: ${{ matrix.name == 'x64' }}
- shell: pwsh
- run: echo "JDK_17_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
-
- - name: Set up JDK 21
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '21'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 21 Path
- shell: pwsh
- run: echo "JDK_21_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
-
- - name: Set up JDK 25
- if: ${{ matrix.name == 'x64' }}
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '25'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 25 Path
- if: ${{ matrix.name == 'x64' }}
- shell: pwsh
- run: echo "JDK_25_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
-
- # Restore the active runner JDK that drives Maven: JDK 8 on x64 (matching
- # the cache above), and JDK 21 on arm64 where 8/11/17 are unavailable.
- - name: Restore JDK 8 (x64)
- if: ${{ matrix.name == 'x64' }}
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- - name: Restore JDK 21 (arm64)
- if: ${{ matrix.name == 'arm64' }}
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '21'
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # Only the native-compilation tests are run here: this runner exists to
- # prove the translated C compiles with clang-cl (LLVM) and executes on
- # Windows, which is exactly what CleanTargetIntegrationTest does (translate
- # Java -> C -> cmake/clang-cl build -> run the binary), including the
- # "windows" app-type case that links the Direct2D/DirectWrite/Win32 stack.
- # The rest of the vm suite is platform-agnostic Java already covered by
- # parparvm-tests.yml on Linux, and the JavaScript integration tests
- # additionally require Node.
- - name: Run ParparVM clean-target build on Windows (clang-cl)
- working-directory: vm
- shell: pwsh
- run: |
- # Retried, in the same spirit as the Ninja install above: Maven Central
- # answers 429 Too Many Requests under load and the build dies during
- # dependency RESOLUTION, before a line of this project is compiled. Nothing
- # about the failure involves the code under test, and a fresh runner IP is
- # not something a re-run can be relied on to produce. Backoff is in tens of
- # seconds rather than the 5 used for the pip blip, because a rate limit needs
- # waiting out rather than retrying through.
- # Written in the same plain loop shape as the Ninja install above rather
- # than with a function and splatting, because that shape is already proven
- # on these runners and this is not the place to find out about a quoting
- # difference.
- # Five attempts out to five minutes rather than three out to ninety seconds: a run
- # that took all three still ended on "status code: 429, reason phrase: Too Many
- # Requests" two minutes after it started, which is a rate limit that had not lifted
- # yet rather than a blip. This step only downloads and builds, so waiting longer costs
- # time and cannot turn a failing test green.
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Maven records a download that failed as a *.lastUpdated marker and then
- # answers later resolutions from it instead of the network -- the "(absent)"
- # in "Could not transfer artifact ... (absent)". Left in place, every retry
- # below replays the first 403 offline and cannot succeed: one Central refusal
- # of org.junit:junit-bom took all five attempts and the job. And because
- # setup-java's cache: 'maven' restores ~/.m2 between runs, a marker can also
- # arrive from an earlier run, so this clears them before EVERY attempt, not
- # just the retries. A marker records only a failure, never an artifact, so
- # deleting one costs at most a repeated question to Central.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- mvn -B clean package -pl JavaAPI -am -DskipTests
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- }
- if (-not $ok) { throw "mvn clean package failed after all retries" }
- # This one RUNS TESTS, so the retry is restricted to the failure shape it
- # exists for. A blanket loop lets an intermittent product regression pass on
- # attempt two and turns a blocking gate green -- which is the opposite of what
- # a gate is for, and worse than the flake it was hiding.
- $resolutionFailure = 'status: (403|429|50[0-9])|Could not transfer artifact|Failed to read artifact descriptor|Unresolveable build extension|Non-resolvable import POM|Could not resolve dependencies|UnknownHostException|Could not resolve host|Temporary failure in name resolution'
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Clear Maven's cached resolution failures first; see the first retry loop above.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed on a dependency-resolution error; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- # Single-quote the -D args: PowerShell otherwise mangles the dotted
- # property name (splitting it at the '.').
- # Tee-Object keeps the log on the console AND gives us something to match.
- # GcForeignThreadIntegrationTest runs here because Windows is where most of what it
- # guards lives: no stop signal and no cross-thread stack bounds, so without the
- # suspend fallback every sweep was skipped. No other Windows job reaches it.
- mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest,GcForeignThreadIntegrationTest' '-Dsurefire.failIfNoSpecifiedTests=false' 2>&1 |
- Tee-Object -Variable mvnOutput
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- if (-not ($mvnOutput -match $resolutionFailure)) {
- throw "mvn test failed for a reason that is not a transient dependency-resolution error; not retrying"
- }
- }
- if (-not $ok) { throw "mvn test failed after all retries" }
- env:
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
- JDK_11_HOME: ${{ env.JDK_11_HOME }}
- JDK_17_HOME: ${{ env.JDK_17_HOME }}
- JDK_21_HOME: ${{ env.JDK_21_HOME }}
- JDK_25_HOME: ${{ env.JDK_25_HOME }}
-
- # Renders the native Windows port's UI headlessly and captures a PNG. This is
- # the GUI/screenshot signal for the port (the "softer" signal in the plan): it
- # builds codename1-core + the Windows port, translates a real Display/Form app
- # with the "windows" app type, links it with clang-cl, and runs it in headless
- # mode -- the app paints into an offscreen Direct2D/WIC bitmap (no window) and
- # writes a PNG. The PNG is uploaded as an artifact; the companion comment job
- # posts it to the PR. This x64 leg also publishes the compiled core + port
- # bytecode for the native arm64 leg (windows-port-screenshot-arm64). Pull
- # requests render review artifacts; master runs also produce the durable
- # Windows ARM64 compliance report consumed by the static Port Status page.
- # Separate from the clean-target gate so rendering failures are reported as
- # their own blocking check with dedicated diagnostics.
- windows-port-screenshot:
- needs: [golden-plan, unity-gallery]
- name: screenshot-capture (x64)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
- runs-on: windows-latest
- # 90 for the suite plus the ParparVM vs JDK 25 performance gate.
- timeout-minutes: 140
- steps:
- - name: Check out repository
- uses: actions/checkout@v4
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Set up MSVC environment
- uses: ilammy/msvc-dev-cmd@v1
- with:
- arch: amd64
-
- - name: Set up Ninja
- shell: pwsh
- run: |
- # Install Ninja from PyPI wheels rather than the gha-setup-ninja action,
- # whose GitHub-release download intermittently arrives corrupted ("No END
- # header found") and fails the toolchain setup. pip wheels exist for both
- # win_amd64 and win_arm64; retry to absorb transient network blips. The
- # console script lands on PATH (the runner's Python Scripts dir).
- $ok = $false
- for ($i = 1; $i -le 3; $i++) {
- python -m pip install --upgrade ninja
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- Write-Host "ninja install attempt $i failed; retrying..."
- Start-Sleep -Seconds 5
- }
- if (-not $ok) { throw "Failed to install Ninja after 3 attempts" }
- ninja --version
-
- # JDK 17 compiles the hellocodenameone-common Java (release 17). Set up first
- # so the JDK 8 below ends up the active JAVA_HOME.
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 path
- shell: pwsh
- run: echo "JDK_17_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
-
- # JDK 8 builds codename1-core (source/target 1.5), runs the Kotlin 1.6.0
- # compiler (it aborts on JDK 17+), and is the JDK the translator harness uses
- # (CompilerHelper auto-discovers JDK_8_HOME). Set up last so it stays active.
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 path
- shell: pwsh
- run: echo "JDK_8_HOME=$env:JAVA_HOME" >> $env:GITHUB_ENV
-
- # The Maven repository, restored from the NEAREST earlier run rather than an
- # exact match. setup-java's cache: 'maven' keys on the hash of every pom.xml
- # and restores nothing on a miss, so any change to a pom started this job
- # from an empty repository -- and Central rate-limits Windows runners hard:
- # one such run got 429 Too Many Requests on junit-bom through all five
- # attempts of the retry loop below, over ten minutes, before building
- # anything. A near match already holds almost every artifact, so the few new
- # ones are all that has to come from Central.
- - name: Maven repository cache
- uses: actions/cache@v4
- with:
- path: ~/.m2/repository
- key: maven-${{ runner.os }}-screenshot-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- maven-${{ runner.os }}-screenshot-
-
- # Install the locally-built artifacts the hellocodenameone Maven build needs:
- # codename1-core + the Windows port (translator inputs), the codenameone
- # maven plugin (runs transcode-svg / css / annotation processing during the
- # app build, '-am' also builds its svg-/lottie-transcoder + css-compiler
- # deps), and cn1-ads-mock (a common-module dependency). With these in the
- # local repo the sample resolves the 8.0-SNAPSHOT it pins and builds with the
- # plugin exactly like a fresh initializr project.
- - name: Build core + Windows port + CN1 maven plugin (JDK 8)
- working-directory: maven
- shell: pwsh
- # Single-quote the dotted -D arg: PowerShell otherwise splits it at the
- # dots and treats ".javadoc.skip=true" as a (bogus) lifecycle phase.
- #
- # Retried on the same backoff the clean-target job uses, and for the same
- # reason: a Maven Central fetch that resets the connection takes the whole
- # job down before a line of this repository's code has been compiled. It
- # reached the build EXTENSION here -- central-publishing-maven-plugin,
- # resolved while the POM is still being read -- so not even a module was
- # built. This step only downloads and builds, so a blanket loop cannot
- # turn a failing test green.
- run: |
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Clear Maven's cached resolution failures first; see the first retry loop above.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- mvn -B -pl windows,codenameone-maven-plugin,cn1-ads-mock,compose-compat,rive-runtime,backend,backend-test -am -DskipTests '-Dmaven.javadoc.skip=true' '-Plocal-dev-javase' install
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- }
- if (-not $ok) { throw "mvn install failed after all retries" }
-
- # 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: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
-
- # Build the hellocodenameone screenshot app into common/target/classes, which
- # the capture test translates into the native exe. This is a plain Maven build
- # of the sample on JDK 17 -- exactly what a fresh initializr project does -- so
- # the codenameone-maven-plugin runs transcode-svg (emitting the
- # GeneratedSVGImage classes + SVGRegistry), css, and annotation processing
- # automatically; nothing here is Windows-port specific. Kotlin 1.6.0 compiles
- # fine on JDK 17 (jvm-target 1.8 is the output bytecode level, not the runtime
- # JDK). The codename1 install bootstrap profile is gated on a missing
- # ~/.codenameone/guibuilder.jar -- we built the artifacts locally, so seed an
- # empty marker to skip that network step.
- - name: Build hellocodenameone-common (Maven, JDK 17)
- shell: pwsh
- env:
- JDK_17_HOME: ${{ env.JDK_17_HOME }}
- run: |
- $ErrorActionPreference = 'Stop'
- $env:JAVA_HOME = $env:JDK_17_HOME
- New-Item -ItemType Directory -Force "$env:USERPROFILE/.codenameone" | Out-Null
- if (!(Test-Path "$env:USERPROFILE/.codenameone/guibuilder.jar")) {
- New-Item -ItemType File -Force "$env:USERPROFILE/.codenameone/guibuilder.jar" | Out-Null
- }
- # Same retry as the port build above: this reaches Maven Central too.
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Clear Maven's cached resolution failures first; see the first retry loop above.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- mvn -B -f scripts/hellocodenameone/pom.xml -pl common -am install -DskipTests '-Dmaven.javadoc.skip=true'
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- }
- if (-not $ok) { throw "hellocodenameone-common Maven build failed after all retries" }
- $out = "scripts/hellocodenameone/common/target/classes"
- if (!(Test-Path "$out/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.class")) { throw "common classes missing" }
- if (!(Test-Path "$out/com/codename1/generated/svg/SVGRegistry.class")) { throw "transcode-svg did not produce SVGRegistry" }
- # The libraries the application ships (stage-translation-libs in its pom):
- # the capture test hands them to the translator as a source root.
- $libs = "scripts/hellocodenameone/common/target/translation-libs"
- if (!(Test-Path "$libs/com/codename1/ads/mock/MockAdProvider.class")) { throw "translation-libs has no mock ad provider" }
- if (!(Test-Path "$libs/com/codename1/unitycompat/unityengine/UnityRuntime.class")) { throw "translation-libs has no Unity runtime" }
-
- # Two paths, so the artifact is rooted at their common parent,
- # common/target -- which is where the arm64 leg restores it.
- - name: Upload hellocodenameone-common classes
- uses: ./.github/actions/upload-artifact-with-retry
- with:
- name: windows-port-common-classes
- path: |
- scripts/hellocodenameone/common/target/classes
- scripts/hellocodenameone/common/target/translation-libs
- if-no-files-found: error
- retention-days: 1
-
- # The CI test server (scripts/hellocodenameone/backend), which the suite
- # streams its screenshots to and drives its networking tests against. Built
- # once here as a runnable copy, against the runtime and plugin the install
- # above put in the local repository, and run with plain java by the capture
- # steps (CN1SS_SERVER_DIST) -- this x64 one and the arm64 leg, which has no
- # Maven repository of its own. Git Bash runs server.sh: a bare `bash` from a
- # JVM can resolve to WSL's instead.
- - name: Build the test server
- shell: bash
- env:
- CN1SS_BACKEND_SKIP_INSTALL: '1'
- JAVA17_HOME: ${{ env.JDK_17_HOME }}
- run: |
- scripts/hellocodenameone/backend/server.sh dist "$GITHUB_WORKSPACE/artifacts/cn1ss-server"
- test -f "$GITHUB_WORKSPACE/artifacts/cn1ss-server/classes/META-INF/cn1-backend-main"
-
- - name: Upload the test server
- uses: ./.github/actions/upload-artifact-with-retry
- with:
- name: windows-cn1ss-server
- path: artifacts/cn1ss-server
- if-no-files-found: error
- retention-days: 1
-
- # Publish the compiled (architecture-independent) core + port bytecode right
- # after building it, so the native arm64 screenshot leg can translate +
- # clang-cl-build an arm64 exe without rebuilding core -- codename1-core needs
- # JDK 8 (source/target 1.5), which Temurin does not publish for Windows/
- # aarch64. Uploaded before the capture step so an x64 capture flake does not
- # block the arm64 leg.
- - name: Upload compiled core + port classes
- uses: ./.github/actions/upload-artifact-with-retry
- with:
- name: windows-port-classes
- path: |
- maven/core/target/classes
- maven/windows/target/classes
- if-no-files-found: error
- retention-days: 1
-
- # Build the ParparVM JavaAPI, then run the FULL hellocodenameone screenshot
- # suite over the cn1ss WebSocket: capturesHelloSuiteOverWebSocket builds the
- # suite exe (app + core + port + nativeSources via clang-cl), starts the
- # cn1ss test server (scripts/hellocodenameone/backend), runs the exe (it renders each test Form offscreen
- # with Direct2D/DirectWrite and streams each PNG over com.codename1.io
- # WebSocket), waits for CN1SS:SUITE:FINISHED, and copies every received PNG
- # to CN1_SHOT_OUTPUT_DIR (~112 images). This is the CI equivalent of
- # scripts/windows/run-hello.bat.
- # Fetch the WebView2 SDK so buildHelloCodenameOneExe's CMake compiles the
- # native BrowserComponent peer (cn1_windows_browser.cpp) and links the
- # static loader. WEBVIEW2_SDK_DIR is exported for the capture step below.
- # The fetch script retries transient NuGet failures and fails after bounded
- # exhaustion. Building browser stubs would silently drop BrowserComponent
- # coverage, so an unavailable SDK must remain a blocking failure.
- - name: Fetch WebView2 SDK (for the BrowserComponent peer)
- shell: pwsh
- run: |
- & "${{ github.workspace }}\scripts\windows\fetch-webview2-sdk.ps1"
- if (!(Test-Path "C:\webview2sdk\pkg\build\native\include\WebView2.h")) {
- throw "WebView2 SDK header missing after successful fetch"
- }
- "WEBVIEW2_SDK_DIR=C:\webview2sdk\pkg\build\native" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
-
- - name: Build JavaAPI + capture screenshot suite over WebSocket
- working-directory: vm
- shell: pwsh
- env:
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
- CN1SS_SERVER_DIST: ${{ github.workspace }}\artifacts\cn1ss-server
- CN1_SHOT_OUTPUT_DIR: ${{ github.workspace }}\artifacts\windows-port\raw
- CN1_PERFORMANCE_BINARY_OUT: ${{ github.workspace }}\artifacts\windows-port\raw\benchmark-app.exe
- # The suite's own translation, replayed by the performance gate below.
- CN1_TRANSLATION_RECORD: ${{ github.workspace }}\artifacts\windows-port\raw\translation-record.jsonl
- CN1_REQUIRE_SUITE: ${{ github.event_name != 'pull_request' }}
- CN1_REQUIRE_PERFORMANCE: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
- run: |
- # Both retried the way the clean-target job does. The package is a
- # download-and-build, so a blanket loop is safe; the test is restricted
- # to the resolution failure shape, because a blanket loop there would
- # let an intermittent product regression pass on attempt two and turn a
- # blocking gate green.
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Clear Maven's cached resolution failures first; see the first retry loop above.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- mvn -B clean package -pl JavaAPI -am -DskipTests
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- }
- if (-not $ok) { throw "mvn clean package failed after all retries" }
- $resolutionFailure = 'status: (403|429|50[0-9])|Could not transfer artifact|Unresolveable build extension|Non-resolvable import POM|Could not resolve dependencies|UnknownHostException|Could not resolve host|Temporary failure in name resolution'
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Clear Maven's cached resolution failures first; see the first retry loop above.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed on a dependency-resolution error; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest#capturesHelloSuiteOverWebSocket' '-Dsurefire.failIfNoSpecifiedTests=false' 2>&1 |
- Tee-Object -Variable mvnOutput
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- if (-not ($mvnOutput -match $resolutionFailure)) {
- throw "mvn test failed for a reason that is not a transient dependency-resolution error; not retrying"
- }
- }
- if (-not $ok) { throw "mvn test failed after all retries" }
-
- # Preserve the native cn1WindowsLog output so the offscreen-capture path is
- # confirmable on the green x64 gate too (compare against the arm64 leg).
- - name: Collect native windows log (x64)
- if: ${{ !cancelled() }}
- shell: pwsh
- run: |
- New-Item -ItemType Directory -Force -Path artifacts/windows-port/raw | Out-Null
- $log = Join-Path $env:TEMP 'cn1windows.log'
- if (Test-Path $log) {
- Copy-Item $log artifacts/windows-port/raw/cn1windows-native.log -Force
- Write-Host "collected native log ($((Get-Item $log).Length) bytes)"
- } else {
- "no native cn1windows.log found at $log" | Out-File artifacts/windows-port/raw/cn1windows-native.log
- Write-Host "no native log at $log"
- }
-
- # ParparVM against JDK 25 on this runner: this job's own suite translation, the
- # translator translating itself, and every Bench workload. The table lands in this
- # arch's screenshot comment and the job's last step fails it on a regression.
- # JDK_8_HOME falls back to the job's JDK where there is no JDK 8 (arm64): the
- # builds only ask javac for -source/-target 1.8 against an explicit bootclasspath.
- - name: ParparVM vs JDK 25 (performance gate, x64)
- if: success() || failure()
- # Names this pull request's overlay (perf-baseline/pr/.json) in the
- # comment. A workflow_dispatch run carries no pull request, so the gate asks gh.
- env:
- GH_TOKEN: ${{ github.token }}
- shell: bash
- run: |
- export JDK_8_HOME="${JDK_8_HOME:-$JAVA_HOME}"
- vm/selfhost/ci-perf-gate.sh run windows-x64 artifacts/windows-port/raw/perf \
- --hello-workload "$(cygpath -m "$GITHUB_WORKSPACE/artifacts/windows-port/raw/translation-record.jsonl")" \
- --hello-app WinHelloMain
-
- - name: Upload screenshot artifact (x64)
- if: ${{ !cancelled() }}
- uses: ./.github/actions/upload-artifact-with-retry
- with:
- name: windows-port-screenshot-raw-x64
- path: artifacts/windows-port/raw
- if-no-files-found: warn
- retention-days: 14
-
- # Read by perf-baseline.yml's nightly tighten job, which lowers a baseline once
- # master has beaten it consistently, so a win cannot be given back unnoticed.
- - name: Upload the performance gate results
- if: success() || failure()
- uses: actions/upload-artifact@v4
- with:
- name: perf-results-windows-x64
- path: artifacts/windows-port/raw/perf/perf-results.json
- if-no-files-found: ignore
- retention-days: 14
-
- - name: Fail on a ParparVM performance regression (x64)
- # Not in a capture (cn1ss_capture): that run exists to render goldens,
- # and a timing gate failing it only marks the capture red.
- if: ${{ (success() || failure()) && inputs.cn1ss_capture == '' }}
- shell: bash
- run: vm/selfhost/ci-perf-gate.sh verdict artifacts/windows-port/raw/perf
-
- # Native arm64 leg of the screenshot capture: reuses the core + port bytecode
- # compiled by the x64 job (architecture-independent), then translates +
- # clang-cl-builds a native arm64 exe on the windows-11-arm runner and captures
- # the same Contacts UI over the cn1ss WebSocket. Failures are blocking on pull
- # requests and on master-report runs.
- windows-port-screenshot-arm64:
- name: screenshot-capture (arm64)
- needs: [golden-plan, windows-port-screenshot]
- # Runs when the x64 job FAILED too, not only when it passed: what this leg needs
- # from it (the compiled classes) is uploaded early, and the x64 job's last step is
- # the performance verdict. Requiring success let an x64 perf regression skip the
- # whole arm64 leg, its screenshots and its own perf gate included. An x64 failure
- # before the upload still fails here, at the download, with its own message.
- # Not in a golden capture: the x64 leg's rendering is the golden
- # (golden-capture.sh), and this leg is held to it by the normal run.
- if: >-
- needs.golden-plan.outputs.run == 'true' && inputs.cn1ss_capture == '' && (
- !cancelled() && needs.windows-port-screenshot.result != 'skipped' &&
- (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
- )
- runs-on: windows-11-arm
- # 60 for the suite plus the ParparVM vs JDK 25 performance gate.
- timeout-minutes: 110
- steps:
- - name: Check out repository
- uses: actions/checkout@v4
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Set up MSVC environment
- uses: ilammy/msvc-dev-cmd@v1
- with:
- arch: arm64
-
- - name: Set up Ninja
- shell: pwsh
- run: |
- # Install Ninja from PyPI wheels rather than the gha-setup-ninja action,
- # whose GitHub-release download intermittently arrives corrupted ("No END
- # header found") and fails the toolchain setup. pip wheels exist for both
- # win_amd64 and win_arm64; retry to absorb transient network blips. The
- # console script lands on PATH (the runner's Python Scripts dir).
- $ok = $false
- for ($i = 1; $i -le 3; $i++) {
- python -m pip install --upgrade ninja
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- Write-Host "ninja install attempt $i failed; retrying..."
- Start-Sleep -Seconds 5
- }
- if (-not $ok) { throw "Failed to install Ninja after 3 attempts" }
- ninja --version
-
- # Temurin publishes Windows/aarch64 from JDK 21; that JDK drives the
- # translator harness and builds the JavaAPI. Core + port come pre-compiled.
- # setup-java's archive extraction can crash PowerShell on ARM64.
- # Retry only setup; the final attempt and every build/test stay blocking.
- - name: Set up JDK 21
- id: jdk21
- continue-on-error: true
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '21'
- cache: 'maven'
- - name: Retry JDK 21 setup
- if: steps.jdk21.outcome == 'failure'
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '21'
- cache: 'maven'
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Restore compiled core + port classes
- uses: ./.github/actions/download-artifact-with-retry
- with:
- name: windows-port-classes
- path: maven
-
- # The Kotlin 1.6.0 compiler cannot run on this runner's JDK 21 (arm64 has no
- # Temurin JDK 8/11), so the hellocodenameone-common bytecode is built once on
- # the x64 leg and reused here (it is architecture-independent).
- - name: Restore the test server
- uses: ./.github/actions/download-artifact-with-retry
- with:
- name: windows-cn1ss-server
- path: artifacts/cn1ss-server
-
- - name: Restore hellocodenameone-common classes
- uses: ./.github/actions/download-artifact-with-retry
- with:
- name: windows-port-common-classes
- path: scripts/hellocodenameone/common/target
-
- # Fail loudly if the artifacts did not land where the test reads them --
- # otherwise the capture test would silently skip (assumeTrue) and post nothing.
- - name: Verify restored classes
- shell: pwsh
- run: |
- $core = "maven/core/target/classes/com/codename1/ui/Form.class"
- $port = "maven/windows/target/classes/com/codename1/impl/windows/WindowsImplementation.class"
- $common = "scripts/hellocodenameone/common/target/classes/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.class"
- if (!(Test-Path $core)) { Write-Error "core classes missing after download: $core"; exit 1 }
- if (!(Test-Path $port)) { Write-Error "port classes missing after download: $port"; exit 1 }
- if (!(Test-Path $common)) { Write-Error "common classes missing after download: $common"; exit 1 }
- $libs = "scripts/hellocodenameone/common/target/translation-libs"
- foreach ($lib in "com/codename1/ads/mock/MockAdProvider.class", "com/codename1/unitycompat/unityengine/UnityRuntime.class") {
- if (!(Test-Path "$libs/$lib")) { Write-Error "application libraries missing after download: $libs/$lib"; exit 1 }
- }
- Write-Host "Restored core + Windows port + common classes OK"
-
- # Fetch the WebView2 SDK so buildHelloCodenameOneExe's CMake compiles the
- # native BrowserComponent peer (cn1_windows_browser.cpp) and links the
- # static loader. WEBVIEW2_SDK_DIR is exported for the capture step below.
- # The fetch script retries transient NuGet failures and fails after bounded
- # exhaustion. Building browser stubs would silently drop BrowserComponent
- # coverage, so an unavailable SDK must remain a blocking failure.
- - name: Fetch WebView2 SDK (for the BrowserComponent peer)
- shell: pwsh
- run: |
- & "${{ github.workspace }}\scripts\windows\fetch-webview2-sdk.ps1"
- if (!(Test-Path "C:\webview2sdk\pkg\build\native\include\WebView2.h")) {
- throw "WebView2 SDK header missing after successful fetch"
- }
- "WEBVIEW2_SDK_DIR=C:\webview2sdk\pkg\build\native" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
-
- - name: Build JavaAPI + capture screenshot suite over WebSocket
- working-directory: vm
- shell: pwsh
- env:
- CN1SS_SERVER_DIST: ${{ github.workspace }}\artifacts\cn1ss-server
- CN1_SHOT_OUTPUT_DIR: ${{ github.workspace }}\artifacts\windows-port\raw
- CN1_PERFORMANCE_BINARY_OUT: ${{ github.workspace }}\artifacts\windows-port\raw\benchmark-app.exe
- # The suite's own translation, replayed by the performance gate below.
- CN1_TRANSLATION_RECORD: ${{ github.workspace }}\artifacts\windows-port\raw\translation-record.jsonl
- CN1_REQUIRE_PERFORMANCE: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
- # Master reports must include the non-rendering tail of the suite too.
- # PR screenshot jobs may still stop after the visual set stabilizes.
- CN1_REQUIRE_SUITE: ${{ github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
- run: |
- # Both retried the way the clean-target job does. The package is a
- # download-and-build, so a blanket loop is safe; the test is restricted
- # to the resolution failure shape, because a blanket loop there would
- # let an intermittent product regression pass on attempt two and turn a
- # blocking gate green.
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Clear Maven's cached resolution failures first; see the first retry loop above.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- mvn -B clean package -pl JavaAPI -am -DskipTests
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- }
- if (-not $ok) { throw "mvn clean package failed after all retries" }
- $resolutionFailure = 'status: (403|429|50[0-9])|Could not transfer artifact|Unresolveable build extension|Non-resolvable import POM|Could not resolve dependencies|UnknownHostException|Could not resolve host|Temporary failure in name resolution'
- $ok = $false
- foreach ($delay in 0, 30, 90, 180, 300) {
- # Clear Maven's cached resolution failures first; see the first retry loop above.
- Get-ChildItem -Path "$env:USERPROFILE\.m2\repository" -Recurse -File -Filter '*.lastUpdated' -ErrorAction SilentlyContinue |
- Remove-Item -Force -ErrorAction SilentlyContinue
- if ($delay -gt 0) {
- Write-Host "mvn failed on a dependency-resolution error; retrying in $delay s..."
- Start-Sleep -Seconds $delay
- }
- mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest#capturesHelloSuiteOverWebSocket' '-Dsurefire.failIfNoSpecifiedTests=false' 2>&1 |
- Tee-Object -Variable mvnOutput
- if ($LASTEXITCODE -eq 0) { $ok = $true; break }
- if (-not ($mvnOutput -match $resolutionFailure)) {
- throw "mvn test failed for a reason that is not a transient dependency-resolution error; not retrying"
- }
- }
- if (-not $ok) { throw "mvn test failed after all retries" }
-
- # Preserve the native cn1WindowsLog output (%TEMP%\cn1windows.log) so an
- # offscreen-target / capture failure is diagnosable from the artifact, and
- # so the raw dir is never empty (the arm64 artifact would otherwise not be
- # produced when the suite stalls before writing any PNG).
- - name: Collect native windows log (arm64)
- if: ${{ !cancelled() }}
- shell: pwsh
- run: |
- New-Item -ItemType Directory -Force -Path artifacts/windows-port/raw | Out-Null
- $log = Join-Path $env:TEMP 'cn1windows.log'
- if (Test-Path $log) {
- Copy-Item $log artifacts/windows-port/raw/cn1windows-native.log -Force
- Write-Host "collected native log ($((Get-Item $log).Length) bytes)"
- } else {
- "no native cn1windows.log found at $log" | Out-File artifacts/windows-port/raw/cn1windows-native.log
- Write-Host "no native log at $log"
- }
-
- # ParparVM against JDK 25 on this runner: this job's own suite translation, the
- # translator translating itself, and every Bench workload. The table lands in this
- # arch's screenshot comment and the job's last step fails it on a regression.
- # JDK_8_HOME falls back to the job's JDK where there is no JDK 8 (arm64): the
- # builds only ask javac for -source/-target 1.8 against an explicit bootclasspath.
- - name: ParparVM vs JDK 25 (performance gate, arm64)
- if: success() || failure()
- # Names this pull request's overlay (perf-baseline/pr/.json) in the
- # comment. A workflow_dispatch run carries no pull request, so the gate asks gh.
- env:
- GH_TOKEN: ${{ github.token }}
- shell: bash
- run: |
- export JDK_8_HOME="${JDK_8_HOME:-$JAVA_HOME}"
- vm/selfhost/ci-perf-gate.sh run windows-arm64 artifacts/windows-port/raw/perf \
- --hello-workload "$(cygpath -m "$GITHUB_WORKSPACE/artifacts/windows-port/raw/translation-record.jsonl")" \
- --hello-app WinHelloMain
-
- - name: Upload screenshot artifact (arm64)
- if: ${{ !cancelled() }}
- uses: ./.github/actions/upload-artifact-with-retry
- with:
- name: windows-port-screenshot-raw-arm64
- path: artifacts/windows-port/raw
- if-no-files-found: warn
- retention-days: 14
-
- # Read by perf-baseline.yml's nightly tighten job, which lowers a baseline once
- # master has beaten it consistently, so a win cannot be given back unnoticed.
- - name: Upload the performance gate results
- if: success() || failure()
- uses: actions/upload-artifact@v4
- with:
- name: perf-results-windows-arm64
- path: artifacts/windows-port/raw/perf/perf-results.json
- if-no-files-found: ignore
- retention-days: 14
-
- - name: Fail on a ParparVM performance regression (arm64)
- # Not in a capture (cn1ss_capture): that run exists to render goldens,
- # and a timing gate failing it only marks the capture red.
- if: ${{ (success() || failure()) && inputs.cn1ss_capture == '' }}
- shell: bash
- run: vm/selfhost/ci-perf-gate.sh verdict artifacts/windows-port/raw/perf
-
- # Per-architecture PR comments. x64 (Intel/AMD) and arm64 (Apple Silicon / Arm)
- # post SEPARATE comments with DISTINCT markers, each depending only on its own
- # screenshot leg -- so a failure or re-run in one architecture's pipeline never
- # overrides or hides the other's result (the previous single combined comment
- # showed only x64 and was skipped entirely if the x64 leg failed). Each comment
- # carries that arch's own benchmark table (SSE2 on x64, NEON on arm64).
- windows-port-screenshot-comment-x64:
- name: screenshot-comment (x64)
- needs: [golden-plan, windows-port-screenshot]
- if: >-
- needs.golden-plan.outputs.run == 'true' && (
- !cancelled() &&
- needs.windows-port-screenshot.result != 'cancelled' &&
- needs.windows-port-screenshot.result != 'skipped' &&
- (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
- )
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- pull-requests: write
- issues: write
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- steps:
- - name: Check out repository
- uses: actions/checkout@v4
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Download x64 screenshot artifact
- uses: ./.github/actions/download-artifact-with-retry
- with:
- name: windows-port-screenshot-raw-x64
- path: artifacts/windows-port/raw
- - name: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
-
- - name: Post x64 screenshots to PR
- shell: bash
- env:
- CN1SS_COMMENT_MARKER: ''
- # This arch's ParparVM vs JDK 25 table, measured by its capture job.
- CN1SS_EXTRA_MARKDOWN: artifacts/windows-port/raw/perf/perf-comment.md
- CN1SS_COMMENT_LOG_PREFIX: '[windows-native-port x64]'
- CN1SS_PREVIEW_SUBDIR: 'windows-native-x64'
- CN1SS_SUCCESS_MESSAGE: 'Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.'
- run: |
- set -e
- ART="artifacts/windows-port"
- entries=()
- if [ -d "$ART/raw" ]; then
- for f in "$ART"/raw/*.png; do
- [ -f "$f" ] || continue
- entries+=("$(basename "$f" .png)=$f")
- done
- fi
- # Empty captures must produce not-run evidence and fail the gate.
- mkdir -p "$ART"
- echo "Posting ${#entries[@]} x64 screenshot(s)"
- mkdir -p "$ART/previews"
- cp -f "$ART"/raw/windows-benchmark-stats.txt "$ART/" 2>/dev/null || true
- source scripts/lib/cn1ss.sh
- cn1ss_setup "$JAVA_HOME/bin/java" "$(pwd)/scripts/common/java"
- REF_DIR="$(pwd)/scripts/windows/screenshots"
- # Gate the Windows port like the Linux one: fail on any mismatch/error or
- # a new screenshot with no committed golden (missing_expected). Without
- # this the comparison only posted a PR comment and stale goldens slipped
- # through green CI (the picker case-conversion refresh was missed here).
- export CN1SS_FAIL_ON_MISMATCH=1
- export CN1SS_ALLOWED_MISSING=0
- # PR capture may stop after the visual set; durable reports require the full suite.
- if [ "${{ github.event_name }}" != "pull_request" ] || [ ${#entries[@]} -eq 0 ]; then
- export CN1SS_FAIL_ON_TEST_PROBLEMS=1
- fi
- export CN1SS_PORT_ID=windows-x64
- export CN1SS_BINARY_PATH="$ART/raw/benchmark-app.exe"
- export CN1SS_SUITE_LOG="$ART/raw/app-output.log"
- if [ "${{ github.event_name }}" != "pull_request" ]; then export CN1SS_SKIP_COMMENT=1; fi
- set +e
- cn1ss_process_and_report \
- "Native Windows port (x64)" \
- "$ART/compare.json" "$ART/summary.txt" "$ART/comment.md" \
- "$REF_DIR" "$ART/previews" "$ART" \
- "${entries[@]}"
- gate_rc=$?
- set -e
- fail=0
- if [ "$gate_rc" -ne 0 ]; then
- echo "[windows-native-port x64] FATAL: screenshot gate failed (rc=$gate_rc)"; fail=1
- fi
- if [ -f "$ART/summary.txt" ] && grep -q "^missing_expected|" "$ART/summary.txt"; then
- me="$(grep -c "^missing_expected|" "$ART/summary.txt" || echo 0)"
- echo "[windows-native-port x64] FATAL: $me screenshot(s) streamed with no stored golden (missing_expected) -- add them to $REF_DIR."; fail=1
- fi
- if [ "$fail" -ne 0 ]; then echo "Windows x64 screenshot gate failed."; exit 1; fi
-
- # windows-cross-build-run.yml owns the public windows-x64 report. Keep
- # native-build diagnostics out of the publisher/backfill port-status-*
- # selection so a green native run cannot hide a shipping-pipeline failure.
- - name: Upload Windows native x64 diagnostics
- if: ${{ !cancelled() }}
- uses: ./.github/actions/upload-artifact-with-retry
- with:
- name: windows-native-x64-diagnostics
- path: artifacts/windows-port/port-status-windows-x64.json
- # A capture (cn1ss_capture) renders goldens and writes no port
- # status; requiring the file failed every capture's comment job.
- if-no-files-found: ${{ inputs.cn1ss_capture != '' && 'ignore' || 'error' }}
- retention-days: 14
-
- - name: Upload golden capture
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: cn1ss-capture-windows-x64
- path: artifacts/cn1ss-capture
- if-no-files-found: ignore
-
- windows-port-screenshot-comment-arm64:
- name: screenshot-comment (arm64)
- needs: [golden-plan, windows-port-screenshot-arm64]
- # The capture job uploads its raw evidence with if: ${{ !cancelled() }}. Normalize it
- # even when capture failed so diagnostics remain available. The failed
- # capture still remains a blocking red check.
- if: >-
- needs.golden-plan.outputs.run == 'true' && (
- !cancelled() &&
- needs.windows-port-screenshot-arm64.result != 'cancelled' &&
- needs.windows-port-screenshot-arm64.result != 'skipped' &&
- (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
- )
- runs-on: ubuntu-24.04
- permissions:
- contents: read
- pull-requests: write
- issues: write
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- steps:
- - name: Check out repository
- uses: actions/checkout@v4
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Download arm64 screenshot artifact
- uses: ./.github/actions/download-artifact-with-retry
- with:
- name: windows-port-screenshot-raw-arm64
- path: artifacts/windows-port/raw
- - name: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
-
- - name: Post arm64 screenshots to PR
- shell: bash
- env:
- CN1SS_COMMENT_MARKER: ''
- # This arch's ParparVM vs JDK 25 table, measured by its capture job.
- CN1SS_EXTRA_MARKDOWN: artifacts/windows-port/raw/perf/perf-comment.md
- CN1SS_COMMENT_LOG_PREFIX: '[windows-native-port arm64]'
- CN1SS_PREVIEW_SUBDIR: 'windows-native-arm64'
- CN1SS_SUCCESS_MESSAGE: 'Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.'
- run: |
- set -e
- ART="artifacts/windows-port"
- entries=()
- if [ -d "$ART/raw" ]; then
- for f in "$ART"/raw/*.png; do
- [ -f "$f" ] || continue
- entries+=("$(basename "$f" .png)=$f")
- done
- fi
- # Empty captures must produce not-run evidence and fail the gate.
- mkdir -p "$ART"
- echo "Posting ${#entries[@]} arm64 screenshot(s)"
- mkdir -p "$ART/previews"
- cp -f "$ART"/raw/windows-benchmark-stats.txt "$ART/" 2>/dev/null || true
- source scripts/lib/cn1ss.sh
- cn1ss_setup "$JAVA_HOME/bin/java" "$(pwd)/scripts/common/java"
- REF_DIR="$(pwd)/scripts/windows/screenshots"
- # Same blocking gate as the x64 leg.
- export CN1SS_FAIL_ON_MISMATCH=1
- export CN1SS_ALLOWED_MISSING=0
- # PR capture may stop after the visual set; durable reports require the full suite.
- if [ "${{ github.event_name }}" != "pull_request" ] || [ ${#entries[@]} -eq 0 ]; then
- export CN1SS_FAIL_ON_TEST_PROBLEMS=1
- fi
- export CN1SS_PORT_ID=windows-arm64
- export CN1SS_BINARY_PATH="$ART/raw/benchmark-app.exe"
- export CN1SS_SUITE_LOG="$ART/raw/app-output.log"
- if [ "${{ github.event_name }}" != "pull_request" ]; then export CN1SS_SKIP_COMMENT=1; fi
- set +e
- cn1ss_process_and_report \
- "Native Windows port (arm64)" \
- "$ART/compare.json" "$ART/summary.txt" "$ART/comment.md" \
- "$REF_DIR" "$ART/previews" "$ART" \
- "${entries[@]}"
- gate_rc=$?
- set -e
- fail=0
- if [ "$gate_rc" -ne 0 ]; then
- echo "[windows-native-port arm64] FATAL: screenshot gate failed (rc=$gate_rc)"; fail=1
- fi
- if [ -f "$ART/summary.txt" ] && grep -q "^missing_expected|" "$ART/summary.txt"; then
- me="$(grep -c "^missing_expected|" "$ART/summary.txt" || echo 0)"
- echo "[windows-native-port arm64] FATAL: $me screenshot(s) streamed with no stored golden (missing_expected) -- add them to $REF_DIR."; fail=1
- fi
- if [ "$fail" -ne 0 ]; then echo "Windows arm64 screenshot gate failed."; exit 1; fi
-
- - name: Upload Windows ARM64 port status
- if: ${{ !cancelled() }}
- uses: ./.github/actions/upload-artifact-with-retry
- with:
- name: port-status-windows-arm64
- path: artifacts/windows-port/port-status-windows-arm64.json
- # A capture (cn1ss_capture) renders goldens and writes no port
- # status; requiring the file failed every capture's comment job.
- if-no-files-found: ${{ inputs.cn1ss_capture != '' && 'ignore' || 'error' }}
- retention-days: 14
-
- - name: Upload golden capture
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: cn1ss-capture-windows-arm64
- path: artifacts/cn1ss-capture
- if-no-files-found: ignore
-
- # Widgets Board provider compile check: compiles the one nativeSources TU no
- # other CI leg ever compiles -- cn1_windows_widgetboard.cpp, which is gated
- # behind CN1_WIDGETBOARD (the default CMake build never defines it and the
- # Linux xwin cross leg has no Windows App SDK) -- against the real Windows App
- # SDK winmds + cppwinrt-generated C++/WinRT projections on a Windows host.
- # This mirrors exactly what WindowsNativeBuilder does for windows.msix=true
- # builds: clang-cl (the port is clang-cl-only by design -- cn1_globals.h uses
- # `_Atomic` and `__thread`, which MSVC cl.exe rejects in C++ -- and the
- # builder sets CMAKE_CXX_COMPILER to clang-cl on Windows hosts and cross
- # builds alike), /std:c++17 (the translator-emitted CMAKE_CXX_STANDARD),
- # /EHsc (C++/WinRT requires exceptions) and /DCN1_WIDGETBOARD=1 plus the
- # WinAppSDK include dir. The same step also re-compiles
- # cn1_windows_widgets.cpp (the plain-exe floating-widget TU) with the
- # Windows-host toolchain as a second real-compiler check beyond the Linux
- # xwin leg. Compile-only (/c): any compile error fails the job.
- widgetboard-compile-check:
- needs: golden-plan
- # Not a screenshot suite: a golden capture skips it.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (inputs.cn1ss_capture == '') }}
- name: widgetboard-compile-check (x64)
- runs-on: windows-latest
- timeout-minutes: 20
- steps:
- - name: Check out repository
- uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # clang-cl uses the MSVC STL/CRT headers and the Windows SDK, which reach
- # the compiler through the INCLUDE/LIB environment vcvarsall sets up.
- - name: Set up MSVC environment
- uses: ilammy/msvc-dev-cmd@v1
- with:
- arch: amd64
-
- # The Microsoft.WindowsAppSDK nupkg ships winmd metadata + MddBootstrap.h
- # but NO prebuilt C++/WinRT headers, so the projection (winrt/base.h, the
- # referenced Windows.* namespaces from the OS metadata, and
- # winrt/Microsoft.Windows.Widgets[.Providers].h) is generated with
- # cppwinrt.exe. Versions are pinned for reproducibility: the 1.5 servicing
- # release matches the 1.5 series the provider bootstraps at runtime
- # (CN1_WINAPPSDK_MAJORMINOR 0x00010005 in the TU). nuget.exe is
- # preinstalled on the windows runners.
- - name: Fetch Windows App SDK + generate C++/WinRT projections
- shell: pwsh
- run: |
- $ErrorActionPreference = 'Stop'
- $wasdkVer = '1.5.250108004'
- $cppwinrtVer = '2.0.240405.15'
- nuget install Microsoft.WindowsAppSDK -Version $wasdkVer -OutputDirectory nupkgs -NonInteractive
- if ($LASTEXITCODE -ne 0) { throw "nuget install Microsoft.WindowsAppSDK failed" }
- nuget install Microsoft.Windows.CppWinRT -Version $cppwinrtVer -OutputDirectory nupkgs -NonInteractive
- if ($LASTEXITCODE -ne 0) { throw "nuget install Microsoft.Windows.CppWinRT failed" }
- $wasdk = "nupkgs/Microsoft.WindowsAppSDK.$wasdkVer"
- $cppwinrt = "nupkgs/Microsoft.Windows.CppWinRT.$cppwinrtVer/bin/cppwinrt.exe"
- # -in local merges the OS metadata (C:\Windows\System32\WinMetadata)
- # so the Windows.Foundation types the Widgets winmd references are
- # projected by the same cppwinrt version (mixing SDK-shipped headers
- # with a different generator version trips base.h's version check).
- & $cppwinrt -in "$wasdk/lib/uap10.0/Microsoft.Windows.Widgets.winmd" -in local -output winrt-gen
- if ($LASTEXITCODE -ne 0) { throw "cppwinrt projection generation failed" }
- if (!(Test-Path 'winrt-gen/winrt/Microsoft.Windows.Widgets.Providers.h')) {
- throw "cppwinrt did not produce winrt/Microsoft.Windows.Widgets.Providers.h"
- }
- "CN1_WASDK_DIR=$wasdk" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
-
- - name: Widgets Board provider compile check (clang-cl)
- shell: pwsh
- run: |
- $ErrorActionPreference = 'Stop'
- clang-cl --version
- # The runner's clang-cl is the standalone LLVM on PATH, not one matched
- # to the image's MSVC STL. Image 20261116 moved the STL to 14.52, which
- # refuses any clang older than 22 (STL1000) while the runner ships 20, so
- # the check is a statement about the image, not about these sources. The
- # STL's own escape hatch turns it off; a real incompatibility still fails
- # the compile on the line that uses it.
- $mismatch = '/D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH'
- # The widgetboard TU deliberately avoids the cn1 headers (cn1_globals.h's
- # C11 stdatomic conflicts with the C++ the winrt headers pull) and
- # compiles at C++20: C++/WinRT at C++17 falls back to
- # , which the modern MSVC STL rejects under clang
- # (STL1009). This mirrors the -DCMAKE_CXX_STANDARD=20 WindowsNativeBuilder
- # passes for windows.msix=true builds.
- clang-cl /c /std:c++20 /EHsc $mismatch /DCN1_WIDGETBOARD=1 /Iwinrt-gen "/I$env:CN1_WASDK_DIR/include" `
- Ports/WindowsPort/nativeSources/cn1_windows_widgetboard.cpp /Fowidgetboard.obj
- if ($LASTEXITCODE -ne 0) { throw "cn1_windows_widgetboard.cpp failed to compile with CN1_WIDGETBOARD=1" }
- # A translated app supplies the generated cn1_class_method_index.h; the
- # floating-widget TU includes cn1_windows.h -> cn1_globals.h, which only
- # needs this one constant from it here.
- New-Item -ItemType Directory -Force stub-index | Out-Null
- "#define cn1_array_start_offset 1000" | Set-Content stub-index/cn1_class_method_index.h -Encoding ascii
- clang-cl /c /std:c++17 /EHsc $mismatch /Istub-index /Ivm/ByteCodeTranslator/src `
- Ports/WindowsPort/nativeSources/cn1_windows_widgets.cpp /Fowidgets.obj
- if ($LASTEXITCODE -ne 0) { throw "cn1_windows_widgets.cpp failed to compile" }
- Write-Host "Widgets Board provider + floating-widget TUs compiled clean."
diff --git a/.github/workflows/parparvm-tests.yml b/.github/workflows/parparvm-tests.yml
deleted file mode 100644
index fddd50b3072..00000000000
--- a/.github/workflows/parparvm-tests.yml
+++ /dev/null
@@ -1,1031 +0,0 @@
-name: ParparVM Java Tests
-
-on:
- pull_request:
- paths:
- - 'scripts/ci/retry.sh'
- - '.github/workflows/parparvm-tests.yml'
- - 'scripts/ci/start-sqlserver-strict.sh'
- - 'vm/**'
- - 'Ports/JavaScriptPort/**'
- # GpuBlendContractTest reads each GPU backend's blend factors out of its
- # source; a change to one of these alone must still run it.
- - 'Ports/LinuxPort/nativeSources/cn1_linux_gl.c'
- - 'Ports/iOSPort/nativeSources/CN1GL3D.m'
- - 'Ports/WindowsPort/nativeSources/cn1_windows_d3d.cpp'
- - 'Ports/Android/src/com/codename1/impl/android/AndroidGraphicsDevice.java'
- - 'Ports/JavaSE/src/com/codename1/impl/javase/JavaSEGLDevice.java'
- # NativeFontStyleContractTest compiles the function that reads a native:
- # font name out of each of these and reads where the style goes.
- - 'Ports/LinuxPort/nativeSources/cn1_linux_text.c'
- - 'Ports/WindowsPort/nativeSources/cn1_windows_text.c'
- # The GENERATOR, because the translated backend tests run what it writes:
- # a change to the @Entity processor or BackendPackageMojo alone reaches
- # PostgreSQL and MySQL through the daos it generates, and this is the only
- # matrix that stands those servers up. maven/backend has no source of its
- # own -- it compiles vm/backend/src, which 'vm/**' already covers, plus the
- # shared core classes listed below -- but its pom decides what the install
- # step below produces.
- #
- # NOT maven/core: the contract compiles against it, so a core change can
- # break this matrix, but almost every PR touches core and this is a long
- # job. The translated tests in pr.yml catch a core break first.
- - 'maven/codenameone-maven-plugin/**'
- - 'maven/build-engine/**'
- - 'maven/project-model/**'
- - 'maven/backend/**'
- - 'maven/backend-test/**'
- # The Python SQLAlchemy step runs these against the PostgreSQL service.
- - 'maven/python-runtime/**'
- - 'maven/python-transpiler/**'
- - 'scripts/python-backend/sqlalchemy-realdb-test.sh'
- - 'scripts/python-backend/build.sh'
- - 'scripts/python-backend/e2e-test.sh'
- - 'scripts/python-backend/e2e_client.py'
- - 'scripts/python-backend/samples/**'
- # sqlalchemy-realdb-test.sh compiles the host file system shims from here.
- - 'scripts/python-bench/hostfs/**'
- - 'scripts/hellocodenameone/pom.xml'
- - 'scripts/hellocodenameone/backend/**'
- # The core classes the backend compiles as its own (the ORM and the entity
- # annotations, marked @SharedWithBackend and listed by
- # vm/backend/shared-sources.sh). They have no copy under vm/ any more, so
- # 'vm/**' no longer sees a change to them. A path filter cannot read the
- # marker; a class marked outside these directories needs its path here.
- - 'CodenameOne/src/com/codename1/impl/SharedWithBackend.java'
- - 'CodenameOne/src/com/codename1/impl/orm/**'
- - 'CodenameOne/src/com/codename1/db/sql/**'
- - 'CodenameOne/src/com/codename1/hardware/**'
- - 'CodenameOne/src/com/codename1/realtime/**'
- - 'CodenameOne/src/com/codename1/qrcode/QrCode.java'
- - 'CodenameOne/src/com/codename1/impl/office/Snappy.java'
- - 'CodenameOne/src/com/codename1/impl/MdnsEngine.java'
- - 'CodenameOne/src/com/codename1/util/regex/**'
- - 'CodenameOne/src/com/codename1/pdf/**'
- - 'CodenameOne/src/com/codename1/impl/pdf/**'
- - 'CodenameOne/src/com/codename1/xml/**'
- - 'CodenameOne/src/com/codename1/orm/session/**'
- - 'CodenameOne/src/com/codename1/orm/repository/**'
- - 'CodenameOne/src/com/codename1/annotations/db/**'
- - 'CodenameOne/src/com/codename1/annotations/Entity.java'
- - 'CodenameOne/src/com/codename1/annotations/Id.java'
- - 'CodenameOne/src/com/codename1/annotations/Column.java'
- - 'CodenameOne/src/com/codename1/annotations/DbTransient.java'
- - 'CodenameOne/src/com/codename1/annotations/JsonIgnore.java'
- - 'CodenameOne/src/com/codename1/annotations/JsonProperty.java'
- - 'CodenameOne/src/com/codename1/io/gzip/**'
- - 'CodenameOne/src/com/codename1/io/outbox/**'
- - 'CodenameOne/src/com/codename1/io/JSONParser.java'
- - 'CodenameOne/src/com/codename1/io/PrettyPrinter.java'
- - 'CodenameOne/src/com/codename1/io/JSONParseCallback.java'
- - 'CodenameOne/src/com/codename1/io/JSONSanitizer.java'
- - 'CodenameOne/src/com/codename1/io/CharArrayReader.java'
- - 'CodenameOne/src/com/codename1/util/BigInteger.java'
- - 'CodenameOne/src/com/codename1/util/MathUtil.java'
- - 'CodenameOne/src/com/codename1/util/TBigInteger.java'
- - 'CodenameOne/src/com/codename1/util/TBitLevel.java'
- - 'CodenameOne/src/com/codename1/util/TConversion.java'
- - 'CodenameOne/src/com/codename1/util/TDivision.java'
- - 'CodenameOne/src/com/codename1/util/TElementary.java'
- - 'CodenameOne/src/com/codename1/util/TLogical.java'
- - 'CodenameOne/src/com/codename1/util/TMultiplication.java'
- - 'CodenameOne/src/com/codename1/util/TPrimality.java'
- - 'CodenameOne/src/com/codename1/migration/**'
- - 'CodenameOne/src/com/codename1/impl/migration/**'
- - 'CodenameOne/src/com/codename1/security/Hash.java'
- - 'CodenameOne/src/com/codename1/security/Hmac.java'
- - 'CodenameOne/src/com/codename1/security/MessageDigestImpl.java'
- - 'CodenameOne/src/com/codename1/security/Secp256k1.java'
- - 'CodenameOne/src/com/codename1/security/Otp.java'
- - 'CodenameOne/src/com/codename1/security/Base32.java'
- - 'CodenameOne/src/com/codename1/security/CryptoException.java'
- - 'CodenameOne/src/com/codename1/security/**'
- - 'CodenameOne/src/com/codename1/crypto/**'
- - '!vm/**/README.md'
- - '!vm/**/readme.md'
- - '!vm/**/docs/**'
- push:
- branches: [ master, main ]
- paths:
- - 'scripts/ci/retry.sh'
- - '.github/workflows/parparvm-tests.yml'
- - 'scripts/ci/start-sqlserver-strict.sh'
- - 'vm/**'
- - 'Ports/JavaScriptPort/**'
- # GpuBlendContractTest reads each GPU backend's blend factors out of its
- # source; a change to one of these alone must still run it.
- - 'Ports/LinuxPort/nativeSources/cn1_linux_gl.c'
- - 'Ports/iOSPort/nativeSources/CN1GL3D.m'
- - 'Ports/WindowsPort/nativeSources/cn1_windows_d3d.cpp'
- - 'Ports/Android/src/com/codename1/impl/android/AndroidGraphicsDevice.java'
- - 'Ports/JavaSE/src/com/codename1/impl/javase/JavaSEGLDevice.java'
- # NativeFontStyleContractTest compiles the function that reads a native:
- # font name out of each of these and reads where the style goes.
- - 'Ports/LinuxPort/nativeSources/cn1_linux_text.c'
- - 'Ports/WindowsPort/nativeSources/cn1_windows_text.c'
- # The GENERATOR, because the translated backend tests run what it writes:
- # a change to the @Entity processor or BackendPackageMojo alone reaches
- # PostgreSQL and MySQL through the daos it generates, and this is the only
- # matrix that stands those servers up. maven/backend has no source of its
- # own -- it compiles vm/backend/src, which 'vm/**' already covers, plus the
- # shared core classes listed below -- but its pom decides what the install
- # step below produces.
- #
- # NOT maven/core: the contract compiles against it, so a core change can
- # break this matrix, but almost every PR touches core and this is a long
- # job. The translated tests in pr.yml catch a core break first.
- - 'maven/codenameone-maven-plugin/**'
- - 'maven/build-engine/**'
- - 'maven/project-model/**'
- - 'maven/backend/**'
- - 'maven/backend-test/**'
- # The Python SQLAlchemy step runs these against the PostgreSQL service.
- - 'maven/python-runtime/**'
- - 'maven/python-transpiler/**'
- - 'scripts/python-backend/sqlalchemy-realdb-test.sh'
- - 'scripts/python-backend/build.sh'
- - 'scripts/python-backend/e2e-test.sh'
- - 'scripts/python-backend/e2e_client.py'
- - 'scripts/python-backend/samples/**'
- # sqlalchemy-realdb-test.sh compiles the host file system shims from here.
- - 'scripts/python-bench/hostfs/**'
- - 'scripts/hellocodenameone/pom.xml'
- - 'scripts/hellocodenameone/backend/**'
- # The core classes the backend compiles as its own (the ORM and the entity
- # annotations, marked @SharedWithBackend and listed by
- # vm/backend/shared-sources.sh). They have no copy under vm/ any more, so
- # 'vm/**' no longer sees a change to them. A path filter cannot read the
- # marker; a class marked outside these directories needs its path here.
- - 'CodenameOne/src/com/codename1/impl/SharedWithBackend.java'
- - 'CodenameOne/src/com/codename1/impl/orm/**'
- - 'CodenameOne/src/com/codename1/db/sql/**'
- - 'CodenameOne/src/com/codename1/hardware/**'
- - 'CodenameOne/src/com/codename1/realtime/**'
- - 'CodenameOne/src/com/codename1/qrcode/QrCode.java'
- - 'CodenameOne/src/com/codename1/impl/office/Snappy.java'
- - 'CodenameOne/src/com/codename1/impl/MdnsEngine.java'
- - 'CodenameOne/src/com/codename1/util/regex/**'
- - 'CodenameOne/src/com/codename1/pdf/**'
- - 'CodenameOne/src/com/codename1/impl/pdf/**'
- - 'CodenameOne/src/com/codename1/xml/**'
- - 'CodenameOne/src/com/codename1/orm/session/**'
- - 'CodenameOne/src/com/codename1/orm/repository/**'
- - 'CodenameOne/src/com/codename1/annotations/db/**'
- - 'CodenameOne/src/com/codename1/annotations/Entity.java'
- - 'CodenameOne/src/com/codename1/annotations/Id.java'
- - 'CodenameOne/src/com/codename1/annotations/Column.java'
- - 'CodenameOne/src/com/codename1/annotations/DbTransient.java'
- - 'CodenameOne/src/com/codename1/annotations/JsonIgnore.java'
- - 'CodenameOne/src/com/codename1/annotations/JsonProperty.java'
- - 'CodenameOne/src/com/codename1/io/gzip/**'
- - 'CodenameOne/src/com/codename1/io/outbox/**'
- - 'CodenameOne/src/com/codename1/io/JSONParser.java'
- - 'CodenameOne/src/com/codename1/io/PrettyPrinter.java'
- - 'CodenameOne/src/com/codename1/io/JSONParseCallback.java'
- - 'CodenameOne/src/com/codename1/io/JSONSanitizer.java'
- - 'CodenameOne/src/com/codename1/io/CharArrayReader.java'
- - 'CodenameOne/src/com/codename1/util/BigInteger.java'
- - 'CodenameOne/src/com/codename1/util/MathUtil.java'
- - 'CodenameOne/src/com/codename1/util/TBigInteger.java'
- - 'CodenameOne/src/com/codename1/util/TBitLevel.java'
- - 'CodenameOne/src/com/codename1/util/TConversion.java'
- - 'CodenameOne/src/com/codename1/util/TDivision.java'
- - 'CodenameOne/src/com/codename1/util/TElementary.java'
- - 'CodenameOne/src/com/codename1/util/TLogical.java'
- - 'CodenameOne/src/com/codename1/util/TMultiplication.java'
- - 'CodenameOne/src/com/codename1/util/TPrimality.java'
- - 'CodenameOne/src/com/codename1/migration/**'
- - 'CodenameOne/src/com/codename1/impl/migration/**'
- - 'CodenameOne/src/com/codename1/security/Hash.java'
- - 'CodenameOne/src/com/codename1/security/Hmac.java'
- - 'CodenameOne/src/com/codename1/security/MessageDigestImpl.java'
- - 'CodenameOne/src/com/codename1/security/Secp256k1.java'
- - 'CodenameOne/src/com/codename1/security/Otp.java'
- - 'CodenameOne/src/com/codename1/security/Base32.java'
- - 'CodenameOne/src/com/codename1/security/CryptoException.java'
- - 'CodenameOne/src/com/codename1/security/**'
- - 'CodenameOne/src/com/codename1/crypto/**'
- - '!vm/**/README.md'
- - '!vm/**/readme.md'
- - '!vm/**/docs/**'
- release:
- types:
- - published
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-env:
- # Turn on the ParparVM native-signature check for every translation this
- # workflow forks (a forked process inherits the environment). Off by default in
- # the translator so a customer build that succeeds today keeps succeeding; see
- # NativeSignatureVerifier.
- CN1_NATIVE_VERIFY: strict
- # A method the translator culled as unreachable is still emitted as a stub,
- # because dispatch tables name it. With this on, the stub aborts with the
- # method's name instead of returning 0, so a wrong cull fails the suite that
- # reached it rather than shipping a silent null. Ours to enforce, like
- # CN1_NATIVE_VERIFY: customer builds keep the plain stub. See
- # BytecodeMethod.appendMethodC. Not in the size or perf benchmarks, whose
- # binaries should be the ones customers get.
- CN1_CULL_TRAP: '1'
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- # EVERY DOCUMENTED RUNTIME CONFIGURATION MUST STILL COMPILE.
- #
- # ParparVM's runtime carries ~40 compile-time arms: QA instruments, and ablations
- # that exist so a gate can prove it is able to FAIL (GcSteadyStateIntegrationTest
- # rebuilds with -DCN1_SATB_LOG_FRESH and REQUIRES its assertions to fail). None of
- # them is a user-facing option and none may become one.
- #
- # Their failure mode is silent rot, and it is not hypothetical. The first sweep of
- # this check found FOUR arms that no longer built, one of them (CN1_NURSERY) broken
- # for as long as the bulk SATB barrier had existed, and another
- # (-DCN1_DISABLE_CONSERVATIVE_GC_ROOTS) the only arm in the tree that can falsify a
- # GC rooting claim. A third, -DCN1_DISABLE_BIBOP, is what run-bibop-adaptive.sh
- # builds as its comparison baseline, so that script could not have run either.
- #
- # Its own job, in parallel with vm-tests, because it shares nothing with them: it is
- # a compile-and-link sweep, not a behaviour suite, and what each arm DOES is its own
- # gate's business.
- ablation-arms:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- runs-on: ubuntu-latest
- timeout-minutes: 60
- steps:
- - name: Check out repository
- uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- sudo apt-get install -y clang
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
- # -O1 rather than the release shape: this asks whether a configuration still
- # COMPILES AND LINKS, not how well it optimises, and the arms that broke broke on
- # undeclared identifiers and an undefined symbol -- neither needs -O3 to surface.
- - name: Every ablation arm still builds
- run: vm/benchmarks/check-ablation-arms.sh
- env:
- CN1_ABLATION_CFLAGS: -O1
- - name: Preserve ablation failure logs
- if: failure()
- uses: actions/upload-artifact@v7
- with:
- name: ablation-failure-logs
- path: |
- vm/benchmarks/target/ablation/*.log
- vm/benchmarks/target/ablation/*.run
- if-no-files-found: warn
-
- vm-tests:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- runs-on: ubuntu-24.04
- # The full suite and serial GC benchmarks took 69 and 47 minutes in run
- # 38355108612. Both passed, but setup plus reporting exceeded two hours.
- # Leave reporting headroom; each GC workload retains its own timeout.
- #
- # The tests of the runtime library no longer run once per JDK
- # (CompilerHelper.getBookendCompilers), which gives back some of that
- # time; the limit stays where a slow runner still fits inside it.
- timeout-minutes: 150
- # The two database engines the backend speaks a wire protocol to.
- #
- # BackendDatabaseTest and BackendOrmTest run one body of assertions against
- # SQLite, PostgreSQL and MySQL and require the same answers from all three --
- # that is the whole of the claim that a handler cannot tell which engine
- # answered it, and that one entity class is stored by any of them. SQLite
- # needs nothing installed, so without these two services the tests ran their
- # easiest arm and reported green: the engines with a wire protocol, a
- # different schema syntax and a different way of generating a key are exactly
- # the ones worth running.
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: cn1secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1"
- --health-interval 5s
- --health-timeout 5s
- --health-retries 20
- mariadb:
- # The LTS, and the version that rejects MySQL's NO PAD collation -- which
- # is the whole reason this service is here. Its own is utf8mb4_nopad_bin,
- # which MySQL in turn does not have.
- image: mariadb:10.11
- env:
- MARIADB_ROOT_PASSWORD: cn1secret
- MARIADB_DATABASE: cn1
- MARIADB_USER: cn1
- MARIADB_PASSWORD: cn1secret
- ports:
- - 3307:3306
- options: >-
- --health-cmd "healthcheck.sh --connect --innodb_initialized"
- --health-interval 10s
- --health-timeout 5s
- --health-retries 20
-
- mysql:
- # 8.0 rather than 8, because 8.4 no longer LOADS mysql_native_password
- # and a service container cannot be given server flags to turn it back
- # on: GitHub's `services` supports image, env, ports and options, and
- # none of those appends a command. See the step below for why the plugin
- # has to be reachable at all.
- image: mysql:8.0
- env:
- MYSQL_ROOT_PASSWORD: cn1secret
- MYSQL_USER: cn1
- MYSQL_PASSWORD: cn1secret
- MYSQL_DATABASE: cn1
- ports:
- - 3306:3306
- options: >-
- --health-cmd "mysqladmin ping -h 127.0.0.1 -ucn1 -pcn1secret"
- --health-interval 5s
- --health-timeout 5s
- --health-retries 30
-
- sqlserver:
- # 2017, the oldest release the backend supports; the samples' jobs run
- # 2022. The image creates no database of its own, so the tests use
- # master.
- image: mcr.microsoft.com/mssql/server:2017-latest
- env:
- ACCEPT_EULA: 'Y'
- MSSQL_SA_PASSWORD: Cn1-Secret-9x
- ports:
- - 1433:1433
- options: >-
- --health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Cn1-Secret-9x -Q 'SELECT 1'"
- --health-interval 10s
- --health-timeout 5s
- --health-retries 30
-
- oracle:
- # Oracle Free. 19c, the oldest release supported, is not pullable
- # without an Oracle account.
- image: gvenzl/oracle-free:23-slim
- env:
- ORACLE_PASSWORD: cn1secret
- APP_USER: cn1
- APP_USER_PASSWORD: cn1secret
- ports:
- - 1521:1521
- options: >-
- --health-cmd healthcheck.sh
- --health-interval 10s
- --health-timeout 5s
- --health-retries 40
- # Oracle XE 21, the newest release WITHOUT 23ai's relaxations: SELECT
- # with no FROM, BOOLEAN, IF [NOT] EXISTS. A statement that needs one of
- # them passes on Free and fails here, as it would on 19c.
- oracle21:
- image: gvenzl/oracle-xe:21-slim
- env:
- ORACLE_PASSWORD: cn1secret
- APP_USER: cn1
- APP_USER_PASSWORD: cn1secret
- ports:
- - 1522:1521
- options: >-
- --health-cmd healthcheck.sh
- --health-interval 10s
- --health-timeout 5s
- --health-retries 60
- steps:
- - name: Check out repository
- uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # Migrations serialise on DBMS_LOCK, which an ordinary user may not call.
- - name: Let the Oracle test user take migration locks
- run: |
- docker exec -i "${{ job.services.oracle.id }}" sqlplus -s -L sys/cn1secret@FREEPDB1 as sysdba <<'SQL'
- WHENEVER SQLERROR EXIT FAILURE
- GRANT EXECUTE ON SYS.DBMS_LOCK TO cn1;
- SQL
- docker exec -i "${{ job.services.oracle21.id }}" sqlplus -s -L sys/cn1secret@XEPDB1 as sysdba <<'SQL'
- WHENEVER SQLERROR EXIT FAILURE
- GRANT EXECUTE ON SYS.DBMS_LOCK TO cn1;
- SQL
-
- # TDS 8.0 on the native runtime: TLS first, ALPN tds/8.0. A step, not a
- # service, because the server needs a certificate generated first.
- - name: Start SQL Server 2025 for sslmode=strict
- run: |
- URL=$(bash scripts/ci/start-sqlserver-strict.sh "$RUNNER_TEMP/sqlstrict")
- echo "CN1_DBCHECK_SQLSERVER_STRICT=$URL" >> "$GITHUB_ENV"
-
- # The backend's MySQL client REFUSES to complete caching_sha2_password's
- # full exchange on an unencrypted connection, because that exchange sends
- # the password itself. That refusal is the client behaving correctly, and
- # it means a freshly created service container -- whose password cache is
- # empty -- cannot be reached over plaintext loopback at all: the first
- # connection is exactly the one with nothing cached.
- #
- # The alternative to this step is TLS, and the container's auto-generated
- # certificate chains to nothing and carries no name the client could
- # verify, so `sslmode=require` fails for a different reason. Native
- # password authentication is what CI can actually offer, and the code path
- # under test -- the wire protocol, the schema, the generated keys -- is the
- # same either way.
- - name: Let the MySQL service authenticate our client
- run: |
- docker exec ${{ job.services.mysql.id }} mysql -uroot -pcn1secret -e \
- "ALTER USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'cn1secret'; \
- FLUSH PRIVILEGES;"
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # clang alone is not enough to LINK a backend binary. vm/backend's
- # build.sh links -lcurl -lssl -lcrypto -lnghttp2 (outbound TLS is
- # libcurl's, the auth primitives are OpenSSL's, the HTTP/2 framing is
- # nghttp2's) and needs their headers to compile the natives that call
- # them. Without these, every test that builds a server binary --
- # BackendDatabaseTest, BackendOrmTest, BackendRuntimeSelfTest --
- # compiled, failed at the link, and SKIPPED, which this job reported
- # as green for as long as it has existed.
- sudo apt-get install -y clang libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- # Install JDKs and export their paths
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- - name: Set up JDK 11
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '11'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 11 Path
- run: echo "JDK_11_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- - name: Set up JDK 21
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '21'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 21 Path
- run: echo "JDK_21_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- - name: Set up JDK 25
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '25'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 25 Path
- run: echo "JDK_25_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- # Restore JDK 8 as the main runner (cache is on the first setup-java JDK 8 above)
- - name: Restore JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Set up Node
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- # WITHOUT THIS EVERY BACKEND TEST SKIPS. generate-contract.sh compiles the
- # shared @RestClient/@Entity contract against codenameone-core and runs the
- # Codename One maven plugin over it, so both have to be in the local repo
- # the backend scripts use -- and this job never built the maven modules, so
- # they never were. BackendDatabaseTest, BackendOrmTest,
- # BackendRuntimeSelfTest and BackendJavaSeRuntimeTest all reported
- # "codenameone-core:8.0-SNAPSHOT is not in .m2-repo" and skipped, which is
- # why CN1_BACKEND_REQUIRED below found four of them at once: the PostgreSQL
- # and MySQL services this job stands up were serving nobody.
- #
- # -Plocal-dev-javase and the repo-local .m2-repo are what the scripts
- # expect; the path is $GITHUB_WORKSPACE/.m2-repo because that is where
- # generate-contract.sh looks (CN1_M2 overrides it, and nothing sets one).
- #
- # The static-analysis gates are OFF here on purpose. This step exists to
- # put jars in a repo, and -am drags in every port because the maven plugin
- # depends on them -- so with them on, a SpotBugs finding in the Android
- # port fails THIS workflow, where nobody would look for it and where it
- # says nothing about ParparVM. pr.yml owns those gates and runs them over
- # the same modules.
- - name: Install core + maven plugin for the backend contract
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Run ParparVM JVM tests
- working-directory: vm
- # Maven Central intermittently serves 403/429 from the runner CDN edge
- # and Maven treats it as a permanent resolution failure (killed this job
- # at dependency download, before any test ran). See scripts/ci/retry.sh.
- #
- # Narrowed with RETRY_ONLY_MATCHING because the second command RUNS THE
- # TESTS: without it the wrapper retries every nonzero exit, so a test that
- # failed once and passed on the retry would take this gate green and hide
- # the race that produced it. The Windows counterpart restricts it for the
- # same reason.
- run: |
- retry() { bash ../scripts/ci/retry.sh "$@"; }
- retry mvn -B clean package -pl JavaAPI -am -DskipTests
- retry mvn -B test -pl tests -am -DexcludedGroups=benchmark
- env:
- RETRY_ONLY_MATCHING: transient
- # BackendHttpIntegrationTest runs the backend with io_uring, and twice
- # with it refused by seccomp. This makes the first copy FAIL unless it
- # really got the ring: without it, a runner image that turned io_uring
- # off would test the thread pool three times and stay green.
- CN1_REQUIRE_IO_URING: '1'
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
- JDK_11_HOME: ${{ env.JDK_11_HOME }}
- JDK_17_HOME: ${{ env.JDK_17_HOME }}
- JDK_21_HOME: ${{ env.JDK_21_HOME }}
- JDK_25_HOME: ${{ env.JDK_25_HOME }}
- # The services above. sslmode=disable because these are loopback
- # containers with no certificate: the default, prefer, would attempt
- # TLS and fail verification rather than quietly downgrading, which is
- # the behaviour the database layer is supposed to have.
- CN1_DBCHECK_POSTGRES: postgres://cn1:cn1secret@127.0.0.1:5432/cn1?sslmode=disable
- CN1_DBCHECK_MYSQL: mysql://cn1:cn1secret@127.0.0.1:3306/cn1?sslmode=disable
- # MARIADB REACHED THROUGH A mysql:// URL, deliberately: the dialect is
- # chosen from the server's handshake banner rather than from the
- # scheme, and this is the case that proves it. The two families have
- # no case-sensitive NO PAD collation in common, so picking the wrong
- # one is an unknown-collation error on every CREATE TABLE.
- CN1_DBCHECK_MARIADB: mysql://cn1:cn1secret@127.0.0.1:3307/cn1?sslmode=disable
- CN1_DBCHECK_SQLSERVER: sqlserver://sa:Cn1-Secret-9x@127.0.0.1:1433/master?sslmode=disable
- CN1_DBCHECK_ORACLE: oracle://cn1:cn1secret@127.0.0.1:1521/FREEPDB1?sslmode=disable
- CN1_DBCHECK_ORACLE21: oracle://cn1:cn1secret@127.0.0.1:1522/XEPDB1?sslmode=disable
- # WITHOUT THIS THE BACKEND TESTS CAN SKIP AND THE JOB STAYS GREEN.
- # BackendTestSupport.skipOrFail turns a backend build failure into a
- # JUnit assumption abort, because a developer machine with no C
- # toolchain must not fail the suite -- and a missing link library in CI
- # looks exactly the same from inside the test. This is the only job
- # that runs the whole tests module, so it is the one place that has to
- # say the backend is expected to build here: a compile, link or
- # toolchain regression fails the workflow rather than quietly
- # subtracting BackendDatabaseTest, BackendOrmTest and the rest from it.
- CN1_BACKEND_REQUIRED: 1
- # BackendWebSocketIntegrationTest translates scripts/hellocodenameone/backend
- # through server.sh, which would otherwise re-install the backend runtime
- # the step above just installed from this same checkout.
- CN1SS_BACKEND_SKIP_INSTALL: 1
-
- # The SQLAlchemy conformance programs against the PostgreSQL service
- # above: the suite in python-transpiler runs them on SQLite only, so this
- # is the one place the postgresql dialect and the _cn1db bridge meet a
- # real server. PostgreSQL and the job's MySQL service; MariaDB is run by
- # hand. Last of the steps using MySQL: each program drops and recreates
- # the cn1 database.
- # python-runtime compiles at release 17, hence JDK 17 for the install.
- - name: Python SQLAlchemy on PostgreSQL and MySQL
- run: |
- (cd maven && bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl python-runtime,python-transpiler \
- install -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo")
- # The test transpiles against JavaAPI from the same repository, and
- # the step that installs it for the native samples runs after this.
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -f vm/pom.xml -pl JavaAPI install -DskipTests \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- bash scripts/python-backend/sqlalchemy-realdb-test.sh "$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JAVA17_HOME: ${{ env.JDK_17_HOME }}
- CN1_SQLA_POSTGRES: postgres://cn1:cn1secret@127.0.0.1:5432/cn1?sslmode=disable
- CN1_SQLA_MYSQL: mysql://cn1:cn1secret@127.0.0.1:3306/cn1?sslmode=disable
-
- - name: Run ParparVM Benchmark
- working-directory: vm
- # Each benchmark already creates its own mutator/collector threads. Run
- # classes serially: competing benchmarks change GC sizing and timings as
- # they start and finish, invalidating comparisons within a measured run.
- run: bash $GITHUB_WORKSPACE/scripts/ci/retry.sh mvn -B test -pl tests -am -Dgroups=benchmark -Dparparvm.test.forkCount=1 -Djacoco.skip=true
- env:
- # Narrowed because this step RUNS TESTS: retry.sh retries every nonzero exit
- # without it, so a test that failed once and passed on a later attempt would take
- # this gate green and hide the race that produced it. The wrapper's own docs
- # require this filter for test-running commands.
- RETRY_ONLY_MATCHING: transient
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
- JDK_11_HOME: ${{ env.JDK_11_HOME }}
- JDK_17_HOME: ${{ env.JDK_17_HOME }}
- JDK_21_HOME: ${{ env.JDK_21_HOME }}
- JDK_25_HOME: ${{ env.JDK_25_HOME }}
-
- - name: Publish ByteCodeTranslator quality previews
- if: ${{ !cancelled() && github.server_url == 'https://github.com' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
- id: publish-bytecode-quality-previews
- env:
- GITHUB_TOKEN: ${{ github.token }}
- SERVER_URL: ${{ github.server_url }}
- REPOSITORY: ${{ github.repository }}
- RUN_ID: ${{ github.run_id }}
- RUN_ATTEMPT: ${{ github.run_attempt }}
- run: |
- set -euo pipefail
- if [ "${SERVER_URL}" != "https://github.com" ]; then
- echo "HTML previews are only published for github.com instances."
- exit 0
- fi
-
- coverage_dir="vm/tests/target/site/jacoco"
- if [ ! -f "${coverage_dir}/index.html" ]; then
- echo "No HTML outputs detected; skipping preview publishing."
- exit 0
- fi
-
- run_dir="runs/${RUN_ID}-${RUN_ATTEMPT}"
- tmp_dir=$(mktemp -d)
- dest_dir="${tmp_dir}/${run_dir}/coverage"
- mkdir -p "${dest_dir}"
- cp -R "${coverage_dir}/." "${dest_dir}/"
-
- printf '%s\n%s\n%s\n' \
- '# Quality report previews' \
- '' \
- 'This branch is automatically managed by the PR CI workflow and may be force-pushed.' \
- > "${tmp_dir}/README.md"
-
- git -C "${tmp_dir}" init -b previews >/dev/null
- git -C "${tmp_dir}" config user.name "github-actions[bot]"
- git -C "${tmp_dir}" config user.email "github-actions[bot]@users.noreply.github.com"
- git -C "${tmp_dir}" add .
- git -C "${tmp_dir}" commit -m "Publish quality report previews for run ${RUN_ID} (attempt ${RUN_ATTEMPT})" >/dev/null
-
- remote_url="${SERVER_URL}/${REPOSITORY}.git"
- token_remote_url="${remote_url/https:\/\//https://x-access-token:${GITHUB_TOKEN}@}"
- for push_attempt in 1 2 3 4 5; do
- if git -C "${tmp_dir}" push --force "${token_remote_url}" previews:quality-report-previews >/dev/null; then
- break
- fi
- if [ "${push_attempt}" -eq 5 ]; then
- echo "Failed to publish quality report previews after ${push_attempt} attempts." >&2
- exit 1
- fi
- sleep $((push_attempt * 3))
- done
-
- commit_sha=$(git -C "${tmp_dir}" rev-parse HEAD)
- raw_base="https://raw.githubusercontent.com/${REPOSITORY}/${commit_sha}/${run_dir}"
- preview_base="https://htmlpreview.github.io/?${raw_base}"
- echo "jacoco_url=${preview_base}/coverage/index.html" >> "$GITHUB_OUTPUT"
-
- - name: Generate ByteCodeTranslator quality report
- if: ${{ !cancelled() }}
- env:
- QUALITY_REPORT_TARGET_DIRS: vm/tests/target
- QUALITY_REPORT_SERVER_URL: ${{ github.server_url }}
- QUALITY_REPORT_REPOSITORY: ${{ github.repository }}
- QUALITY_REPORT_REF: ${{ github.event.pull_request.head.sha || github.sha }}
- QUALITY_REPORT_TITLE: "✅ ByteCodeTranslator Quality Report"
- JACOCO_HTML_URL: ${{ steps.publish-bytecode-quality-previews.outputs.jacoco_url }}
- run: python3 .github/scripts/generate-quality-report.py
-
- - name: Publish ByteCodeTranslator quality comment
- if: ${{ github.event_name == 'pull_request' }}
- uses: actions/github-script@v9
- with:
- # Retried rather than fatal on a transient 5xx. The publisher
- # already warns instead of throwing; this is the cheaper half of
- # the same fix, so the comment usually still lands. 4xx codes the
- # action treats as permanent are not retried.
- retries: 3
- script: |
- const { publishQualityComment } = require('./.github/scripts/publish-quality-comment.js');
- await publishQualityComment({
- github,
- context,
- core,
- marker: '',
- reportPath: 'quality-report.md',
- });
-
-
- # The websocket frame parser, against the Autobahn|Testsuite.
- #
- # Its own job rather than a step inside vm-tests: that job already carries three
- # database service containers and a long budget, and a conformance failure
- # deserves its own red check instead of being buried behind a MySQL health
- # probe. Ubuntu because `--network host` means the host's network stack here,
- # which is what lets the container reach a server on 127.0.0.1.
- #
- # ~300 cases, almost all of them frames no conformant client would send. The
- # gate in vm/backend/conformance/check-autobahn.py has no per-case tolerance:
- # every case must be strictly green, NON-STRICT included, and the set that ran
- # has to match the committed manifest so the suite cannot quietly shrink to the
- # cases it happens to pass.
- backend-compiled-tests:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- # The backend test framework's two runners over one test source: surefire on
- # the JVM, then the same classes translated by ParparVM into a native test
- # binary (cn1:backend-test), the way an application's own tests run when it
- # asks for -Dcn1.backend.compiledTests=true. The project is the CI test server,
- # scripts/hellocodenameone/backend, so these are also its self-checks.
- #
- # The compiled leg leaves out the Mockito-based test classes on its own; the
- # report check at the end is what proves the binary actually ran tests, since
- # a goal that skipped would otherwise leave this job green.
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- # Gates off for the reason the vm-tests install step gives.
- - name: Install the backend runtime, its test support and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl backend,backend-test,codenameone-maven-plugin \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Run the backend tests on the JVM and compiled
- working-directory: scripts/hellocodenameone
- run: |
- mvn -B -Dcodename1.platform=backend -pl backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Check that both runners reported
- working-directory: scripts/hellocodenameone/backend/target/surefire-reports
- run: |
- jvm=$(ls TEST-*.xml | grep -vc -- '-compiled.xml' || true)
- compiled=$(ls TEST-*-compiled.xml 2>/dev/null | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: backend-compiled-tests
- path: scripts/hellocodenameone/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- python-backend-native:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- # The Flask and FastAPI samples built NATIVELY (ParparVM, clang) and
- # driven over sockets by the same client as the JVM run. The only place
- # Python handlers run on the backend's virtual threads, so the only run
- # of the GIL's scheduler path. A job of its own: it takes most of an
- # hour, and vm-tests already fills its limit without it.
- runs-on: ubuntu-24.04
- timeout-minutes: 90
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
-
- # Gates off for the reason the vm-tests install step gives.
- - name: Install core, the backend and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # python-runtime compiles at release 17, hence JDK 17 for the install.
- - name: Install the Python transpiler and runtime, and JavaAPI
- run: |
- (cd maven && bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl python-runtime,python-transpiler \
- install -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo")
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -f vm/pom.xml -pl JavaAPI install -DskipTests \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Python backend end to end, native
- run: bash scripts/python-backend/e2e-test.sh --native "$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
- JAVA17_HOME: ${{ env.JDK_17_HOME }}
-
- backend-websocket-conformance:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: WebSocket conformance (Autobahn)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache the Autobahn image
- id: autobahn-cache
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/autobahn-image.tar
- key: autobahn-testsuite-image-v1
-
- - name: Load or pull the Autobahn image
- run: |
- if [ -f "${{ runner.temp }}/autobahn-image.tar" ]; then
- docker load -i "${{ runner.temp }}/autobahn-image.tar"
- else
- docker pull crossbario/autobahn-testsuite
- docker save crossbario/autobahn-testsuite \
- -o "${{ runner.temp }}/autobahn-image.tar"
- fi
-
- - name: Run the Autobahn fuzzing client
- env:
- CN1_BACKEND_JAVA: ${{ env.JAVA_HOME }}
- run: vm/backend/ws-conformance.sh --arm javase
-
- - name: Upload the Autobahn report
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: autobahn-report
- path: vm/backend/target/autobahn/**
- if-no-files-found: warn
- retention-days: 14
-
-
- release-jars:
- needs: golden-plan
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name == 'release' && github.event.action == 'published') }}
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- permissions:
- contents: write
- steps:
- - name: Check out repository
- uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Build release jars
- # This job runs once per published release, so a transient Maven Central
- # 403/429 here silently ships a release without its ParparVM jars (that
- # is what happened to 7.0.264). Retry, as the vm-tests job already does.
- run: |
- bash scripts/ci/retry.sh mvn -B -f vm/JavaAPI/pom.xml package
- bash scripts/ci/retry.sh mvn -B -f vm/ByteCodeTranslator/pom.xml package
-
- - name: Verify release jars
- run: |
- test -f vm/JavaAPI/target/JavaAPI-1.0-SNAPSHOT.jar
- test -f vm/ByteCodeTranslator/target/ByteCodeTranslator-1.0-SNAPSHOT.jar
-
- - name: Attach JavaAPI and ByteCodeTranslator jars to release
- uses: softprops/action-gh-release@v1
- with:
- files: |
- vm/JavaAPI/target/JavaAPI-1.0-SNAPSHOT.jar
- vm/ByteCodeTranslator/target/ByteCodeTranslator-1.0-SNAPSHOT.jar
diff --git a/.github/workflows/perf-baseline.yml b/.github/workflows/perf-baseline.yml
index 1e4bd61bcdd..fd982fe528e 100644
--- a/.github/workflows/perf-baseline.yml
+++ b/.github/workflows/perf-baseline.yml
@@ -126,7 +126,7 @@ jobs:
dest="${RUNNER_TEMP}/perf-results"
mkdir -p "${dest}"
since="$(date -u -d '7 days ago' +%Y-%m-%dT%H:%M:%SZ)"
- for wf in linux-build-run.yml parparvm-tests-windows.yml scripts-macos.yml; do
+ for wf in linux-build-run.yml scripts-ios.yml; do
for run in $(gh run list --repo "${GITHUB_REPOSITORY}" --workflow "${wf}" \
--branch master --limit 30 --json databaseId,createdAt \
--jq ".[] | select(.createdAt >= \"${since}\") | .databaseId"); do
diff --git a/.github/workflows/port-status-contract.yml b/.github/workflows/port-status-contract.yml
index 2a5c73de5e7..2c4ca94f86f 100644
--- a/.github/workflows/port-status-contract.yml
+++ b/.github/workflows/port-status-contract.yml
@@ -5,7 +5,7 @@ on:
paths:
- '.github/workflows/port-status-contract.yml'
- '.github/workflows/port-status-publish.yml'
- - '.github/workflows/parparvm-tests-windows.yml'
+ - '.github/workflows/linux-build-run.yml'
- 'scripts/lib/cn1ss.sh'
- 'docs/website/data/port_status.json'
- 'docs/website/data/port_status_supplement.json'
@@ -23,7 +23,7 @@ on:
- 'scripts/website/validate_port_status.mjs'
- '.github/workflows/port-status-nightly.yml'
- 'scripts/android/screenshots/**'
- - 'scripts/ios/screenshots-metal/**'
+ - 'scripts/ios/screenshots-metal-27/**'
- 'scripts/ios/screenshots-watch/**'
- 'scripts/ios/screenshots-tv/**'
- 'scripts/macos/screenshots/**'
@@ -36,7 +36,7 @@ on:
paths:
- '.github/workflows/port-status-contract.yml'
- '.github/workflows/port-status-publish.yml'
- - '.github/workflows/parparvm-tests-windows.yml'
+ - '.github/workflows/linux-build-run.yml'
- 'scripts/lib/cn1ss.sh'
- 'docs/website/data/port_status.json'
- 'docs/website/data/port_status_supplement.json'
@@ -54,7 +54,7 @@ on:
- 'scripts/website/validate_port_status.mjs'
- '.github/workflows/port-status-nightly.yml'
- 'scripts/android/screenshots/**'
- - 'scripts/ios/screenshots-metal/**'
+ - 'scripts/ios/screenshots-metal-27/**'
- 'scripts/ios/screenshots-watch/**'
- 'scripts/ios/screenshots-tv/**'
- 'scripts/macos/screenshots/**'
diff --git a/.github/workflows/port-status-nightly.yml b/.github/workflows/port-status-nightly.yml
index db653d828cf..2e90ebcf4c4 100644
--- a/.github/workflows/port-status-nightly.yml
+++ b/.github/workflows/port-status-nightly.yml
@@ -11,12 +11,6 @@ permissions:
contents: write
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
-
# port-status-publish.yml only publishes a report when a workflow_run event
# reaches it, and those events never arrive for some producers -- the Linux
# and Windows suites had not landed a single report, so the public table
@@ -38,7 +32,6 @@ jobs:
run: scripts/hellocodenameone/conformance/backfill_port_status.sh
build-javascript-app:
- needs: unity-gallery
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
@@ -64,10 +57,6 @@ jobs:
uses: ./.github/actions/maven-central-mirror
- name: Set up workspace
run: ./scripts/setup-workspace.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 compliance application for JavaScript
run: SKIP_PARPARVM_BUILD=1 ./scripts/build-javascript-port-hellocodenameone.sh "${GITHUB_WORKSPACE}/hellocodenameone-javascript-port.zip"
diff --git a/.github/workflows/port-status-publish.yml b/.github/workflows/port-status-publish.yml
index 8238629fdbd..8a26f30cfd0 100644
--- a/.github/workflows/port-status-publish.yml
+++ b/.github/workflows/port-status-publish.yml
@@ -13,9 +13,7 @@ on:
- Test iOS UI build scripts
- Test macOS UI build scripts
- Test JavaScript screenshot scripts
- - Linux native build + run (GTK3, x64 + arm64)
- - Windows cross-build + run (Linux build -> Windows run)
- - ParparVM Java Tests (Windows)
+ - Native ParparVM (Linux + Windows) build, run and tests
types: [completed]
permissions:
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 4f16a46ff5b..17b7094b6c7 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -2,151 +2,10 @@ name: PR CI
on:
workflow_dispatch:
- pull_request:
- branches:
- - master
- # paths rather than paths-ignore, because this list both excludes and re-includes and only
- # this form supports that: a "!" entry in paths-ignore is not a re-inclusion, so the entries
- # for setup-workspace.sh and the database check scripts below never took effect there. The
- # last matching pattern decides, so this reads as "everything, except these, except these".
- paths:
- - '**'
- - '!.github/workflows/scripts-android.yml'
- - '!.github/workflows/scripts-ios.yml'
- - '!scripts/**'
- - 'scripts/setup-workspace.sh'
- # Run from this workflow and nowhere else, so ignoring the whole directory meant a change
- # to one of them -- including one that breaks the check itself -- merged without it ever
- # running.
- - 'scripts/ci/db-cipher-interop.sh'
- - 'scripts/ci/check-android-cipher-package-compiles.sh'
- - 'scripts/ci/check-js-sqlite-wasm.sh'
- # Every Maven step in this matrix runs through retry.sh, and the apt helpers gate the
- # Linux legs, so a change to one of them that nothing exercises can merge and then break
- # the matrix it was meant to protect.
- - 'scripts/ci/retry.sh'
- - 'scripts/ci/apt-get-update.sh'
- - 'scripts/ci/apt-get-install.sh'
- - 'scripts/ci/tests/apt-get-update-test.sh'
- # The native warning gate's parser self-test runs from this workflow and nowhere
- # else -- the legs that run the gate itself need a compiler. Ignoring these meant a
- # change to the parser, its fixture or a baseline could merge without the one check
- # that would have caught it ever running.
- - 'scripts/check-native-warnings.py'
- - 'scripts/check-native-warnings.sh'
- - 'scripts/native-warnings/**'
- # Same reason: the C++ linkage gate runs from this workflow and nowhere else, so
- # ignoring scripts/** would let a change that weakens it merge unexercised.
- - 'scripts/check-native-cpp-linkage.py'
- # Same: the builder define-toggle lint runs from this workflow and nowhere else.
- - 'scripts/check-builder-define-toggles.py'
- - 'scripts/check-cast-semantics.sh'
- - 'scripts/check-gpu-shaders.sh'
- - 'scripts/gpu-shader-check/**'
- - 'scripts/cast-semantics-baseline.txt'
- # The build hint gates are run from this workflow and nowhere else, and one
- # of them holds an empty baseline. Ignoring the whole directory meant a
- # change that breaks a gate, or that adds a line to the baseline, could
- # merge without the gate it weakens ever running.
- - 'scripts/check-build-hint-catalog.sh'
- - 'scripts/check-build-hint-catalog.py'
- - 'scripts/build_hint_miner.py'
- - 'scripts/build-hint-catalog-baseline.txt'
- - 'scripts/build-hint-computed-sites.txt'
- - 'scripts/gen-build-hint-annotations.sh'
- # Same reasoning for the cn1lib native gates: they run from this workflow
- # and nowhere else, and the stubs are the API surface their Android check
- # compiles against, so excluding scripts/ wholesale would let a change to
- # any of them merge without the gate it belongs to ever running.
- - 'scripts/check-native-peer-returns.py'
- - 'scripts/check-cn1lib-android-api.py'
- - 'scripts/check-cn1lib-native-coverage.py'
- - 'scripts/ci/select-cn1lib-checks.py'
- - 'scripts/check-cn1lib-native-sources.py'
- - 'scripts/cn1lib-api-check/**'
- # The certificate wizard's own tests run in this workflow (see "Run Certificate Wizard
- # tests"), so a change to the wizard alone has to trigger it.
- - 'scripts/certificatewizard/**'
- - '!docs/**'
- - '!**/*.md'
- - '!.github/workflows/developer-guide-docs.yml'
- - '!.github/workflows/website-docs.yml'
- - '!.github/workflows/initializr-cn1-version-pr.yml'
- - '!CodenameOneDesigner/**'
- - '!Ports/IOSPort/**'
- push:
- branches:
- - master
- # paths rather than paths-ignore, because this list both excludes and re-includes and only
- # this form supports that: a "!" entry in paths-ignore is not a re-inclusion, so the entries
- # for setup-workspace.sh and the database check scripts below never took effect there. The
- # last matching pattern decides, so this reads as "everything, except these, except these".
- paths:
- - '**'
- - '!.github/workflows/scripts-android.yml'
- - '!.github/workflows/scripts-ios.yml'
- - '!scripts/**'
- - 'scripts/setup-workspace.sh'
- # Run from this workflow and nowhere else, so ignoring the whole directory meant a change
- # to one of them -- including one that breaks the check itself -- merged without it ever
- # running.
- - 'scripts/ci/db-cipher-interop.sh'
- - 'scripts/ci/check-android-cipher-package-compiles.sh'
- - 'scripts/ci/check-js-sqlite-wasm.sh'
- # Every Maven step in this matrix runs through retry.sh, and the apt helpers gate the
- # Linux legs, so a change to one of them that nothing exercises can merge and then break
- # the matrix it was meant to protect.
- - 'scripts/ci/retry.sh'
- - 'scripts/ci/apt-get-update.sh'
- - 'scripts/ci/apt-get-install.sh'
- - 'scripts/ci/tests/apt-get-update-test.sh'
- # The native warning gate's parser self-test runs from this workflow and nowhere
- # else -- the legs that run the gate itself need a compiler. Ignoring these meant a
- # change to the parser, its fixture or a baseline could merge without the one check
- # that would have caught it ever running.
- - 'scripts/check-native-warnings.py'
- - 'scripts/check-native-warnings.sh'
- - 'scripts/native-warnings/**'
- # Same reason: the C++ linkage gate runs from this workflow and nowhere else, so
- # ignoring scripts/** would let a change that weakens it merge unexercised.
- - 'scripts/check-native-cpp-linkage.py'
- # Same: the builder define-toggle lint runs from this workflow and nowhere else.
- - 'scripts/check-builder-define-toggles.py'
- - 'scripts/check-cast-semantics.sh'
- - 'scripts/check-gpu-shaders.sh'
- - 'scripts/gpu-shader-check/**'
- - 'scripts/cast-semantics-baseline.txt'
- # The build hint gates are run from this workflow and nowhere else, and one
- # of them holds an empty baseline. Ignoring the whole directory meant a
- # change that breaks a gate, or that adds a line to the baseline, could
- # merge without the gate it weakens ever running.
- - 'scripts/check-build-hint-catalog.sh'
- - 'scripts/check-build-hint-catalog.py'
- - 'scripts/build_hint_miner.py'
- - 'scripts/build-hint-catalog-baseline.txt'
- - 'scripts/build-hint-computed-sites.txt'
- - 'scripts/gen-build-hint-annotations.sh'
- # Same reasoning for the cn1lib native gates: they run from this workflow
- # and nowhere else, and the stubs are the API surface their Android check
- # compiles against, so excluding scripts/ wholesale would let a change to
- # any of them merge without the gate it belongs to ever running.
- - 'scripts/check-native-peer-returns.py'
- - 'scripts/check-cn1lib-android-api.py'
- - 'scripts/check-cn1lib-native-coverage.py'
- - 'scripts/ci/select-cn1lib-checks.py'
- - 'scripts/check-cn1lib-native-sources.py'
- - 'scripts/cn1lib-api-check/**'
- # The certificate wizard's own tests run in this workflow (see "Run Certificate Wizard
- # tests"), so a change to the wizard alone has to trigger it.
- - 'scripts/certificatewizard/**'
- - '!docs/**'
- - '!**/*.md'
- - '!.github/workflows/developer-guide-docs.yml'
- - '!.github/workflows/website-docs.yml'
- - '!.github/workflows/initializr-cn1-version-pr.yml'
- - '!CodenameOneDesigner/**'
- - '!Ports/IOSPort/**'
-
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
permissions:
contents: write
pull-requests: write
@@ -173,21 +32,11 @@ env:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: pr-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
build-test:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
# Java 8 also runs the full quality reports and packaging checks.
@@ -227,7 +76,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
- name: Use Google's copy of Maven Central first
@@ -463,6 +312,8 @@ jobs:
# the catalog complete and the generated files in step with it.
- name: Check build hint catalog
if: ${{ matrix.java-version == 8 }}
+ # Not in source-gates.yml: it reads the rendered cn1-build-hints.json,
+ # which only exists after this job's build.
run: scripts/check-build-hint-catalog.sh
- name: Check the apt source prune keeps Ubuntu's own sources
if: ${{ matrix.java-version == 8 }}
@@ -984,8 +835,8 @@ jobs:
# "failed to resolve source metadata for docker.io/library/alpine:latest"
# after three retries. A job-level condition skips setup entirely, so on a
# pull request the image is never fetched.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name == 'push' && github.ref == 'refs/heads/master') }}
- needs: [golden-plan, build-test]
+ if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') }}
+ needs: [build-test]
runs-on: ubuntu-24.04
steps:
- name: Download the distribution bundle
diff --git a/.github/workflows/pulse.yml b/.github/workflows/pulse.yml
deleted file mode 100644
index db4bed2ae37..00000000000
--- a/.github/workflows/pulse.yml
+++ /dev/null
@@ -1,591 +0,0 @@
-name: Pulse (full-stack sample)
-
-# scripts/pulse is one Maven project holding a fitness studio application and
-# its server: a `shared` module of transfer objects and @RestClient contracts,
-# the Codename One client that calls them, and a Codename One Backend that
-# implements them.
-#
-# Five things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it builds (client-e2e)
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/pulse/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/pulse.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/pulse and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/pulse
- run: python3 scripts/sync-initializr-template.py pulse
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/pulse
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/pulse/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: pulse-backend-tests
- path: scripts/pulse/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/pulse \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: pulse-backend-${{ matrix.database }}-tests
- path: scripts/pulse/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/pulse/check-template.sh "$RUNNER_TEMP/pulse-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/pulse/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: pulse-e2e
- path: |
- scripts/pulse/target/e2e-shots/**
- scripts/pulse/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/pulse/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: pulse-web-e2e
- path: scripts/pulse/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/pulse
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-pulse-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-pulse-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-pulse-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-pulse-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/pulse
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/pulse-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
- # embedded watch app included, whose watch-only icon then has nothing to
- # compile for. The destination picks each target's own SDK.
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/purchase-e2e.yml b/.github/workflows/purchase-e2e.yml
index 43255fb11b2..8129365f8c0 100644
--- a/.github/workflows/purchase-e2e.yml
+++ b/.github/workflows/purchase-e2e.yml
@@ -88,7 +88,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-purchase-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-purchase-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-purchase-
${{ runner.os }}-m2-
@@ -150,9 +150,13 @@ jobs:
runner: xcode-27
xcode_major: '27'
xcode_pin: '27.1'
+ # macos-15 has no Xcode 27, and xcode.sh reads an empty major as 27,
+ # so this leg names the Xcode it has always run on there (26, the old
+ # default). A step-level CN1_XCODE_MAJOR would override the matrix for
+ # the StoreKit 2 leg too.
- storekit: 1
runner: macos-15
- xcode_major: ''
+ xcode_major: '26'
xcode_pin: ''
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
@@ -207,7 +211,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
@@ -289,7 +293,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-android-purchase-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-android-purchase-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-android-purchase-
${{ runner.os }}-m2-
diff --git a/.github/workflows/reel.yml b/.github/workflows/reel.yml
deleted file mode 100644
index 68105dda027..00000000000
--- a/.github/workflows/reel.yml
+++ /dev/null
@@ -1,591 +0,0 @@
-name: Reel (full-stack sample)
-
-# scripts/reel is one Maven project holding an application and its server:
-# a `shared` module of transfer objects and @RestClient contracts, the
-# Codename One client that calls them, and a Codename One Backend that
-# implements them. It is also what the initializr offers as a template.
-#
-# Six things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it under another name builds: its
-# server's tests pass and its app compiles (a step of client-e2e,
-# which has the artifacts installed)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/reel/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/reel.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/reel and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/reel
- run: python3 scripts/sync-initializr-template.py reel
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/reel
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/reel/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: reel-backend-tests
- path: scripts/reel/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/reel \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: reel-backend-${{ matrix.database }}-tests
- path: scripts/reel/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/reel/check-template.sh "$RUNNER_TEMP/reel-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/reel/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: reel-e2e
- path: |
- scripts/reel/target/e2e-shots/**
- scripts/reel/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/reel/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: reel-web-e2e
- path: scripts/reel/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/reel
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-reel-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-reel-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-reel-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-reel-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/reel
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/reel-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -sdk iphonesimulator \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/samples-ios-nightly.yml b/.github/workflows/samples-ios-nightly.yml
index aab9c8868ff..3cf15fa7198 100644
--- a/.github/workflows/samples-ios-nightly.yml
+++ b/.github/workflows/samples-ios-nightly.yml
@@ -54,7 +54,7 @@ jobs:
if: needs.golden-plan.outputs.run == 'true'
name: iOS builds (${{ matrix.shard }})
needs: [golden-plan, build-ios-port]
- runs-on: macos-15
+ runs-on: xcode-27
# Five steps at their 45-minute cap; a slow night must fail a step, not
# kill the job and leave the rest of the shard unrun.
timeout-minutes: 240
@@ -116,7 +116,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml
new file mode 100644
index 00000000000..5f5eb98d379
--- /dev/null
+++ b/.github/workflows/samples.yml
@@ -0,0 +1,2621 @@
+# Every sample application under scripts/ (the full-stack samples and the
+# games), in ONE workflow: one job per kind of check, and each sample a step of
+# it. These used to be fourteen workflows of eight to ten jobs each, so a change
+# to the shared app kit queued well over a hundred jobs.
+#
+# select which samples the change touches, from each sample's old
+# `paths` filter (PATHS below); every sample on the nightly
+# and on a manual run, and when this file itself changes.
+# one job per kind template sync, the server tests (JVM and compiled, and on
+# each database), the client end to end run, the browser,
+# Android and iOS. The framework is installed once per job,
+# then each selected sample runs as steps named
+# ": ...". A failed sample does not stop the next:
+# every step runs unless the run was cancelled, and the job
+# fails at the end if any step did.
+#
+# iOS builds the port once (build-ios-port) and splits the samples over two
+# macOS jobs; on the nightly, samples-ios-nightly.yml builds them instead.
+
+name: Samples (full-stack and game)
+on:
+ pull_request:
+ paths:
+ - .github/workflows/samples.yml
+ - maven/cn1-app-kit/**
+ - scripts/bastion/**
+ - scripts/bazaar/**
+ - scripts/brickyard/**
+ - scripts/ci/reset-*.sh
+ - scripts/ci/sample-server-tests-on-database.sh
+ - scripts/ci/start-test-database.sh
+ - scripts/dash/**
+ - scripts/fieldline/**
+ - scripts/papercut/**
+ - scripts/parley/**
+ - scripts/pulse/**
+ - scripts/reel/**
+ - scripts/savor/**
+ - scripts/skirmish/**
+ - scripts/slate/**
+ - scripts/splat/**
+ - scripts/wayline/**
+ workflow_dispatch:
+ schedule:
+ - cron: '11 0 * * *'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+permissions:
+ contents: read
+ packages: read
+jobs:
+ golden-plan:
+ uses: ./.github/workflows/golden-plan.yml
+ permissions:
+ contents: read
+ select:
+ needs: golden-plan
+ if: needs.golden-plan.outputs.run == 'true'
+ name: Select the samples this change touches
+ runs-on: ubuntu-24.04
+ timeout-minutes: 10
+ outputs:
+ samples: ${{ steps.select.outputs.samples }}
+ template-sync: ${{ steps.select.outputs.template-sync }}
+ backend: ${{ steps.select.outputs.backend }}
+ chain: ${{ steps.select.outputs.chain }}
+ backend-database: ${{ steps.select.outputs.backend-database }}
+ client-e2e: ${{ steps.select.outputs.client-e2e }}
+ web: ${{ steps.select.outputs.web }}
+ android: ${{ steps.select.outputs.android }}
+ ios: ${{ steps.select.outputs.ios }}
+ app: ${{ steps.select.outputs.app }}
+ rules: ${{ steps.select.outputs.rules }}
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+ filter: blob:none
+ persist-credentials: false
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - id: select
+ name: Select
+ env:
+ EVENT: ${{ github.event_name }}
+ BASE: ${{ github.event.pull_request.base.sha || '' }}
+ PATHS: '{"bastion": ["scripts/bastion/**", "maven/cn1-app-kit/**"], "bazaar": ["scripts/bazaar/**", "maven/cn1-app-kit/**"], "brickyard": ["scripts/brickyard/**"], "dash": ["scripts/dash/**", "maven/cn1-app-kit/**"], "fieldline": ["scripts/fieldline/**", "maven/cn1-app-kit/**"], "papercut": ["scripts/papercut/**"], "parley": ["scripts/parley/**", "maven/cn1-app-kit/**"], "pulse": ["scripts/pulse/**", "maven/cn1-app-kit/**"], "reel": ["scripts/reel/**", "maven/cn1-app-kit/**"], "savor": ["scripts/savor/**", "scripts/ci/sample-server-tests-on-database.sh", "scripts/ci/start-test-database.sh", "scripts/ci/reset-*.sh", "maven/cn1-app-kit/**"], "skirmish": ["scripts/skirmish/**", "maven/cn1-app-kit/**"], "slate": ["scripts/slate/**", "maven/cn1-app-kit/**"], "splat": ["scripts/splat/**"], "wayline": ["scripts/wayline/**", "scripts/ci/sample-server-tests-on-database.sh", "scripts/ci/start-test-database.sh", "scripts/ci/reset-*.sh", "maven/cn1-app-kit/**"]}'
+ KINDS: '{"android": ["bastion", "bazaar", "dash", "fieldline", "papercut", "parley", "pulse", "reel", "savor", "skirmish", "slate", "splat", "wayline"], "app": ["brickyard"], "backend": ["bastion", "bazaar", "brickyard", "dash", "fieldline", "papercut", "parley", "pulse", "reel", "savor", "skirmish", "slate", "splat", "wayline"], "backend-database": ["bastion", "bazaar", "brickyard", "dash", "fieldline", "papercut", "parley", "pulse", "reel", "savor", "skirmish", "slate", "splat", "wayline"], "chain": ["bastion"], "client-e2e": ["bastion", "bazaar", "dash", "fieldline", "papercut", "parley", "pulse", "reel", "savor", "skirmish", "slate", "splat", "wayline"], "ios": ["bastion", "bazaar", "dash", "fieldline", "papercut", "parley", "pulse", "reel", "savor", "skirmish", "slate", "splat", "wayline"], "rules": ["dash", "skirmish", "splat"], "template-sync": ["bastion", "bazaar", "dash", "fieldline", "papercut", "parley", "pulse", "reel", "savor", "skirmish", "slate", "splat", "wayline"],
+ "web": ["bastion", "bazaar", "fieldline", "parley", "pulse", "reel", "savor", "slate", "wayline"]}'
+ run: |
+ python3 - <<'EOF'
+ import fnmatch, json, os, subprocess
+ paths = json.loads(os.environ["PATHS"])
+ kinds = json.loads(os.environ["KINDS"])
+ everything = sorted(paths)
+ if os.environ["EVENT"] == "pull_request" and os.environ["BASE"]:
+ changed = subprocess.check_output(
+ ["git", "diff", "--name-only", os.environ["BASE"] + "...HEAD"], text=True).split()
+ if ".github/workflows/samples.yml" in changed:
+ chosen = everything
+ else:
+ def hit(p):
+ # GitHub's paths filter: ** crosses directories, * does not.
+ rx = "^" + "".join(".*" if a == "**" else "[^/]*" if a == "*" else
+ __import__("re").escape(a) for a in __import__("re").split(r"(\*\*|\*)", p)) + "$"
+ return any(__import__("re").match(rx, f) for f in changed)
+ chosen = [s for s in everything if any(hit(p) for p in paths[s])]
+ else:
+ chosen = everything
+ print("selected:", " ".join(chosen) or "(none)")
+ with open(os.environ["GITHUB_OUTPUT"], "a") as out:
+ out.write("samples= " + " ".join(chosen) + " \n")
+ for k, members in kinds.items():
+ out.write(k + "=" + ("true" if set(members) & set(chosen) else "false") + "\n")
+ EOF
+ template-sync:
+ name: Initializr template matches the sample
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.template-sync == 'true' }}
+ timeout-minutes: 130
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: 'bastion: Compare the template with scripts/bastion'
+ run: python3 scripts/sync-initializr-template.py bastion
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bazaar: Compare the template with scripts/bazaar'
+ run: python3 scripts/sync-initializr-template.py bazaar
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ - name: 'dash: Compare the template with scripts/dash'
+ run: |
+ python3 scripts/sync-initializr-template.py dash
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ - name: 'fieldline: Compare the template with scripts/fieldline'
+ run: python3 scripts/sync-initializr-template.py fieldline
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ - name: 'papercut: Compare the template with scripts/papercut'
+ run: |
+ python3 scripts/sync-initializr-template.py papercut
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ - name: 'parley: Compare the template with scripts/parley'
+ run: python3 scripts/sync-initializr-template.py parley
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ - name: 'pulse: Compare the template with scripts/pulse'
+ run: python3 scripts/sync-initializr-template.py pulse
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ - name: 'reel: Compare the template with scripts/reel'
+ run: python3 scripts/sync-initializr-template.py reel
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ - name: 'savor: Compare the template with scripts/savor'
+ run: python3 scripts/sync-initializr-template.py savor
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ - name: 'skirmish: Compare the template with scripts/skirmish'
+ run: |
+ python3 scripts/sync-initializr-template.py skirmish
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ - name: 'slate: Compare the template with scripts/slate'
+ run: python3 scripts/sync-initializr-template.py slate
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ - name: 'splat: Compare the template with scripts/splat'
+ run: |
+ python3 scripts/sync-initializr-template.py splat
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ - name: 'wayline: Compare the template with scripts/wayline'
+ run: python3 scripts/sync-initializr-template.py wayline
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ backend:
+ name: Server tests (JVM and compiled)
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.backend == 'true' }}
+ timeout-minutes: 360
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Install native build tools
+ run: |
+ bash scripts/ci/apt-get-update.sh
+ # A server binary links libcurl, OpenSSL and nghttp2; clang alone
+ # compiles the tests and then fails at the link.
+ sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '8'
+ cache: maven
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Install the framework, the backend runtime and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ RETRY_ONLY_MATCHING: transient
+ - name: 'bastion: Run the server tests on the JVM and compiled'
+ working-directory: scripts/bastion
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Check that both runners reported'
+ working-directory: scripts/bastion/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bastion-backend-tests
+ path: scripts/bastion/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'bazaar: Run the server tests on the JVM and compiled'
+ working-directory: scripts/bazaar
+ run: |
+ # sample-app is the third-party app sample; its own tests run on the
+ # JVM, and RestockAppE2ETest in backend drives it end to end.
+ mvn -B -Dcodename1.platform=backend -pl shared,backend,sample-app test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ - name: 'bazaar: Check that both runners reported'
+ working-directory: scripts/bazaar/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ - name: 'bazaar: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bazaar-backend-tests
+ path: |
+ scripts/bazaar/backend/target/surefire-reports/**
+ scripts/bazaar/sample-app/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'brickyard: Run the server tests on the JVM and compiled'
+ working-directory: scripts/brickyard
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' brickyard ') }}
+ - name: 'brickyard: Check that both runners reported'
+ working-directory: scripts/brickyard/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' brickyard ') }}
+ - name: 'brickyard: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' brickyard ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: brickyard-backend-tests
+ path: scripts/brickyard/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'dash: Run the server tests on the JVM and compiled'
+ working-directory: scripts/dash
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ - name: 'dash: Check that both runners reported'
+ working-directory: scripts/dash/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ - name: 'dash: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: dash-backend-tests
+ path: scripts/dash/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'fieldline: Run the server tests on the JVM and compiled'
+ working-directory: scripts/fieldline
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ - name: 'fieldline: Check that both runners reported'
+ working-directory: scripts/fieldline/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ - name: 'fieldline: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: fieldline-backend-tests
+ path: scripts/fieldline/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'papercut: Run the server tests on the JVM and compiled'
+ working-directory: scripts/papercut
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ - name: 'papercut: Check that both runners reported'
+ working-directory: scripts/papercut/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ - name: 'papercut: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: papercut-backend-tests
+ path: scripts/papercut/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'parley: Run the server tests on the JVM and compiled'
+ working-directory: scripts/parley
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ - name: 'parley: Check that both runners reported'
+ working-directory: scripts/parley/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ - name: 'parley: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: parley-backend-tests
+ path: scripts/parley/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'pulse: Run the server tests on the JVM and compiled'
+ working-directory: scripts/pulse
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ - name: 'pulse: Check that both runners reported'
+ working-directory: scripts/pulse/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ - name: 'pulse: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: pulse-backend-tests
+ path: scripts/pulse/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'reel: Run the server tests on the JVM and compiled'
+ working-directory: scripts/reel
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ - name: 'reel: Check that both runners reported'
+ working-directory: scripts/reel/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ - name: 'reel: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: reel-backend-tests
+ path: scripts/reel/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'savor: Run the server tests on the JVM and compiled'
+ working-directory: scripts/savor
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ - name: 'savor: Check that both runners reported'
+ working-directory: scripts/savor/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ - name: 'savor: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: savor-backend-tests
+ path: scripts/savor/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'skirmish: Run the server tests on the JVM and compiled'
+ working-directory: scripts/skirmish
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ - name: 'skirmish: Check that both runners reported'
+ working-directory: scripts/skirmish/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ - name: 'skirmish: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: skirmish-backend-tests
+ path: scripts/skirmish/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'slate: Run the server tests on the JVM and compiled'
+ working-directory: scripts/slate
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ - name: 'slate: Check that both runners reported'
+ working-directory: scripts/slate/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ - name: 'slate: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: slate-backend-tests
+ path: scripts/slate/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'splat: Run the server tests on the JVM and compiled'
+ working-directory: scripts/splat
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ - name: 'splat: Check that both runners reported'
+ working-directory: scripts/splat/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ - name: 'splat: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: splat-backend-tests
+ path: scripts/splat/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'wayline: Run the server tests on the JVM and compiled'
+ working-directory: scripts/wayline
+ run: |
+ mvn -B -Dcodename1.platform=backend -pl shared,backend test \
+ -Dcn1.backend.compiledTests=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ - name: 'wayline: Check that both runners reported'
+ working-directory: scripts/wayline/backend/target/surefire-reports
+ run: |
+ jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
+ compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
+ echo "JVM reports: $jvm, compiled reports: $compiled"
+ if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
+ echo "::error::a runner produced no test reports"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ - name: 'wayline: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: wayline-backend-tests
+ path: scripts/wayline/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ chain:
+ name: Ether on a development chain
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.chain == 'true' }}
+ timeout-minutes: 45
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '8'
+ cache: maven
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Install the framework, the backend runtime and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ RETRY_ONLY_MATCHING: transient
+ - name: 'bastion: Deposit, sweep and withdraw on a geth development node'
+ run: scripts/bastion/run-chain-test.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ MAVEN_OPTS: -Dmaven.repo.local=${{ github.workspace }}/.m2-repo
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Check that the chain test ran'
+ working-directory: scripts/bastion/backend/target/surefire-reports
+ run: |
+ f=TEST-com.codenameone.examples.bastion.chain.ChainIntegrationTest.xml
+ grep -o 'tests="[0-9]*"[^>]*skipped="[0-9]*"' "$f"
+ if ! grep -q 'skipped="0"' "$f" || grep -q 'tests="0"' "$f"; then
+ echo "::error::ChainIntegrationTest did not run"
+ exit 1
+ fi
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ backend-database:
+ name: Server tests on ${{ matrix.database }}
+ runs-on: ubuntu-24.04
+ services:
+ postgres:
+ image: postgres:16
+ env:
+ POSTGRES_USER: cn1
+ POSTGRES_PASSWORD: secret
+ POSTGRES_DB: cn1
+ ports:
+ - 5432:5432
+ options: --health-cmd "pg_isready -U cn1" --health-interval 5s --health-timeout 5s --health-retries 20
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.backend-database == 'true' }}
+ timeout-minutes: 360
+ strategy:
+ fail-fast: false
+ matrix:
+ database:
+ - postgresql
+ - mysql
+ - sqlserver
+ - oracle
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Start MySQL
+ if: matrix.database == 'mysql'
+ run: |
+ sudo systemctl start mysql.service
+ sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
+ # The ledger reads what the writer before it committed, which
+ # REPEATABLE READ (MySQL's default) does not answer; the server
+ # refuses to start without this (IsolationCheck).
+ sudo mysql -uroot -proot -e "SET GLOBAL transaction_isolation = 'READ-COMMITTED';"
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '8'
+ cache: maven
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Install the framework, the backend runtime and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ RETRY_ONLY_MATCHING: transient
+ - name: Start ${{ matrix.database }}
+ if: matrix.database == 'sqlserver' || matrix.database == 'oracle'
+ run: scripts/ci/start-test-database.sh ${{ matrix.database }}
+ - name: 'bastion: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/bastion \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'bastion: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bastion-backend-${{ matrix.database }}-tests
+ path: scripts/bastion/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'bazaar: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/bazaar \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'bazaar: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bazaar-backend-${{ matrix.database }}-tests
+ path: scripts/bazaar/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'brickyard: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/brickyard \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' brickyard ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'brickyard: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' brickyard ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: brickyard-backend-${{ matrix.database }}-tests
+ path: scripts/brickyard/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'dash: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/dash \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'dash: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: dash-backend-${{ matrix.database }}-tests
+ path: scripts/dash/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'fieldline: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/fieldline \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'fieldline: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: fieldline-backend-${{ matrix.database }}-tests
+ path: scripts/fieldline/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'papercut: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/papercut \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'papercut: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: papercut-backend-${{ matrix.database }}-tests
+ path: scripts/papercut/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'parley: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/parley \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'parley: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: savor-backend-${{ matrix.database }}-tests
+ path: scripts/parley/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'pulse: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/pulse \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'pulse: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: pulse-backend-${{ matrix.database }}-tests
+ path: scripts/pulse/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'reel: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/reel \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'reel: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: reel-backend-${{ matrix.database }}-tests
+ path: scripts/reel/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'savor: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ -n "${CN1_TEST_DATABASE_URL:-}" ]; then
+ :
+ elif [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/savor \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ - name: 'savor: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: savor-backend-${{ matrix.database }}-tests
+ path: scripts/savor/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'skirmish: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/skirmish \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'skirmish: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: skirmish-backend-${{ matrix.database }}-tests
+ path: scripts/skirmish/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'slate: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/slate \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'slate: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: slate-backend-${{ matrix.database }}-tests
+ path: scripts/slate/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'splat: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/splat \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') }}
+ - name: 'splat: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') && (matrix.database == 'postgresql' || matrix.database == 'mysql') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: splat-backend-${{ matrix.database }}-tests
+ path: scripts/splat/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'wayline: Run the server tests on ${{ matrix.database }}'
+ run: |
+ if [ -n "${CN1_TEST_DATABASE_URL:-}" ]; then
+ :
+ elif [ "${{ matrix.database }}" = mysql ]; then
+ export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
+ else
+ export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
+ fi
+ scripts/ci/sample-server-tests-on-database.sh scripts/wayline \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ - name: 'wayline: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') && (always()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: wayline-backend-${{ matrix.database }}-tests
+ path: scripts/wayline/backend/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ client-e2e:
+ name: The app's tests, and the server driven over HTTP (JVM and compiled)
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.client-e2e == 'true' }}
+ timeout-minutes: 360
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Install native build tools
+ run: |
+ bash scripts/ci/apt-get-update.sh
+ sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '8'
+ cache: maven
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
+ env:
+ RETRY_ONLY_MATCHING: transient
+ RETRY_ATTEMPTS: '5'
+ RETRY_DELAY_SECONDS: '60'
+ run: |
+ export JAVA_HOME="${JAVA_HOME_8}"
+ export PATH="${JAVA_HOME_8}/bin:$PATH"
+ cd maven
+ bash ../scripts/ci/retry.sh mvn -B \
+ -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
+ -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
+ - name: Ensure a virtual display (xvfb) for the simulator
+ run: |
+ if ! command -v xvfb-run >/dev/null 2>&1; then
+ (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
+ fi
+ - name: 'bastion: Build a project generated from the Initializr template'
+ run: scripts/bastion/check-template.sh "$RUNNER_TEMP/bastion-template"
+ env:
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Build the app and run its tests'
+ working-directory: scripts/bastion
+ run: mvn -B -Dcodename1.platform=javase -Djava.awt.headless=true package
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Drive the JVM server over HTTP'
+ run: scripts/bastion/run-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Drive the compiled server over HTTP'
+ run: |
+ BASTION_SERVER_LOG="$GITHUB_WORKSPACE/scripts/bastion/target/e2e-server-native.log" \
+ scripts/bastion/run-e2e.sh --native
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Upload the server logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bastion-e2e
+ path: scripts/bastion/target/e2e-server*.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'bazaar: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/bazaar/check-template.sh "$RUNNER_TEMP/bazaar-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ - name: 'bazaar: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/bazaar/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ - name: 'bazaar: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bazaar-e2e
+ path: |
+ scripts/bazaar/target/e2e-shots/**
+ scripts/bazaar/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'dash: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/dash/check-template.sh "$RUNNER_TEMP/dash-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ - name: 'dash: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/dash/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ - name: 'dash: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: dash-e2e
+ path: |
+ scripts/dash/target/e2e-shots/**
+ scripts/dash/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'fieldline: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/fieldline/check-template.sh "$RUNNER_TEMP/fieldline-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ - name: 'fieldline: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/fieldline/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ - name: 'fieldline: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: fieldline-e2e
+ path: |
+ scripts/fieldline/target/e2e-shots/**
+ scripts/fieldline/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'papercut: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/papercut/check-template.sh "$RUNNER_TEMP/papercut-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ - name: 'papercut: Arena tests'
+ run: |
+ export JAVA_HOME="${JAVA_HOME_17}"
+ cd scripts/papercut
+ mvn -B -pl shared,common -am test -Dtest=ArenaTest -Dsurefire.failIfNoSpecifiedTests=false
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ - name: 'papercut: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/papercut/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ - name: 'papercut: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: papercut-e2e
+ path: |
+ scripts/papercut/target/e2e-shots/**
+ scripts/papercut/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'parley: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/parley/check-template.sh "$RUNNER_TEMP/parley-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ - name: 'parley: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/parley/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ - name: 'parley: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: parley-e2e
+ path: |
+ scripts/parley/target/e2e-shots/**
+ scripts/parley/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'pulse: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/pulse/check-template.sh "$RUNNER_TEMP/pulse-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ - name: 'pulse: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/pulse/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ - name: 'pulse: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: pulse-e2e
+ path: |
+ scripts/pulse/target/e2e-shots/**
+ scripts/pulse/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'reel: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/reel/check-template.sh "$RUNNER_TEMP/reel-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ - name: 'reel: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/reel/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ - name: 'reel: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: reel-e2e
+ path: |
+ scripts/reel/target/e2e-shots/**
+ scripts/reel/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'savor: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/savor/check-template.sh "$RUNNER_TEMP/savor-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ - name: 'savor: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/savor/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ - name: 'savor: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: savor-e2e
+ path: |
+ scripts/savor/target/e2e-shots/**
+ scripts/savor/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'skirmish: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/skirmish/check-template.sh "$RUNNER_TEMP/skirmish-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ - name: 'skirmish: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/skirmish/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ - name: 'skirmish: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: skirmish-e2e
+ path: |
+ scripts/skirmish/target/e2e-shots/**
+ scripts/skirmish/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'slate: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/slate/check-template.sh "$RUNNER_TEMP/slate-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ - name: 'slate: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/slate/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ - name: 'slate: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: slate-e2e
+ path: |
+ scripts/slate/target/e2e-shots/**
+ scripts/slate/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'splat: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/splat/check-template.sh "$RUNNER_TEMP/splat-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ - name: 'splat: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/splat/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ - name: 'splat: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: splat-e2e
+ path: |
+ scripts/splat/target/e2e-shots/**
+ scripts/splat/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'wayline: Build a project generated from the Initializr template'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/wayline/check-template.sh "$RUNNER_TEMP/wayline-template"
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ - name: 'wayline: Run the Initializr''s tests'
+ working-directory: scripts/initializr
+ run: |
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ xvfb-run -a mvn -B -Dcn1.localWorkspace=true -Dcodename1.platform=javase -Ptest verify
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ - name: 'wayline: Run the application against the server'
+ run: |
+ export JDK_8_HOME="${JAVA_HOME_8}"
+ export JAVA_HOME="${JAVA_HOME_17}"
+ export PATH="${JAVA_HOME_17}/bin:$PATH"
+ scripts/wayline/run-e2e.sh
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ - name: 'wayline: Upload the captures and the server log'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: wayline-e2e
+ path: |
+ scripts/wayline/target/e2e-shots/**
+ scripts/wayline/target/e2e-server.log
+ if-no-files-found: warn
+ retention-days: 14
+ web:
+ name: Web app hosted by the server (headless browser)
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.web == 'true' }}
+ timeout-minutes: 360
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '8'
+ cache: maven
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up Node 20
+ uses: actions/setup-node@v6
+ with:
+ node-version: '20'
+ - name: Cache Playwright browsers
+ uses: actions/cache@v5
+ with:
+ path: ~/.cache/ms-playwright
+ key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.os }}-playwright-chromium-
+ - name: Install Playwright Chromium
+ run: |
+ cd scripts
+ npm ci
+ # Playwright shells out to apt for the OS-level packages, so the
+ # runner image's third-party sources are pruned first.
+ bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
+ npx playwright install-deps chromium
+ npx playwright install chromium
+ - name: Install the framework, the backend runtime and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
+ -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ RETRY_ONLY_MATCHING: transient
+ - name: 'bastion: Run the hosted web app in a headless browser'
+ run: scripts/bastion/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ - name: 'bastion: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bastion-web-e2e
+ path: scripts/bastion/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'bazaar: Run the hosted web app in a headless browser'
+ run: scripts/bazaar/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ - name: 'bazaar: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: bazaar-web-e2e
+ path: scripts/bazaar/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'fieldline: Run the hosted web app in a headless browser'
+ run: scripts/fieldline/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ - name: 'fieldline: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: fieldline-web-e2e
+ path: scripts/fieldline/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'parley: Run the hosted web app in a headless browser'
+ run: scripts/parley/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ - name: 'parley: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: parley-web-e2e
+ path: scripts/parley/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'pulse: Run the hosted web app in a headless browser'
+ run: scripts/pulse/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ - name: 'pulse: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: pulse-web-e2e
+ path: scripts/pulse/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'reel: Run the hosted web app in a headless browser'
+ run: scripts/reel/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ - name: 'reel: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: reel-web-e2e
+ path: scripts/reel/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'savor: Run the hosted web app in a headless browser'
+ run: scripts/savor/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ - name: 'savor: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: savor-web-e2e
+ path: scripts/savor/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'slate: Run the hosted web app in a headless browser'
+ run: scripts/slate/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ - name: 'slate: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: slate-web-e2e
+ path: scripts/slate/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'wayline: Run the hosted web app in a headless browser'
+ run: scripts/wayline/run-web-e2e.sh
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ - name: 'wayline: Upload the screenshots and the logs'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: wayline-web-e2e
+ path: scripts/wayline/target/web-e2e/**
+ if-no-files-found: warn
+ retention-days: 14
+ android:
+ name: Android build
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.android == 'true' }}
+ timeout-minutes: 360
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Set TMPDIR
+ run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
+ - name: Cache codenameone-tools
+ uses: actions/cache@v5
+ with:
+ path: ${{ runner.temp }}/codenameone-tools
+ key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
+ restore-keys: |
+ ${{ runner.os }}-cn1-tools-
+ - name: Cache Maven repository
+ uses: actions/cache@v5
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-m2-samples-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-m2-samples-
+ ${{ runner.os }}-m2-
+ - name: Cache Gradle
+ uses: actions/cache@v5
+ with:
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+ ~/.codenameone/gradle8
+ key: ${{ runner.os }}-gradle-g8-samples-${{ hashFiles('Ports/Android/build.gradle*') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-samples-
+ ${{ runner.os }}-gradle-
+ - name: Setup workspace
+ run: ./scripts/setup-workspace.sh -q -DskipTests
+ - name: Build Android port
+ run: ./scripts/build-android-port.sh -q -DskipTests
+ - name: 'bastion: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ env:
+ CN1_APP_DIR: scripts/bastion
+ - name: 'bazaar: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ env:
+ CN1_APP_DIR: scripts/bazaar
+ - name: 'dash: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ env:
+ CN1_APP_DIR: scripts/dash
+ - name: 'fieldline: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ env:
+ CN1_APP_DIR: scripts/fieldline
+ - name: 'papercut: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ env:
+ CN1_APP_DIR: scripts/papercut
+ - name: 'parley: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ env:
+ CN1_APP_DIR: scripts/parley
+ - name: 'pulse: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ env:
+ CN1_APP_DIR: scripts/pulse
+ - name: 'reel: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ env:
+ CN1_APP_DIR: scripts/reel
+ - name: 'savor: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ env:
+ CN1_APP_DIR: scripts/savor
+ - name: 'skirmish: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ env:
+ CN1_APP_DIR: scripts/skirmish
+ - name: 'slate: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ env:
+ CN1_APP_DIR: scripts/slate
+ - name: 'splat: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ env:
+ CN1_APP_DIR: scripts/splat
+ - name: 'wayline: Build the Android application'
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-android-app.sh -q -DskipTests
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ env:
+ CN1_APP_DIR: scripts/wayline
+ build-ios-port:
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.ios == 'true' && github.event_name != 'schedule' }}
+ uses: ./.github/workflows/_build-ios-port.yml
+ ios-a:
+ name: iOS build (simulator) (a)
+ runs-on: xcode-27
+ needs:
+ - golden-plan
+ - select
+ - build-ios-port
+ if: ${{ !cancelled() && needs.build-ios-port.result == 'success' }}
+ timeout-minutes: 350
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Cache CocoaPods and user gems
+ uses: actions/cache@v5
+ with:
+ path: |
+ ~/.gem
+ ~/Library/Caches/CocoaPods
+ ~/.cocoapods/repos
+ key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
+ restore-keys: |
+ ${{ runner.os }}-pods-v1-
+ - name: Ensure CocoaPods tooling
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ set -euo pipefail
+ GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
+ export PATH="$GEM_USER_DIR/bin:$PATH"
+ if ! command -v pod >/dev/null 2>&1; then
+ gem install cocoapods xcodeproj --no-document --user-install
+ fi
+ pod --version
+ - name: Compute setup-workspace hash
+ id: setup_hash
+ run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
+ - name: Set TMPDIR
+ run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
+ - name: Cache codenameone-tools
+ uses: actions/cache@v5
+ with:
+ path: ${{ runner.temp }}/codenameone-tools
+ key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
+ restore-keys: |
+ ${{ runner.os }}-cn1-tools-
+ - name: Cache Maven repository
+ uses: actions/cache@v5
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-m2-
+ - name: Restore cn1-binaries cache
+ uses: actions/cache@v5
+ with:
+ path: ../cn1-binaries
+ key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
+ restore-keys: |
+ cn1-binaries-${{ runner.os }}-
+ - name: Download built CN1 + iOS port bundle
+ uses: actions/download-artifact@v4
+ with:
+ name: cn1-built-bundle
+ path: ${{ runner.temp }}
+ - name: Restore built CN1 + iOS port tree
+ run: |
+ set -euo pipefail
+ tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
+ - name: Install XcodeGen
+ run: brew install xcodegen
+ - name: 'bastion: Generate the Xcode project'
+ id: build-ios-app-bastion
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ env:
+ CN1_APP_DIR: scripts/bastion
+ - name: 'bastion: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-bastion.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-bastion.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/bastion-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -sdk iphonesimulator \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bastion ') }}
+ env:
+ CN1_APP_DIR: scripts/bastion
+ - name: 'dash: Generate the Xcode project'
+ id: build-ios-app-dash
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ env:
+ CN1_APP_DIR: scripts/dash
+ - name: 'dash: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-dash.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-dash.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/dash-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
+ # embedded watch app included, whose watch-only icon then has nothing to
+ # compile for. The destination picks each target's own SDK.
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ env:
+ CN1_APP_DIR: scripts/dash
+ - name: 'papercut: Generate the Xcode project'
+ id: build-ios-app-papercut
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ env:
+ CN1_APP_DIR: scripts/papercut
+ - name: 'papercut: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-papercut.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-papercut.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/papercut-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
+ # embedded watch app included, whose watch-only icon then has nothing to
+ # compile for. The destination picks each target's own SDK.
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' papercut ') }}
+ env:
+ CN1_APP_DIR: scripts/papercut
+ - name: 'pulse: Generate the Xcode project'
+ id: build-ios-app-pulse
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ env:
+ CN1_APP_DIR: scripts/pulse
+ - name: 'pulse: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-pulse.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-pulse.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/pulse-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
+ # embedded watch app included, whose watch-only icon then has nothing to
+ # compile for. The destination picks each target's own SDK.
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' pulse ') }}
+ env:
+ CN1_APP_DIR: scripts/pulse
+ - name: 'savor: Generate the Xcode project'
+ id: build-ios-app-savor
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ env:
+ CN1_APP_DIR: scripts/savor
+ - name: 'savor: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-savor.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-savor.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/savor-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -sdk iphonesimulator \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' savor ') }}
+ env:
+ CN1_APP_DIR: scripts/savor
+ - name: 'slate: Generate the Xcode project'
+ id: build-ios-app-slate
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ env:
+ CN1_APP_DIR: scripts/slate
+ - name: 'slate: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-slate.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-slate.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/slate-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
+ # embedded watch app included, whose watch-only icon then has nothing to
+ # compile for. The destination picks each target's own SDK.
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' slate ') }}
+ env:
+ CN1_APP_DIR: scripts/slate
+ - name: 'wayline: Generate the Xcode project'
+ id: build-ios-app-wayline
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ env:
+ CN1_APP_DIR: scripts/wayline
+ - name: 'wayline: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-wayline.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-wayline.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/wayline-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -sdk iphonesimulator \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' wayline ') }}
+ env:
+ CN1_APP_DIR: scripts/wayline
+ ios-b:
+ name: iOS build (simulator) (b)
+ runs-on: xcode-27
+ needs:
+ - golden-plan
+ - select
+ - build-ios-port
+ if: ${{ !cancelled() && needs.build-ios-port.result == 'success' }}
+ timeout-minutes: 300
+ steps:
+ - uses: actions/checkout@v6
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Cache CocoaPods and user gems
+ uses: actions/cache@v5
+ with:
+ path: |
+ ~/.gem
+ ~/Library/Caches/CocoaPods
+ ~/.cocoapods/repos
+ key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
+ restore-keys: |
+ ${{ runner.os }}-pods-v1-
+ - name: Ensure CocoaPods tooling
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ set -euo pipefail
+ GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
+ export PATH="$GEM_USER_DIR/bin:$PATH"
+ if ! command -v pod >/dev/null 2>&1; then
+ gem install cocoapods xcodeproj --no-document --user-install
+ fi
+ pod --version
+ - name: Compute setup-workspace hash
+ id: setup_hash
+ run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
+ - name: Set TMPDIR
+ run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
+ - name: Cache codenameone-tools
+ uses: actions/cache@v5
+ with:
+ path: ${{ runner.temp }}/codenameone-tools
+ key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
+ restore-keys: |
+ ${{ runner.os }}-cn1-tools-
+ - name: Cache Maven repository
+ uses: actions/cache@v5
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-m2-
+ - name: Restore cn1-binaries cache
+ uses: actions/cache@v5
+ with:
+ path: ../cn1-binaries
+ key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
+ restore-keys: |
+ cn1-binaries-${{ runner.os }}-
+ - name: Download built CN1 + iOS port bundle
+ uses: actions/download-artifact@v4
+ with:
+ name: cn1-built-bundle
+ path: ${{ runner.temp }}
+ - name: Restore built CN1 + iOS port tree
+ run: |
+ set -euo pipefail
+ tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
+ - name: Install XcodeGen
+ run: brew install xcodegen
+ - name: 'bazaar: Generate the Xcode project'
+ id: build-ios-app-bazaar
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ env:
+ CN1_APP_DIR: scripts/bazaar
+ - name: 'bazaar: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-bazaar.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-bazaar.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/bazaar-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -sdk iphonesimulator \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' bazaar ') }}
+ env:
+ CN1_APP_DIR: scripts/bazaar
+ - name: 'fieldline: Generate the Xcode project'
+ id: build-ios-app-fieldline
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ env:
+ CN1_APP_DIR: scripts/fieldline
+ - name: 'fieldline: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-fieldline.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-fieldline.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/fieldline-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
+ # embedded watch app included, whose watch-only icon then has nothing to
+ # compile for. The destination picks each target's own SDK.
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' fieldline ') }}
+ env:
+ CN1_APP_DIR: scripts/fieldline
+ - name: 'parley: Generate the Xcode project'
+ id: build-ios-app-parley
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ env:
+ CN1_APP_DIR: scripts/parley
+ - name: 'parley: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-parley.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-parley.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/parley-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -sdk iphonesimulator \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' parley ') }}
+ env:
+ CN1_APP_DIR: scripts/parley
+ - name: 'reel: Generate the Xcode project'
+ id: build-ios-app-reel
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ env:
+ CN1_APP_DIR: scripts/reel
+ - name: 'reel: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-reel.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-reel.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/reel-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -sdk iphonesimulator \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' reel ') }}
+ env:
+ CN1_APP_DIR: scripts/reel
+ - name: 'skirmish: Generate the Xcode project'
+ id: build-ios-app-skirmish
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ env:
+ CN1_APP_DIR: scripts/skirmish
+ - name: 'skirmish: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-skirmish.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-skirmish.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/skirmish-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -sdk iphonesimulator \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ env:
+ CN1_APP_DIR: scripts/skirmish
+ - name: 'splat: Generate the Xcode project'
+ id: build-ios-app-splat
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 25
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ env:
+ CN1_APP_DIR: scripts/splat
+ - name: 'splat: Build the application for the simulator'
+ run: |
+ set -euo pipefail
+ WORKSPACE='${{ steps.build-ios-app-splat.outputs.workspace }}'
+ SCHEME='${{ steps.build-ios-app-splat.outputs.scheme }}'
+ DERIVED_DATA="${{ runner.temp }}/splat-dd"
+ rm -rf "$DERIVED_DATA"
+ # One architecture, the host's: the port's SIMD natives are NEON
+ # under __aarch64__, and a universal simulator build compiles an
+ # x86_64 slice that has no use here.
+ HOST_ARCH="$(uname -m)"
+ case "$HOST_ARCH" in
+ arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
+ *) BUILD_ARCH=arm64 ;;
+ esac
+ XCB_CONTAINER_FLAG="-workspace"
+ if [[ "$WORKSPACE" != *.xcworkspace ]]; then
+ XCB_CONTAINER_FLAG="-project"
+ fi
+ # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
+ # embedded watch app included, whose watch-only icon then has nothing to
+ # compile for. The destination picks each target's own SDK.
+ xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
+ -configuration Debug \
+ -destination 'generic/platform=iOS Simulator' \
+ -derivedDataPath "$DERIVED_DATA" \
+ ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
+ EXCLUDED_ARCHS="armv7 armv7s" \
+ CODE_SIGNING_ALLOWED=NO build
+ APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
+ if [ -z "$APP_BUNDLE" ]; then
+ echo "::error::no .app bundle under $DERIVED_DATA"
+ exit 1
+ fi
+ timeout-minutes: 20
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ env:
+ CN1_APP_DIR: scripts/splat
+ app:
+ name: Engine and client tests
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.app == 'true' }}
+ timeout-minutes: 40
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '8'
+ cache: maven
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Install the framework and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
+ -pl core,css-compiler,codenameone-maven-plugin,backend \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ RETRY_ONLY_MATCHING: transient
+ - name: 'brickyard: Starter templates match their generator'
+ run: |
+ python3 scripts/brickyard/tools/gen-templates.py
+ git diff --exit-code -- scripts/brickyard/shared/src/main/resources/com/codenameone/examples/brickyard/rbx/templates
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' brickyard ') }}
+ - name: 'brickyard: Test the engine and the client'
+ working-directory: scripts/brickyard
+ run: |
+ mvn -B -Dcodename1.platform=javase -pl common -am test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' brickyard ') }}
+ rules:
+ name: Rules tests (deterministic simulation)
+ runs-on: ubuntu-24.04
+ needs:
+ - golden-plan
+ - select
+ if: ${{ !cancelled() && needs.golden-plan.outputs.run == 'true' && needs.select.outputs.rules == 'true' }}
+ timeout-minutes: 60
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up JDK 8
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '8'
+ cache: maven
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 8 Path
+ run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Set up JDK 17
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: '17'
+ - name: Use Google's copy of Maven Central first
+ uses: ./.github/actions/maven-central-mirror
+ - name: Save JDK 17 Path
+ run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
+ - name: Install the framework and the plugin
+ working-directory: maven
+ run: |
+ bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
+ -am install -DskipTests -Plocal-dev-javase \
+ -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
+ -Dmaven.javadoc.skip=true \
+ -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_8_HOME }}
+ RETRY_ONLY_MATCHING: transient
+ - name: 'dash: Run the simulation tests'
+ working-directory: scripts/dash
+ run: mvn -B -pl shared test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') }}
+ - name: 'dash: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' dash ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: dash-simulation-tests
+ path: scripts/dash/shared/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'skirmish: Run the simulation tests'
+ working-directory: scripts/skirmish
+ run: mvn -B -pl shared test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') }}
+ - name: 'skirmish: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' skirmish ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: skirmish-simulation-tests
+ path: scripts/skirmish/shared/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
+ - name: 'splat: Run the simulation tests'
+ working-directory: scripts/splat
+ run: mvn -B -pl shared test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
+ env:
+ JAVA_HOME: ${{ env.JDK_17_HOME }}
+ JDK_8_HOME: ${{ env.JDK_8_HOME }}
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') }}
+ - name: 'splat: Upload the test reports'
+ if: ${{ !cancelled() && contains(needs.select.outputs.samples, ' splat ') && (!cancelled()) }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: splat-simulation-tests
+ path: scripts/splat/shared/target/surefire-reports/**
+ if-no-files-found: warn
+ retention-days: 14
diff --git a/.github/workflows/savor.yml b/.github/workflows/savor.yml
deleted file mode 100644
index af3f08e7701..00000000000
--- a/.github/workflows/savor.yml
+++ /dev/null
@@ -1,602 +0,0 @@
-name: Savor (full-stack sample)
-
-# scripts/savor is one Maven project holding an application and its server:
-# a `shared` module of transfer objects and @RestClient contracts, the
-# Codename One client that calls them, and a Codename One Backend that
-# implements them. It is also what the initializr offers as a template.
-#
-# Six things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it under another name builds: its
-# server's tests pass and its app compiles (a step of client-e2e,
-# which has the artifacts installed)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/savor/**'
- - 'scripts/ci/sample-server-tests-on-database.sh'
- - 'scripts/ci/start-test-database.sh'
- - 'scripts/ci/reset-*.sh'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/savor.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/savor and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/savor
- run: python3 scripts/sync-initializr-template.py savor
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/savor
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/savor/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: savor-backend-tests
- path: scripts/savor/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql, sqlserver, oracle]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- # Started as steps, not services, so each leg pulls only its own image.
- # The script exports CN1_TEST_DATABASE_URL and CN1_TEST_DATABASE_RESET.
- - name: Start ${{ matrix.database }}
- if: matrix.database == 'sqlserver' || matrix.database == 'oracle'
- run: scripts/ci/start-test-database.sh ${{ matrix.database }}
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ -n "${CN1_TEST_DATABASE_URL:-}" ]; then
- :
- elif [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/savor \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: savor-backend-${{ matrix.database }}-tests
- path: scripts/savor/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/savor/check-template.sh "$RUNNER_TEMP/savor-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/savor/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: savor-e2e
- path: |
- scripts/savor/target/e2e-shots/**
- scripts/savor/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/savor/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: savor-web-e2e
- path: scripts/savor/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/savor
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-savor-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-savor-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-savor-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-savor-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/savor
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/savor-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -sdk iphonesimulator \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/scripts-android.yml b/.github/workflows/scripts-android.yml
index 661a4eef972..a1ccd358ec6 100644
--- a/.github/workflows/scripts-android.yml
+++ b/.github/workflows/scripts-android.yml
@@ -14,166 +14,19 @@ name: Test Android build scripts
type: string
schedule:
- cron: '5 1 * * *'
- 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/compose-compat/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- - '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/scripts-android.yml'
- - 'scripts/setup-workspace.sh'
- - 'scripts/ci/retry.sh'
- - 'scripts/build-android-port.sh'
- - 'scripts/build-android-app.sh'
- - 'scripts/verify-android-app-compile-sdk.sh'
- - 'scripts/check-android-api-removals.py'
- - 'scripts/android/newest-platform-package.sh'
- - 'scripts/run-android-instrumentation-tests.sh'
- - 'scripts/generate-android-coverage-report.sh'
- - 'scripts/android/lib/**/*.java'
- - 'scripts/android/tests/**/*.java'
- - 'scripts/device-runner-app/**/*.java'
- - 'scripts/hellocodenameone/**'
- - 'scripts/android/screenshots/**'
- - '!scripts/android/screenshots/**/*.md'
- - 'scripts/templates/**'
- - '!scripts/templates/**/*.md'
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'Ports/Android/**'
- - '!Ports/Android/**/*.md'
- - 'native-themes/android-material/**'
- - '!native-themes/android-material/**/*.md'
- - 'maven/**'
- - '!maven/core-unittests/**'
- - 'tests/**'
- - '!tests/**/*.md'
- - '!docs/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/ci/tests/cn1ss-selfcheck-test.sh'
- push:
- 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/compose-compat/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- - '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/scripts-android.yml'
- - 'scripts/setup-workspace.sh'
- - 'scripts/ci/retry.sh'
- - 'scripts/build-android-port.sh'
- - 'scripts/build-android-app.sh'
- - 'scripts/verify-android-app-compile-sdk.sh'
- - 'scripts/check-android-api-removals.py'
- - 'scripts/android/newest-platform-package.sh'
- - 'scripts/run-android-instrumentation-tests.sh'
- - 'scripts/generate-android-coverage-report.sh'
- - 'scripts/android/lib/**/*.java'
- - 'scripts/android/tests/**/*.java'
- - 'scripts/device-runner-app/**/*.java'
- - 'scripts/hellocodenameone/**'
- - 'scripts/android/screenshots/**'
- - '!scripts/android/screenshots/**/*.md'
- - 'scripts/templates/**'
- - '!scripts/templates/**/*.md'
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'Ports/Android/**'
- - '!Ports/Android/**/*.md'
- - 'native-themes/android-material/**'
- - '!native-themes/android-material/**/*.md'
- - 'maven/**'
- - '!maven/core-unittests/**'
- - 'tests/**'
- - '!tests/**/*.md'
- - '!docs/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/ci/tests/cn1ss-selfcheck-test.sh'
-
-# The token in secrets.CN1SS_GH_TOKEN was generated on
-# Oct 16th 2025. If in Oct 2026 builds start failing, it
-# means the token needs to be regenerated:
-# 1. Go to https://github.com/settings/tokens -> "Developer settings" -> "Personal access tokens".
-# 2. Choose Fine-grained token (recommended).
-# 3. Grant:
-# * Repository access -> select Codename One
-# * Permissions:
-# * Contents -> Read and Write
-# * Pull requests -> Read and Write
-# * Issues -> Read and Write
-# 4. Copy the generated token
-# 5. Go to https://github.com/codenameone/CodenameOne/settings/secrets/actions
-# and edit the CN1SS_GH_TOKEN to use the new token
-
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: scripts-android-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # First, so a PR whose new screenshot tests have no goldens yet runs nothing
- # here; Golden capture (golden-capture.yml) records them instead.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- with:
- capture: ${{ inputs.cn1ss_capture || '' }}
-
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
build-android:
- if: needs.golden-plan.outputs.run == 'true'
name: Build Android ${{ matrix.name }}
- needs: [golden-plan, unity-gallery]
strategy:
fail-fast: false
# A golden capture runs the Default leg alone. All three legs share
@@ -202,7 +55,8 @@ jobs:
pull-requests: write
issues: write
runs-on: ubuntu-24.04
- timeout-minutes: 60
+ # 60 for the build and suite, plus the fidelity run on the default leg.
+ timeout-minutes: 90
env:
GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
@@ -265,7 +119,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-android-${{ matrix.id }}-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-android-${{ matrix.id }}-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-android-${{ matrix.id }}-
${{ runner.os }}-m2-
@@ -338,10 +192,6 @@ jobs:
# tried and is wrong here, because -Pcompile-android reads its jars
# from maven/target/cn1-binaries, which this job never stages.
python3 scripts/check-android-api-removals.py --require-all
- # 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: Enter golden capture mode
uses: ./.github/actions/cn1ss-capture
@@ -378,6 +228,59 @@ jobs:
- name: Rebuild the generated app at API 37
if: matrix.id == 'default'
run: ./scripts/verify-android-app-compile-sdk.sh "${{ steps.build-android-app.outputs.gradle_project_dir }}" 37
+ # Native theme fidelity (Material 3), on the default leg's port build:
+ # it used to be scripts-fidelity.yml's own job, which set up the
+ # workspace and built the Android port a second time. The fidelity app
+ # renders each component as the CN1 widget AND the native widget in this
+ # same emulator and diffs the two; the committed baseline is the ratchet
+ # floor (re-anchor locally with FIDELITY_UPDATE_BASELINE=1). Not in a
+ # golden capture, and after the screenshot suite so it cannot change what
+ # that suite rendered.
+ - name: Regenerate native themes from CSS (fidelity)
+ if: ${{ !cancelled() && matrix.id == 'default' && inputs.cn1ss_capture == '' }}
+ # The fidelity app bundles a committed .res; theme.css is the source of
+ # truth. Recompile here so a stale committed copy can never silently
+ # render an old theme (the cause of phantom "regressions").
+ run: ./scripts/build-native-themes.sh
+ - name: Build fidelity app (Android)
+ id: fidelity_build
+ if: ${{ !cancelled() && matrix.id == 'default' && inputs.cn1ss_capture == '' }}
+ run: |
+ mkdir -p ~/.codenameone
+ cp maven/UpdateCodenameOne.jar ~/.codenameone/
+ ./scripts/build-fidelity-app.sh android -q -DskipTests
+ - name: Run fidelity suite (emulator)
+ if: ${{ !cancelled() && steps.fidelity_build.outcome == 'success' }}
+ uses: reactivecircus/android-emulator-runner@v2
+ env:
+ CN1SS_FAIL_ON_MISMATCH: '1'
+ CN1SS_FIDELITY_EPSILON: '2.0'
+ # CI renders differ subtly from a developer machine: re-seed the
+ # per-environment native goldens here; the ratchet gates the
+ # CN1-vs-native SCORE against the committed baseline, which is
+ # portable because both sides are rendered in this emulator.
+ FIDELITY_UPDATE_GOLDENS: '1'
+ with:
+ # Part of the android-m3 golden-set contract: the committed native
+ # references (scripts/build-android-native-ref.sh) are captured on
+ # this API level AND a 480x800 @ 160dpi screen. The wm override is
+ # load-bearing: the default AVD screen (320x640) is narrower than the
+ # 60mm tile (377px at 160dpi) and clamped every CN1 tile.
+ api-level: 36
+ arch: x86_64
+ target: google_apis
+ disk-size: 2048M
+ script: adb shell wm size 480x800 && adb shell wm density 160 && ./scripts/run-android-fidelity-tests.sh "${{ steps.fidelity_build.outputs.gradle_project_dir }}"
+ - name: Upload fidelity artifacts
+ if: ${{ !cancelled() && steps.fidelity_build.outcome != 'skipped' }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: android-fidelity
+ path: |
+ artifacts/android-fidelity/**
+ scripts/fidelity-app/baseline/android-m3-fidelity-baseline.json
+ if-no-files-found: warn
+ retention-days: 14
- name: Upload Android port status
if: ${{ !cancelled() && matrix.id == 'default' }}
uses: actions/upload-artifact@v7
diff --git a/.github/workflows/scripts-fidelity-desktop.yml b/.github/workflows/scripts-fidelity-desktop.yml
index 3130b9759cc..40e01741d4f 100644
--- a/.github/workflows/scripts-fidelity-desktop.yml
+++ b/.github/workflows/scripts-fidelity-desktop.yml
@@ -2,9 +2,9 @@
name: Desktop theme fidelity
# Scores the desktop native themes -- Windows Fluent, macOS Aqua, GNOME Adwaita -- against the
-# captured native references, the same way scripts-fidelity.yml does for iOS and Android.
+# captured native references, the same way scripts-ios.yml (iOS, the apple job) and scripts-android.yml (Android) do.
#
-# A SEPARATE workflow rather than three more jobs in scripts-fidelity.yml. That file's
+# A SEPARATE workflow rather than three more jobs in the (since retired) scripts-fidelity.yml. That file's
# pull_request paths trigger the WHOLE workflow, so adding these there would run the Android
# emulator and the iOS simulator legs on every desktop CSS tweak, and would tie the desktop
# gate's timing to theirs. They share the comparator and the golden-set machinery, which is
@@ -123,7 +123,7 @@ jobs:
case "$leg" in
gnome) runner=ubuntu-24.04 ;;
windows) runner=windows-11-arm ;;
- macos) runner=macos-15 ;;
+ macos) runner=xcode-27 ;;
esac
entries="$entries{\"platform\":\"$leg\",\"runner\":\"$runner\"},"
done
@@ -208,7 +208,7 @@ jobs:
# classpath so a stale copy elsewhere cannot win -- which also means that without
# this step a push that changes only native-themes//theme.css is scored
# against the PREVIOUS compiled theme and can pass without the change being tested.
- # Same step, same reason, as the Android and iOS legs in scripts-fidelity.yml.
+ # Same step, same reason, as the Android leg in scripts-android.yml and the iOS leg in scripts-ios.yml.
run: ./scripts/build-native-themes.sh
- name: Score the theme against the native reference
diff --git a/.github/workflows/scripts-fidelity.yml b/.github/workflows/scripts-fidelity.yml
deleted file mode 100644
index 4e491f634bc..00000000000
--- a/.github/workflows/scripts-fidelity.yml
+++ /dev/null
@@ -1,476 +0,0 @@
----
-name: Native theme fidelity
-
-# Measures how close Codename One's native themes render to the REAL native OS
-# widgets. Runs the fidelity app on an Android emulator (Material 3) and an iOS
-# simulator (Modern theme, Metal pipeline): each component is rendered as the CN1
-# widget AND the native widget IN THE SAME ENVIRONMENT, and the two are diffed.
-# Comparing same-environment renders makes the score robust to the subtle
-# rendering differences between CI machines; the committed goldens + baselines
-# are re-seedable drift artifacts (FIDELITY_UPDATE_GOLDENS / _BASELINE).
-
-'on':
- # Keep manual dispatch available for deliberate fidelity runs outside the
- # native-theme CSS change workflow.
- workflow_dispatch:
- pull_request:
- paths:
- # The 26 row's trigger was CSS-only by design. The 27 row is not: it is the
- # only check on a theme generation nothing else exercises, and a renderer,
- # port, harness or workflow change reaches it without touching any CSS.
- # This PR proved the gap -- it edits the workflow, GlassRecipe, the gate and
- # the frame goldens, and neither fidelity row ran.
- - '.github/workflows/scripts-fidelity.yml'
- - 'scripts/build-fidelity-app.sh'
- - 'scripts/run-ios-fidelity-tests.sh'
- # The iOS legs boot their simulator through this helper and read its
- # `udid` output, so a change to it alone must exercise them.
- - 'scripts/ci/boot-ios-simulator.sh'
- - 'scripts/run-android-fidelity-tests.sh'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/common/java/**'
- - 'scripts/fidelity-app/**'
- - '!scripts/fidelity-app/*-native-ref/**'
- - 'CodenameOne/src/com/codename1/ui/plaf/**'
- # One entry per THEME, not per file: ios-modern is built from
- # common.css + gen26.css + gen27.css since the generation split, and this
- # list still named the theme.css that split removed -- so from that merge
- # until this fix, NO pull request could trigger the iOS fidelity suite at
- # all. It went unnoticed because the splitting PR itself matched: deleting
- # a path counts as touching it, so the last PR this gate ran on was the one
- # that broke it.
- #
- # Globbed by directory so the next part file is covered on the day it is
- # added rather than the day someone notices. native-themes//target/
- # is the concatenated build input and is gitignored, so it never appears in
- # a pull request and cannot widen this.
- - 'native-themes/ios-modern/**'
- - 'native-themes/android-material/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
- - 'scripts/lib/cn1ss.sh'
- push:
- branches: [master]
- paths:
- - '.github/workflows/scripts-fidelity.yml'
- - 'scripts/build-fidelity-app.sh'
- - 'scripts/run-android-fidelity-tests.sh'
- - 'scripts/run-ios-fidelity-tests.sh'
- # The iOS legs boot their simulator through this helper and read its
- # `udid` output, so a change to it alone must exercise them.
- - 'scripts/ci/boot-ios-simulator.sh'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/common/java/**'
- - 'scripts/fidelity-app/**'
- # The standalone native-reference apps are excluded on purpose. CI never runs
- # them -- references are captured off-CI and committed (see
- # scripts/fidelity-app/README.md) -- so a change to one cannot move an Android or
- # iOS fidelity score, and letting them through costs a 60 + 90 minute emulator and
- # simulator run per edit. That matters most for the desktop reference apps, which
- # are iterated against a manual dispatch workflow and would otherwise fire this one
- # on every push.
- - '!scripts/fidelity-app/*-native-ref/**'
- - 'native-themes/ios-modern/**'
- - 'native-themes/android-material/**'
- - 'CodenameOne/src/**'
- - 'Ports/Android/**'
- - 'Ports/iOSPort/**'
- - 'vm/**'
- - 'maven/**'
- - '!maven/core-unittests/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- fidelity-android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Fidelity (Android, Material 3)
- permissions:
- contents: read
- pull-requests: write
- issues: write
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- CN1SS_FAIL_ON_MISMATCH: '1'
- CN1SS_FIDELITY_EPSILON: '2.0'
- # CI renders differ subtly from a developer machine, so the committed
- # goldens captured elsewhere will not match here. Re-seed goldens AND
- # baseline from this environment's own native renders, then the same-run
- # comparison + ratchet gate are evaluated against this environment.
- # Refresh the per-environment native goldens (drift artifact); the
- # ratchet gates the CN1-vs-native SCORE against the committed baseline,
- # which is portable across environments because both sides are rendered
- # here. A score gap beyond the epsilon fails loudly, surfacing a real
- # environment/theme difference to investigate (then reseed deliberately).
- FIDELITY_UPDATE_GOLDENS: '1'
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-fidelity-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- ~/.codenameone/gradle9.*
- key: ${{ runner.os }}-gradle-g8g9-fidelity-${{ hashFiles('scripts/fidelity-app/**/gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Regenerate native themes from CSS
- # The fidelity app bundles a committed .res; theme.css is the source of
- # truth. Recompile here so a stale committed copy can never silently
- # render an old theme (the cause of phantom "regressions").
- run: ./scripts/build-native-themes.sh
- - name: Build fidelity app (Android)
- id: build
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-fidelity-app.sh android -q -DskipTests
- - name: Enable KVM for Android emulator
- run: |
- echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
- sudo udevadm control --reload-rules
- sudo udevadm trigger --name-match=kvm
- - name: Run fidelity suite (emulator)
- uses: reactivecircus/android-emulator-runner@v2
- with:
- # The emulator profile is part of the android-m3 golden-set contract:
- # the committed native references (scripts/build-android-native-ref.sh)
- # are captured LOCALLY on the same API level AND the same 480x800 @
- # 160dpi screen, so CI never generates references -- it only renders
- # the CN1 side and diffs. The wm size/density override below is
- # load-bearing: the runner's default AVD screen (320x640) is narrower
- # than the 60mm tile (377px at 160dpi), which silently clamped every
- # CN1 tile to the 320px screen width and skewed all comparator scores.
- api-level: 36
- arch: x86_64
- target: google_apis
- disk-size: 2048M
- # The committed baseline is the ratchet floor: the gate fails the job
- # on any regression. To re-anchor intentionally, run locally with
- # FIDELITY_UPDATE_BASELINE=1 and commit the updated baseline JSON.
- script: adb shell wm size 480x800 && adb shell wm density 160 && ./scripts/run-android-fidelity-tests.sh "${{ steps.build.outputs.gradle_project_dir }}"
- - name: Upload fidelity artifacts
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: android-fidelity
- path: |
- artifacts/android-fidelity/**
- scripts/fidelity-app/baseline/android-m3-fidelity-baseline.json
- if-no-files-found: warn
- retention-days: 14
-
- fidelity-ios-metal:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Fidelity (iOS Modern, Metal)
- permissions:
- contents: read
- pull-requests: write
- issues: write
- runs-on: macos-15
- timeout-minutes: 90
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- CN1SS_FAIL_ON_MISMATCH: '1'
- CN1SS_FIDELITY_EPSILON: '2.0'
- # iOS native references are COMMITTED goldens generated offline by
- # scripts/build-ios-native-ref.sh (a real-UIWindow native app); they are not
- # regenerated here, so no FIDELITY_UPDATE_GOLDENS.
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-fidelity-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build iOS port
- run: ./scripts/build-ios-port.sh -q -DskipTests
- - name: Regenerate native themes from CSS
- # The fidelity app bundles a committed .res; theme.css is the source of
- # truth. Recompile here so a stale committed copy can never silently
- # render an old theme (the cause of phantom "regressions").
- run: ./scripts/build-native-themes.sh
- - name: Install Metal toolchain
- run: |
- # Into the SAME Xcode build-ios-app.sh and the simulator build use.
- # Downloading the toolchain for the runner's ambient Xcode installs it
- # where the pinned one will not look.
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- xcodebuild -downloadComponent MetalToolchain || true
- - name: Build fidelity app (iOS, Metal)
- id: build
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-fidelity-app.sh ios -q -DskipTests
- - name: Build simulator app
- id: simapp
- run: |
- set -euo pipefail
- # build-fidelity-app.sh -> build-ios-app.sh is pinned by
- # scripts/lib/xcode.sh; this step used to compile that project with the
- # runner's ambient xcodebuild instead, so the project was GENERATED by
- # one Xcode and BUILT by another. Pin both ends to the same one.
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- WS="$(find scripts/fidelity-app/ios/target -name '*.xcworkspace' -maxdepth 3 | head -n1)"
- PROJ_DIR="$(dirname "$WS")"
- SCHEME="$(xcodebuild -workspace "$WS" -list 2>/dev/null | awk '/Schemes:/{f=1;next} f&&NF{print $1; exit}')"
- DD="$PROJ_DIR/dd"
- # arm64-only: the macos-15 runner is Apple Silicon and the x86_64
- # simulator slice fails to build the ParparVM SIMD code (clang
- # '_Builtin_intrinsics.arm.neon requires feature neon' module error).
- xcodebuild -workspace "$WS" -scheme "$SCHEME" -sdk iphonesimulator \
- -configuration Debug -derivedDataPath "$DD" \
- ARCHS=arm64 ONLY_ACTIVE_ARCH=YES VALID_ARCHS=arm64 \
- CODE_SIGNING_ALLOWED=NO build
- APP="$(find "$DD/Build/Products" -maxdepth 2 -name '*.app' -type d | head -n1)"
- echo "app_path=$APP" >> "$GITHUB_OUTPUT"
- - name: Boot simulator (runtime matching the golden set)
- id: sim
- # The golden set names the OS design generation it was captured on
- # (ios-26-metal). The suite MUST run on a matching runtime: a different
- # iOS generation renders different SF fonts/glyphs and produces phantom
- # regressions. The helper fails loudly (78) if the runner lacks the
- # runtime -- the fix is pinning a runner image/Xcode that ships it,
- # never regenerating references on whatever the runner happens to have.
- #
- # It also puts every simctl call on a deadline. Inline, these four calls
- # twice hung with no output at all and burned the job's entire 90-minute
- # budget, ending as "cancelled" rather than as a failure; the script's
- # header records the runs and why the one retry it does is allowed.
- run: ./scripts/ci/boot-ios-simulator.sh 'iOS-26[0-9-]*' 'iPhone 16' iPhone16-fidelity
- - name: Run fidelity suite (simulator, Metal)
- # The committed baseline is the ratchet floor: the gate fails the job
- # on any regression. To re-anchor intentionally, run locally with
- # FIDELITY_UPDATE_BASELINE=1 and commit the updated baseline JSON.
- run: ./scripts/run-ios-fidelity-tests.sh "${{ steps.simapp.outputs.app_path }}" "${{ steps.sim.outputs.udid }}"
- - name: Upload fidelity artifacts
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: ios-fidelity
- path: |
- artifacts/ios-fidelity/**
- scripts/fidelity-app/baseline/ios-26-metal-fidelity-baseline.json
- if-no-files-found: warn
- retention-days: 14
-
- # The SAME suite as fidelity-ios-metal, scored against the iOS 27 golden set on
- # the Xcode 27 / iOS 27 image. A copy rather than a move: the 26 row keeps
- # gating the generation applications get by default (ios.themeGeneration
- # defaults to 26), and this row is what keeps the 27 theme honest.
- #
- # Identical to fidelity-ios-metal except the runner, the toolchain pin, the
- # golden set, the simulator runtime and the artifact/baseline names --
- # scripts/check-duplicated-ci-legs.py holds it to that.
- fidelity-ios-metal-27:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Fidelity (iOS Modern 27, Metal)
- # A real gate, like the iOS 26 row: the committed ios-27-metal baseline is
- # its ratchet. It was the last row to get one because iOS 27's dark glass
- # panel over a flat backdrop drew no silhouette of its own -- what makes the
- # native one visible is a thin dark outline iOS 27 adds around the sides of
- # its glass, which the optics now reproduce (GlassRecipe.getOutline).
- permissions:
- contents: read
- pull-requests: write
- issues: write
- runs-on: xcode-27
- timeout-minutes: 90
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- CN1SS_FAIL_ON_MISMATCH: '1'
- CN1SS_FIDELITY_EPSILON: '2.0'
- # Drives the capture, the app build and the comparison from ONE variable:
- # build-ios-native-ref.sh, build-fidelity-app.sh (which turns it into
- # ios.themeGeneration=27) and run-ios-fidelity-tests.sh all read it, so the
- # theme the app ships and the goldens it is scored against cannot disagree.
- CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'
- # scripts/lib/xcode.sh resolves this; left at 26 on an image that ships only
- # Xcode 27 it fails resolution rather than quietly using the wrong one.
- CN1_XCODE_MAJOR: '27'
- # iOS native references are COMMITTED goldens generated offline by
- # scripts/build-ios-native-ref.sh (a real-UIWindow native app); they are not
- # regenerated here, so no FIDELITY_UPDATE_GOLDENS.
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-fidelity-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build iOS port
- run: ./scripts/build-ios-port.sh -q -DskipTests
- - name: Regenerate native themes from CSS
- # The fidelity app bundles a committed .res; theme.css is the source of
- # truth. Recompile here so a stale committed copy can never silently
- # render an old theme (the cause of phantom "regressions").
- run: ./scripts/build-native-themes.sh
- - name: Install Metal toolchain
- run: |
- # Into the SAME Xcode build-ios-app.sh and the simulator build use.
- # Downloading the toolchain for the runner's ambient Xcode installs it
- # where the pinned one will not look.
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- xcodebuild -downloadComponent MetalToolchain || true
- - name: Build fidelity app (iOS, Metal)
- id: build
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-fidelity-app.sh ios -q -DskipTests
- - name: Build simulator app
- id: simapp
- run: |
- set -euo pipefail
- # build-fidelity-app.sh -> build-ios-app.sh is pinned by
- # scripts/lib/xcode.sh; this step used to compile that project with the
- # runner's ambient xcodebuild instead, so the project was GENERATED by
- # one Xcode and BUILT by another. Pin both ends to the same one.
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- WS="$(find scripts/fidelity-app/ios/target -name '*.xcworkspace' -maxdepth 3 | head -n1)"
- PROJ_DIR="$(dirname "$WS")"
- SCHEME="$(xcodebuild -workspace "$WS" -list 2>/dev/null | awk '/Schemes:/{f=1;next} f&&NF{print $1; exit}')"
- DD="$PROJ_DIR/dd"
- # arm64-only: the macos-15 runner is Apple Silicon and the x86_64
- # simulator slice fails to build the ParparVM SIMD code (clang
- # '_Builtin_intrinsics.arm.neon requires feature neon' module error).
- xcodebuild -workspace "$WS" -scheme "$SCHEME" -sdk iphonesimulator \
- -configuration Debug -derivedDataPath "$DD" \
- ARCHS=arm64 ONLY_ACTIVE_ARCH=YES VALID_ARCHS=arm64 \
- CODE_SIGNING_ALLOWED=NO build
- APP="$(find "$DD/Build/Products" -maxdepth 2 -name '*.app' -type d | head -n1)"
- echo "app_path=$APP" >> "$GITHUB_OUTPUT"
- - name: Boot simulator (runtime matching the golden set)
- id: sim
- # The golden set names the OS design generation it was captured on
- # (ios-26-metal). The suite MUST run on a matching runtime: a different
- # iOS generation renders different SF fonts/glyphs and produces phantom
- # regressions. The helper fails loudly (78) if the runner lacks the
- # runtime -- the fix is pinning a runner image/Xcode that ships it,
- # never regenerating references on whatever the runner happens to have.
- #
- # It also puts every simctl call on a deadline. Inline, these four calls
- # twice hung with no output at all and burned the job's entire 90-minute
- # budget, ending as "cancelled" rather than as a failure; the script's
- # header records the runs and why the one retry it does is allowed.
- run: ./scripts/ci/boot-ios-simulator.sh 'iOS-27[0-9-]*' 'iPhone 16' iPhone16-fidelity27
- - name: Run fidelity suite (simulator, Metal)
- # The committed baseline is the ratchet floor: the gate fails the job
- # on any regression. To re-anchor intentionally, run locally with
- # FIDELITY_UPDATE_BASELINE=1 and commit the updated baseline JSON.
- run: ./scripts/run-ios-fidelity-tests.sh "${{ steps.simapp.outputs.app_path }}" "${{ steps.sim.outputs.udid }}"
- - name: Upload fidelity artifacts
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: ios-fidelity-27
- path: |
- artifacts/ios-fidelity/**
- scripts/fidelity-app/baseline/ios-27-metal-fidelity-baseline.json
- if-no-files-found: warn
- retention-days: 14
diff --git a/.github/workflows/scripts-ios-native.yml b/.github/workflows/scripts-ios-native.yml
index 553829e5767..62c6074ef92 100644
--- a/.github/workflows/scripts-ios-native.yml
+++ b/.github/workflows/scripts-ios-native.yml
@@ -8,11 +8,6 @@ on:
port_prepared:
type: boolean
default: false
- # True when the caller already ran unity-gallery-prebuilt.yml in this run:
- # its artifact has a fixed name and cannot be uploaded twice.
- unity_prepared:
- type: boolean
- default: false
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
@@ -31,22 +26,16 @@ env:
CN1_CULL_TRAP: '1'
jobs:
- # The application has a Unity project in it. One Linux job compiles it and
- # hands the result to the job below as an artifact, unless the caller did.
- unity-gallery:
- if: ${{ !inputs.unity_prepared }}
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
build-port:
if: ${{ !inputs.port_prepared }}
uses: ./.github/workflows/_build-ios-port.yml
native-ios:
- if: ${{ !cancelled() && (inputs.port_prepared || needs.build-port.result == 'success') && (inputs.unity_prepared || needs.unity-gallery.result == 'success') }}
- needs: [build-port, unity-gallery]
+ if: ${{ !cancelled() && (inputs.port_prepared || needs.build-port.result == 'success') }}
+ needs: [build-port]
permissions:
contents: read
- runs-on: macos-15
+ runs-on: xcode-27
# Allow setup plus the separately bounded 30-minute generation and 45-minute
# XCTest build/run steps. A 45-minute job cap canceled a progressing native
# build after only 34 minutes of the XCTest step in run 37728629000.
@@ -117,7 +106,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
@@ -141,11 +130,6 @@ jobs:
# build-port handed off (not LRU-evicted, survives --failed re-runs).
tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
- # 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
id: build_ios_app
run: ./scripts/build-ios-app.sh -q -DskipTests
diff --git a/.github/workflows/scripts-ios.yml b/.github/workflows/scripts-ios.yml
index 265376878b8..36af0b50def 100644
--- a/.github/workflows/scripts-ios.yml
+++ b/.github/workflows/scripts-ios.yml
@@ -15,133 +15,14 @@ on:
type: string
schedule:
- cron: 15 1 * * *
- 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/scripts-ios.yml
- - .github/workflows/_build-ios-port.yml
- - scripts/setup-workspace.sh
- - scripts/build-ios-port.sh
- - scripts/build-ios-app.sh
- - scripts/check-ios-framework-links.py
- - scripts/check-ios-sdk-deltas.py
- - scripts/check-ios-private-api.py
- - scripts/lib/xcode.sh
- - scripts/run-ios-ui-tests.sh
- - scripts/ci/boot-ios-simulator.sh
- - scripts/run-watch-ui-tests.sh
- - scripts/run-tv-ui-tests.sh
- - scripts/run-ios-native-tests.sh
- - scripts/ios/notification-tests/native-tests/**
- - scripts/ios/notification-tests/install-native-notification-tests.sh
- - scripts/ios/notification-tests/**
- - scripts/hellocodenameone/**
- - scripts/ios/tests/**
- - scripts/ios/screenshots-metal/**
- - scripts/ios/screenshots-metal-27/**
- - scripts/ios/screenshots-watch/**
- - scripts/ios/screenshots-tv/**
- - scripts/templates/**
- - CodenameOne/src/**
- - Ports/iOSPort/**
- - native-themes/ios-modern/**
- - vm/**
- - tests/**
- - maven/**
- - scripts/hellocodenameone/backend/**
- - scripts/lib/cn1ss.sh
- - .github/workflows/scripts-ios-native.yml
- - scripts/ios/create-shared-scheme.py
- - .github/workflows/ios-packaging.yml
- - maven/codenameone-maven-plugin/**
- - vm/ByteCodeTranslator/**
- - scripts/run-ios-device-release-build.sh
- - scripts/ios/**
- - scripts/common/java/**
- - '!**/*.md'
- - '!maven/cn1-ai-*/**'
- - '!maven/cn1-admob/**'
- - '!maven/cn1-applovin/**'
- - '!maven/cn1-unity-levelplay/**'
- - .github/ci/apple-checks.json
- - scripts/ci/select-apple-checks.py
- - scripts/ci/select-cn1lib-checks.py
- push:
- 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/scripts-ios.yml
- - .github/workflows/_build-ios-port.yml
- - scripts/setup-workspace.sh
- - scripts/build-ios-port.sh
- - scripts/build-ios-app.sh
- - scripts/check-ios-framework-links.py
- - scripts/check-ios-sdk-deltas.py
- - scripts/check-ios-private-api.py
- - scripts/lib/xcode.sh
- - scripts/run-ios-ui-tests.sh
- - scripts/ci/boot-ios-simulator.sh
- - scripts/run-watch-ui-tests.sh
- - scripts/run-tv-ui-tests.sh
- - scripts/run-ios-native-tests.sh
- - scripts/ios/notification-tests/native-tests/**
- - scripts/ios/notification-tests/install-native-notification-tests.sh
- - scripts/ios/notification-tests/**
- - scripts/hellocodenameone/**
- - scripts/ios/tests/**
- - scripts/ios/screenshots-metal/**
- - scripts/ios/screenshots-metal-27/**
- - scripts/ios/screenshots-watch/**
- - scripts/ios/screenshots-tv/**
- - scripts/templates/**
- - CodenameOne/src/**
- - Ports/iOSPort/**
- - native-themes/ios-modern/**
- - vm/**
- - tests/**
- - maven/**
- - scripts/hellocodenameone/backend/**
- - scripts/lib/cn1ss.sh
- - .github/workflows/scripts-ios-native.yml
- - scripts/ios/create-shared-scheme.py
- - .github/workflows/ios-packaging.yml
- - maven/codenameone-maven-plugin/**
- - vm/ByteCodeTranslator/**
- - scripts/run-ios-device-release-build.sh
- - scripts/ios/**
- - scripts/common/java/**
- - '!**/*.md'
- - '!maven/cn1-ai-*/**'
- - '!maven/cn1-admob/**'
- - '!maven/cn1-applovin/**'
- - '!maven/cn1-unity-levelplay/**'
- - .github/ci/apple-checks.json
- - scripts/ci/select-apple-checks.py
- - scripts/ci/select-cn1lib-checks.py
-
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: scripts-ios-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
@@ -155,34 +36,18 @@ env:
CN1_CULL_TRAP: '1'
jobs:
- # First, so a PR whose new screenshot tests have no goldens yet runs nothing
- # here; Golden capture (golden-capture.yml) records them instead.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- with:
- capture: ${{ inputs.cn1ss_capture || '' }}
-
- # 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:
- needs: [golden-plan, select]
- if: ${{ needs.golden-plan.outputs.run == 'true' && (needs.select.outputs.any == 'true') }}
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
select:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
outputs:
ios: ${{ steps.plan.outputs.ios }}
native: ${{ steps.plan.outputs.native }}
packaging: ${{ steps.plan.outputs.packaging }}
any: ${{ steps.plan.outputs.any }}
- metal: ${{ steps.legs.outputs.metal }}
metal27: ${{ steps.legs.outputs.metal27 }}
tv: ${{ steps.legs.outputs.tv }}
watch: ${{ steps.legs.outputs.watch }}
+ macos: ${{ steps.legs.outputs.macos }}
+ fidelity: ${{ steps.plan.outputs.fidelity }}
steps:
- uses: actions/checkout@v6
- name: Use Google's copy of Maven Central first
@@ -199,50 +64,61 @@ jobs:
env:
CAPTURE: ${{ inputs.cn1ss_capture || '' }}
IOS: ${{ steps.plan.outputs.ios }}
+ MACOS: ${{ steps.plan.outputs.macos }}
run: |
set -euo pipefail
- metal="$IOS" metal27="$IOS" tv="$IOS" watch="$IOS"
- if [ -n "$CAPTURE" ] && [ "$IOS" = true ]; then
- metal=false metal27=false tv=false watch=false
+ metal27="$IOS" tv="$IOS" watch="$IOS" macos="$MACOS"
+ if [ -n "$CAPTURE" ]; then
+ metal27=false tv=false watch=false macos=false
for dir in $(python3 scripts/ci/cn1ss-golden-plan.py --pairs | cut -f2 | sort -u); do
case "$dir" in
- scripts/ios/screenshots-metal) metal=true ;;
scripts/ios/screenshots-metal-27) metal27=true ;;
scripts/ios/screenshots-tv) tv=true ;;
scripts/ios/screenshots-watch) watch=true ;;
+ scripts/macos/screenshots) macos=true ;;
esac
done
- echo "Capture legs: metal=$metal metal27=$metal27 tv=$tv watch=$watch"
+ # The plan above still bounds a capture: a leg it skipped has
+ # nothing built for it.
+ [ "$IOS" = true ] || metal27=false tv=false watch=false
+ [ "$MACOS" = true ] || macos=false
+ echo "Capture legs: metal27=$metal27 tv=$tv watch=$watch macos=$macos"
fi
{
- echo "metal=$metal"; echo "metal27=$metal27"; echo "tv=$tv"; echo "watch=$watch"
+ echo "metal27=$metal27"; echo "tv=$tv"; echo "watch=$watch"; echo "macos=$macos"
} >> "$GITHUB_OUTPUT"
build-port:
- needs: [golden-plan, select]
- if: ${{ needs.golden-plan.outputs.run == 'true' && (needs.select.outputs.any == 'true') }}
+ needs: [select]
+ if: ${{ (needs.select.outputs.any == 'true') }}
uses: ./.github/workflows/_build-ios-port.yml
with:
# One test server for every suite job of the run; see the step there.
test_server: true
-
- build-ios-metal:
- if: ${{ needs.golden-plan.outputs.run == 'true' && (!inputs.watch_only && needs.select.outputs.metal == 'true') }}
- # The iOS renderer job. Metal is the only iOS rendering backend -- the
- # OpenGL ES 2 pipeline and the job that exercised it are gone -- so this
- # runs on every pull request rather than only on the nightly schedule.
- needs: [golden-plan, select, build-port, unity-gallery]
+ # The macOS suite runs in the same Apple job, from the same bundle.
+ mac_port: true
+
+ apple:
+ name: Apple suites (iOS Metal, watchOS, tvOS, macOS, fidelity)
+ # ONE macOS runner for every Apple screenshot suite, on the one bundle
+ # build-port produced (iOS and macOS ports together). The suites run in
+ # sequence; each runs whatever an earlier one did (`!cancelled()` plus its
+ # own leg flag from `select`), and a suite's later steps need only its own
+ # build. Wall time grows; runners on the scarce `xcode-27` preview image
+ # (actions/runner-images#14404) drop from five to one.
+ if: ${{ needs.select.outputs.any == 'true' && needs.build-port.result == 'success' }}
+ needs: [select, build-port]
permissions:
contents: read
pull-requests: write
issues: write
- runs-on: macos-15
- # The hello suite now also compiles the Android compatibility gallery, its runtime and the Kotlin stdlib; 75 left no margin.
- # The Swing and JavaFX compatibility runtimes add about 22% more translated C: the Metal compile alone ran past 62 minutes.
- timeout-minutes: 125
+ runs-on: xcode-27
+ # GitHub's ceiling for a hosted job. The suites' own step limits stop a
+ # hang in any one of them.
+ timeout-minutes: 360
env:
GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # The device runner reports logical test failures through CN1SS log
+ # The device runners report logical test failures through CN1SS log
# markers, not through the build or the screenshot comparison. Make the
# normalized report authoritative so a failing or never-run compliance
# test cannot leave this workflow green and then be published from master.
@@ -252,7 +128,6 @@ jobs:
# the GoogleWebMap screenshot test renders a live Google map; absent (e.g.
# fork PRs with no access to the secret) the test skips.
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
-
steps:
- uses: actions/checkout@v6
@@ -318,7 +193,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2-
@@ -335,6 +210,7 @@ jobs:
with:
name: cn1-built-bundle
path: ${{ runner.temp }}
+
- name: Restore built CN1 + iOS port tree
run: |
set -euo pipefail
@@ -356,28 +232,18 @@ jobs:
echo "No prebuilt test server in the bundle; the suite builds its own."
fi
+ # One install per Xcode this job builds with: the Metal suite takes
+ # exactly 27.1 (CN1_XCODE_VERSION_PIN), the others the default selection.
- name: Install Metal Toolchain
- # Xcode 26+ requires the Metal Toolchain component to be downloaded
- # explicitly before .metal files can compile. The runner's default
- # xcodebuild is often an older Xcode whose -downloadComponent flag
- # doesn't exist, so we point DEVELOPER_DIR at Xcode 26 first (same
- # selection logic build-ios-app.sh uses). If the component is
- # already cached on the runner image, xcodebuild exits quickly
- # without re-downloading.
run: |
set -euo pipefail
- # Same selection the build scripts use, so this cannot install the
- # component into one Xcode and then build with another.
# shellcheck source=/dev/null
source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- "$XCODEBUILD" -downloadComponent MetalToolchain
- timeout-minutes: 10
-
- # 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
+ for pin in 27.1 ''; do
+ CN1_XCODE_VERSION_PIN="$pin" cn1_select_xcode || exit 1
+ "$XCODEBUILD" -downloadComponent MetalToolchain
+ done
+ timeout-minutes: 15
- name: Enter golden capture mode
uses: ./.github/actions/cn1ss-capture
@@ -385,8 +251,13 @@ jobs:
tests: ${{ inputs.cn1ss_capture }}
mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
+ # ---- iOS Metal (iOS 27) ----
- name: Build sample iOS app and compile workspace (Metal)
- id: build-ios-app
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') }}
+ env:
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
+ id: build-metal
run: ./scripts/build-ios-app.sh -q -DskipTests
timeout-minutes: 30
@@ -400,6 +271,10 @@ jobs:
# Runs on the project the step above already generated, so it costs seconds
# and it never links a Swift object, a pod or an extension.
- name: Check the port links only frameworks the project declares (Metal)
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') && steps.build-metal.outcome == 'success' }}
+ env:
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
run: |
set -euo pipefail
# Resolve against the SAME Xcode build-ios-app.sh used. This step used
@@ -411,7 +286,7 @@ jobs:
cn1_select_xcode || exit 1
scripts/check-ios-framework-links.py \
--developer-dir "$DEVELOPER_DIR" \
- "$(dirname "${{ steps.build-ios-app.outputs.workspace }}")"
+ "$(dirname "${{ steps.build-metal.outputs.workspace }}")"
timeout-minutes: 10
# App Store Connect rejects an upload that imports any SDK symbol no public header
@@ -423,6 +298,10 @@ jobs:
# sources, and fails on any import that is exported but undeclared. The linked
# binary is checked the same way in ios-packaging.yml.
- name: Check the port references no private Apple API
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') && steps.build-metal.outcome == 'success' }}
+ env:
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
run: |
set -euo pipefail
# shellcheck source=/dev/null
@@ -430,7 +309,7 @@ jobs:
cn1_select_xcode || exit 1
scripts/check-ios-private-api.py \
--developer-dir "$DEVELOPER_DIR" \
- --project-dir "$(dirname "${{ steps.build-ios-app.outputs.workspace }}")"/*-src
+ --project-dir "$(dirname "${{ steps.build-metal.outputs.workspace }}")"/*-src
timeout-minutes: 15
# Apple can deprecate an API, or change a behaviour for anything LINKED
@@ -448,25 +327,64 @@ jobs:
# it at exactly the moment a toolchain moves, which is the moment nobody
# has spare attention.
- name: Compare the port against the next iOS SDK
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') && steps.build-metal.outcome == 'success' }}
+ env:
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
run: |
set -euo pipefail
scripts/check-ios-sdk-deltas.py \
--skip-if-single-sdk \
- --project-dir "$(dirname "${{ steps.build-ios-app.outputs.workspace }}")"/*-src
+ --project-dir "$(dirname "${{ steps.build-metal.outputs.workspace }}")"/*-src
timeout-minutes: 20
+ - name: Boot an iPhone 16 on iOS 27
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') && steps.build-metal.outcome == 'success' }}
+ id: sim27
+ # run-ios-ui-tests.sh asks xcodebuild for a destination named "iPhone 16",
+ # and -showdestinations lists only simulators that ALREADY EXIST. This
+ # image pre-creates iPhone 17 / 17e / 18 Pro / 18 Pro Max / Air and no
+ # iPhone 16, so the suite logged "Simulator auto-selection did not return
+ # a destination" and captured on whatever fallback_sim_destination
+ # happened to return -- an iPad, on the run that exposed this. A baseline
+ # taken on an arbitrary device is one nobody can reason about, and it
+ # moves the day the image's device list changes.
+ #
+ # The device TYPE is available even though no instance is, so create one.
+ # Same model as the iOS 26 leg on purpose: the two sets then differ by
+ # runtime and theme, which is what they are for, rather than by hardware.
+ #
+ # Booted, proven, and shut down again: this step is here to create the
+ # device and to find out on a deadline that its runtime boots, not to
+ # keep it running. run-ios-ui-tests.sh boots the device itself (simctl
+ # boot, then bootstatus -b) before it compiles and again before it
+ # installs. See the script for what the first boot was costing the
+ # step after it.
+ env:
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
+ CN1_SIM_SHUTDOWN_AFTER_BOOT: '1'
+ run: ./scripts/ci/boot-ios-simulator.sh 'iOS-27[0-9-]*' 'iPhone 16' iPhone16-metal27
+
- name: Run iOS UI screenshot tests (Metal)
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') && steps.build-metal.outcome == 'success' }}
env:
- ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/ios-ui-tests-metal
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
+ # The simulator created by the step above. Without it the suite asks
+ # xcodebuild for a destination named "iPhone 16", finds none on this
+ # image, and silently captures on a fallback device.
+ IOS_SIM_DESTINATION: 'platform=iOS Simulator,id=${{ steps.sim27.outputs.udid }}'
+ ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27
# Golden set for the iOS simulator. See
- # scripts/ios/screenshots-metal/README.md.
- SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-metal
+ # scripts/ios/screenshots-metal-27/README.md.
+ SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-metal-27
# Override the PR comment marker / preview path / title so this
# job posts its own comment instead of overwriting the GL job's
# comment (both jobs ran with the same default marker before, so
# whichever finished last clobbered the other's results).
- CN1SS_COMMENT_MARKER: ''
- CN1SS_PREVIEW_SUBDIR: ios-metal
+ CN1SS_COMMENT_MARKER: ''
+ CN1SS_PREVIEW_SUBDIR: ios-metal-27
CN1SS_REPORT_TITLE: 'iOS Metal screenshot updates'
CN1SS_SUCCESS_MESSAGE: '✅ Native iOS Metal screenshot tests passed.'
CN1SS_COMMENT_LOG_PREFIX: '[run-ios-device-tests-metal]'
@@ -502,7 +420,7 @@ jobs:
# codebase, which is why the tool exits 2 rather than passing when the
# compile count falls short of the manifest.
CN1_WARNING_CENSUS: '1'
- CN1_WARNING_LEG: ios-sim-debug
+ CN1_WARNING_LEG: ios-sim-debug-xcode27
# build-ios-app.sh stages the manifest under the default artifacts dir,
# which is not the per-step one above.
CN1_WARNING_MANIFEST: ${{ github.workspace }}/artifacts/cn1-source-manifest.txt
@@ -510,30 +428,31 @@ jobs:
set -euo pipefail
mkdir -p "${ARTIFACTS_DIR}"
- echo "workspace='${{ steps.build-ios-app.outputs.workspace }}'"
- echo "scheme='${{ steps.build-ios-app.outputs.scheme }}'"
+ echo "workspace='${{ steps.build-metal.outputs.workspace }}'"
+ echo "scheme='${{ steps.build-metal.outputs.scheme }}'"
echo "reference dir='${SCREENSHOT_REF_DIR}'"
./scripts/run-ios-ui-tests.sh \
- "${{ steps.build-ios-app.outputs.workspace }}" \
+ "${{ steps.build-metal.outputs.workspace }}" \
"" \
- "${{ steps.build-ios-app.outputs.scheme }}"
+ "${{ steps.build-metal.outputs.scheme }}"
# Match the GL envelope; run-ios-ui-tests.sh still fails a stalled
# DeviceRunner after 12 minutes without CN1SS progress. The Swing and
# JavaFX compatibility runtimes took the step past 76 minutes.
timeout-minutes: 110
- name: Upload iOS Metal port status
- if: ${{ !cancelled() }}
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') }}
uses: actions/upload-artifact@v7
with:
name: port-status-ios-metal
- path: artifacts/ios-ui-tests-metal/port-status-ios-metal.json
+ path: artifacts/ios-ui-tests-metal-27/port-status-ios-metal.json
if-no-files-found: warn
retention-days: 14
- name: The suite must have compared screenshots
- # Runs in BOTH iOS Metal legs, and is the control that was missing.
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') && inputs.cn1ss_capture == '' }}
+ # The control that was missing.
#
# The screenshot step can be tolerated while a baseline set is being
# seeded -- there is nothing to compare against yet -- but "tolerated"
@@ -550,14 +469,15 @@ jobs:
# reference set, which is exactly the situation a seeding run is in.
# Not in a capture (cn1ss_capture): it renders goldens nobody has, so
# there is no comparison report, and the capture artifact is the check.
- if: ${{ (!cancelled()) && inputs.cn1ss_capture == '' }}
env:
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
# Declared HERE rather than inherited: ARTIFACTS_DIR is set in the
# screenshot step's own env block, and step env does not reach other
# steps. Without this the check reads an empty path, finds nothing and
# fails a leg that captured a full set -- which is exactly what it did
# on its first run, the same scope mistake as the warning leg above.
- ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/ios-ui-tests-metal
+ ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27
#
# Counted from the COMPARISON REPORT, not from PNGs on disk. The runner
# keeps only the captures that failed comparison, so a run in which all
@@ -579,7 +499,9 @@ jobs:
echo "::error title=No screenshots::the suite compared 0 screenshots; the leg validated nothing"
exit 1
fi
+
- name: Publish Metal screenshot summary
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') }}
# Surfaces run-ios-ui-tests.sh's comparison result in the job's
# GitHub Actions summary page so the Metal port status is visible
# at a glance without digging into the artifact zip. Always runs
@@ -587,17 +509,18 @@ jobs:
# captured. The Python helper lives in scripts/ci/ because
# embedding Python heredocs inside a YAML "run: |" block is
# fragile -- unindented Python breaks the block scalar.
- if: ${{ !cancelled() }}
env:
- COMPARE_JSON: ${{ github.workspace }}/artifacts/ios-ui-tests-metal/screenshot-compare.json
- COMMENT_MD: ${{ github.workspace }}/artifacts/ios-ui-tests-metal/screenshot-comment.md
+ CN1_XCODE_VERSION_PIN: '27.1'
+ IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
+ COMPARE_JSON: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27/screenshot-compare.json
+ COMMENT_MD: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27/screenshot-comment.md
run: |
set -eu
{
echo "## iOS Metal screenshot comparison"
echo
echo "Ran against \`scripts/hellocodenameone\` on the iOS simulator."
- echo "Golden images: \`scripts/ios/screenshots-metal/\`."
+ echo "Golden images: \`scripts/ios/screenshots-metal-27/\`."
echo
if [ -s "$COMPARE_JSON" ]; then
python3 scripts/ci/metal-screenshot-summary.py --markdown "$COMPARE_JSON"
@@ -615,666 +538,273 @@ jobs:
fi
- name: Upload iOS Metal artifacts
- if: ${{ !cancelled() }}
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') }}
uses: actions/upload-artifact@v7
with:
- name: ios-ui-tests-metal
+ name: ios-ui-tests-metal-27
path: |
- artifacts/ios-ui-tests-metal
+ artifacts/ios-ui-tests-metal-27
artifacts/*.log
artifacts/*-stats.txt
artifacts/vm_time.txt
artifacts/xcodebuild-list.txt
artifacts/cn1-source-manifest.txt
- artifacts/ios-ui-tests-metal/native-warnings.json
+ artifacts/ios-ui-tests-metal-27/native-warnings.json
if-no-files-found: warn
retention-days: 14
- - name: Upload golden capture
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: cn1ss-capture-ios-metal
- path: artifacts/cn1ss-capture
- if-no-files-found: ignore
-
+ # The watch and tvOS suites build the same project (same env), so one
+ # build serves both.
+ # ---- watchOS + tvOS build ----
+ - name: Build sample iOS app (watchOS and tvOS targets)
+ if: ${{ !cancelled() && ((needs.select.outputs.watch == 'true') || (!inputs.watch_only && needs.select.outputs.tv == 'true')) }}
+ id: build-watchtv
+ run: ./scripts/build-ios-app.sh -q -DskipTests
+ timeout-minutes: 30
- build-ios-metal-27:
- if: ${{ needs.golden-plan.outputs.run == 'true' && (!inputs.watch_only && needs.select.outputs.metal27 == 'true') }}
- # The SAME suite as build-ios-metal, on the Xcode 27 / iOS 27 hosted image and
- # against its own baselines. A copy rather than a move: build-ios-metal keeps
- # gating the toolchain we actually pin (CN1_XCODE_MAJOR=26), which is what
- # applications are built with today, and this leg is what stops iOS 27
- # breaking us in the gap before that pin moves.
- #
- # Everything below is deliberately identical to build-ios-metal except the
- # runner, the toolchain pin, the theme generation, the baseline directory and
- # the artifact/comment names. scripts/check-ios-metal-legs-match.py holds the
- # two to that, because a copied 320-line job drifts otherwise.
- #
- # `xcode-27` is a PUBLIC PREVIEW image (actions/runner-images#14404) whose
- # capacity is still being balanced, so read a queue here as the image rather
- # than as a fault in the change under test.
- needs: [golden-plan, select, build-port, unity-gallery]
- permissions:
- contents: read
- pull-requests: write
- issues: write
- runs-on: xcode-27
- # The hello suite now also compiles the Android compatibility gallery, its runtime and the Kotlin stdlib; 75 left no margin.
- # The Swing and JavaFX compatibility runtimes add about 22% more translated C: the Metal compile alone ran past 62 minutes.
- timeout-minutes: 125
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # The device runner reports logical test failures through CN1SS log
- # markers, not through the build or the screenshot comparison. Make the
- # normalized report authoritative so a failing or never-run compliance
- # test cannot leave this workflow green and then be published from master.
- CN1SS_FAIL_ON_TEST_PROBLEMS: '1'
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # Pin the toolchain rather than taking the image default: scripts/lib/
- # xcode.sh resolves CN1_XCODE_MAJOR, and leaving it at 26 on an image that
- # ships only Xcode 27 fails resolution outright instead of quietly using
- # the wrong one.
- CN1_XCODE_MAJOR: '27'
- # The image carries 27.0, 27.1 and 27.2 side by side; the 27 baselines are
- # measured on 27.1, so take exactly that rather than the newest.
- CN1_XCODE_VERSION_PIN: '27.1'
- # Build the sample against the iOS 27 theme generation. helloworld installs
- # the modern theme itself (DualAppearanceBaseTest.pickModernThemeResource)
- # and now asks the port which generation this build carries, so this hint is
- # what makes the 27 baselines render the iOS 27 theme instead of scoring the
- # iOS 26 one against iOS 27 goldens.
- IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'
- # Optional: when set, build-ios-app.sh writes it as a bundled resource so
- # the GoogleWebMap screenshot test renders a live Google map; absent (e.g.
- # fork PRs with no access to the secret) the test skips.
- GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
+ # ---- watchOS ----
+ - name: Ensure watchOS simulator runtime
+ if: ${{ !cancelled() && (needs.select.outputs.watch == 'true') && steps.build-watchtv.outcome == 'success' }}
+ run: |
+ set -euo pipefail
+ if ! xcrun simctl list runtimes available 2>/dev/null | grep -qi watchOS; then
+ echo "No watchOS runtime found; attempting download"
+ xcodebuild -downloadPlatform watchOS || true
+ fi
+ xcrun simctl list runtimes available 2>/dev/null | grep -i watchOS || true
+ xcrun simctl list devices available 2>/dev/null | grep -i "Apple Watch" || true
- steps:
- - uses: actions/checkout@v6
+ - name: Run watchOS UI screenshot tests
+ if: ${{ !cancelled() && (needs.select.outputs.watch == 'true') && steps.build-watchtv.outcome == 'success' }}
+ env:
+ ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/watch-ui-tests
+ SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-watch
+ CN1SS_COMMENT_MARKER: ''
+ CN1SS_PREVIEW_SUBDIR: ios-watch
+ CN1SS_REPORT_TITLE: 'Apple Watch (watchOS) screenshot updates'
+ CN1SS_SUCCESS_MESSAGE: '✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.'
+ CN1SS_COMMENT_LOG_PREFIX: '[run-watch-ui-tests]'
+ CN1SS_FAIL_ON_MISMATCH: '1'
+ CN1SS_WATCH_TIMEOUT: '2400'
+ # A missing frame is an incomplete run, not an allowed result.
+ CN1SS_ALLOWED_MISSING: '0'
+ run: |
+ set -euo pipefail
+ mkdir -p "${ARTIFACTS_DIR}"
+ echo "workspace='${{ steps.build-watchtv.outputs.workspace }}'"
+ echo "scheme='${{ steps.build-watchtv.outputs.scheme }}'"
+ ./scripts/run-watch-ui-tests.sh \
+ "${{ steps.build-watchtv.outputs.workspace }}" \
+ "${{ steps.build-watchtv.outputs.scheme }}"
+ timeout-minutes: 90
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
+ - name: Upload watchOS port status
+ if: ${{ !cancelled() && (needs.select.outputs.watch == 'true') }}
+ uses: actions/upload-artifact@v7
+ with:
+ name: port-status-watchos
+ path: artifacts/watch-ui-tests/port-status-watchos.json
+ if-no-files-found: warn
+ retention-days: 14
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
+ - name: Upload watch artifacts
+ if: ${{ !cancelled() && (needs.select.outputs.watch == 'true') }}
+ uses: actions/upload-artifact@v7
with:
+ name: watch-ui-tests
path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
+ artifacts/watch-ui-tests
+ artifacts/*.log
+ artifacts/*-stats.txt
+ artifacts/vm_time.txt
+ artifacts/xcodebuild-list.txt
+ if-no-files-found: warn
+ retention-days: 14
- - name: Ensure CocoaPods tooling
+ # ---- tvOS ----
+ # The tvOS half of the private-API gate, and the tvOS compile gate. A tvOS slice compiles
+ # the port with whatever switches the iOS app turned on, and the iOS jobs compile it only
+ # for iOS -- where every `#if TARGET_OS_TV` branch is preprocessed away -- so a feature
+ # whose code tvOS cannot compile (contacts, NFC, the photo picker, StoreKit's identifier
+ # payments ...) broke every TV build of an app using it, unseen. This compiles every
+ # native with every gate on against BOTH tvOS SDKs: the device SDK differs (it has no
+ # LocalAuthentication) and no job builds it. The tvOS app itself is binary-checked by
+ # run-tv-ui-tests.sh after its build.
+ - name: Check the port compiles for tvOS and references no private Apple API
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.tv == 'true') && steps.build-watchtv.outcome == 'success' }}
run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
set -euo pipefail
- if ! command -v ruby >/dev/null; then
- echo "ruby not found"; exit 1
- fi
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
+ # shellcheck source=/dev/null
+ source scripts/lib/xcode.sh
+ cn1_select_xcode || exit 1
+ for sdk in appletvos appletvsimulator; do
+ scripts/check-ios-private-api.py \
+ --developer-dir "$DEVELOPER_DIR" --sdk "$sdk" \
+ --project-dir "$(dirname "${{ steps.build-watchtv.outputs.workspace }}")"/*-src
+ done
+ timeout-minutes: 20
- - name: Compute setup-workspace hash
- id: setup_hash
+ - name: Ensure tvOS simulator runtime
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.tv == 'true') && steps.build-watchtv.outcome == 'success' }}
run: |
set -euo pipefail
- echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
+ if ! xcrun simctl list runtimes available 2>/dev/null | grep -qi tvOS; then
+ echo "No tvOS runtime found; attempting download"
+ xcodebuild -downloadPlatform tvOS || true
+ fi
+ xcrun simctl list runtimes available 2>/dev/null | grep -i tvOS || true
+ xcrun simctl list devices available 2>/dev/null | grep -i "Apple TV" || true
- - name: Compute CN1 source hash
- id: src_hash
+ - name: Run tvOS UI screenshot tests
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.tv == 'true') && steps.build-watchtv.outcome == 'success' }}
+ env:
+ ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/tv-ui-tests
+ SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-tv
+ CN1SS_COMMENT_MARKER: ''
+ CN1SS_PREVIEW_SUBDIR: ios-tv
+ CN1SS_REPORT_TITLE: 'Apple TV (tvOS) screenshot updates'
+ CN1SS_SUCCESS_MESSAGE: '✅ Native Apple TV (tvOS, Metal) screenshot tests passed.'
+ CN1SS_COMMENT_LOG_PREFIX: '[run-tv-ui-tests]'
+ CN1SS_FAIL_ON_MISMATCH: '1'
+ # A missing frame is an incomplete run, not an allowed result.
+ CN1SS_ALLOWED_MISSING: '0'
run: |
set -euo pipefail
- SRC_HASH=$(find CodenameOne/src Ports/iOSPort vm/JavaAPI vm/ByteCodeTranslator Themes native-themes \
- maven/codenameone-maven-plugin/src/main \
- maven/build-engine/src/main \
- maven/project-model/src/main \
- -type f \( -name '*.java' -o -name '*.m' -o -name '*.h' -o -name '*.xml' -o -name '*.properties' -o -name '*.css' \) 2>/dev/null \
- | sort | xargs shasum -a 256 | shasum -a 256 | awk '{print $1}')
- POM_HASH=$(find . -name 'pom.xml' -not -path './scripts/*' 2>/dev/null \
- | sort | xargs shasum -a 256 | shasum -a 256 | awk '{print $1}')
- SCRIPT_HASH=$(shasum -a 256 \
- scripts/setup-workspace.sh \
- scripts/build-ios-port.sh \
- scripts/build-native-themes.sh \
- .github/workflows/_build-ios-port.yml \
- | shasum -a 256 | awk '{print $1}')
- echo "hash=${SRC_HASH:0:16}-${POM_HASH:0:16}-${SCRIPT_HASH:0:16}" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
+ mkdir -p "${ARTIFACTS_DIR}"
+ echo "workspace='${{ steps.build-watchtv.outputs.workspace }}'"
+ echo "scheme='${{ steps.build-watchtv.outputs.scheme }}'"
+ ./scripts/run-tv-ui-tests.sh \
+ "${{ steps.build-watchtv.outputs.workspace }}" \
+ "${{ steps.build-watchtv.outputs.scheme }}"
+ timeout-minutes: 45
- - name: Cache Maven repository
- uses: actions/cache@v5
+ - name: Upload tvOS port status
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.tv == 'true') }}
+ uses: actions/upload-artifact@v7
with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
+ name: port-status-tvos
+ path: artifacts/tv-ui-tests/port-status-tvos.json
+ if-no-files-found: warn
+ retention-days: 14
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
+ - name: Upload tv artifacts
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.tv == 'true') }}
+ uses: actions/upload-artifact@v7
with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
+ name: tv-ui-tests
+ path: |
+ artifacts/tv-ui-tests
+ artifacts/*.log
+ artifacts/*-stats.txt
+ artifacts/vm_time.txt
+ artifacts/xcodebuild-list.txt
+ if-no-files-found: warn
+ retention-days: 14
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
+ # ---- macOS (AppKit) ----
+ - name: Build sample macOS app and compile workspace
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') }}
+ id: build-macos-app
+ run: ./scripts/build-macos-app.sh -q -DskipTests
+ timeout-minutes: 30
+
+ # ParparVM against JDK 25 on this runner: the HelloCodenameOne classes the step
+ # above just built, the translator translating itself, and every Bench workload.
+ # Before the screenshot step, whose PR comment carries the table
+ # (CN1SS_EXTRA_MARKDOWN); the job's last step fails it on a regression. The
+ # workspace JDK 8 comes from setup-workspace's env.sh, exactly as the app build
+ # got it, and JDK 25 is fetched privately so no later step sees a different JDK.
+ - name: ParparVM vs JDK 25 (performance gate)
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') }}
+ # Names this pull request's overlay (perf-baseline/pr/.json) in the
+ # comment. A workflow_dispatch run carries no pull request, so the gate asks gh.
+ env:
+ GH_TOKEN: ${{ github.token }}
run: |
- set -euo pipefail
- # Replaces the evictable cn1-built cache restore with the artifact
- # build-port handed off (not LRU-evicted, survives --failed re-runs).
- # The tar was created relative to / so this restores
- # ~/.m2/com/codenameone + Themes + Ports/iOSPort/nativeSources to
- # their original absolute paths.
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
- # The test server build-port built for the whole run, when it did.
- # Without it the suite script builds its own, as it always has.
- if [ -f "$RUNNER_TEMP/cn1ss-server.tar" ]; then
- tar -C / -xf "$RUNNER_TEMP/cn1ss-server.tar"
- fi
- if [ -d "$RUNNER_TEMP/cn1ss-server/classes" ]; then
- echo "CN1SS_SERVER_DIST=$RUNNER_TEMP/cn1ss-server" >> "$GITHUB_ENV"
- echo "Using the prebuilt test server in $RUNNER_TEMP/cn1ss-server"
- else
- echo "No prebuilt test server in the bundle; the suite builds its own."
- fi
-
- - name: Install Metal Toolchain
- # Xcode 26+ requires the Metal Toolchain component to be downloaded
- # explicitly before .metal files can compile. The runner's default
- # xcodebuild is often an older Xcode whose -downloadComponent flag
- # doesn't exist, so we point DEVELOPER_DIR at Xcode 26 first (same
- # selection logic build-ios-app.sh uses). If the component is
- # already cached on the runner image, xcodebuild exits quickly
- # without re-downloading.
- run: |
- set -euo pipefail
- # Same selection the build scripts use, so this cannot install the
- # component into one Xcode and then build with another.
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- "$XCODEBUILD" -downloadComponent MetalToolchain
- timeout-minutes: 10
-
- # 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: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
-
- - name: Build sample iOS app and compile workspace (Metal)
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 30
-
- # Every framework the port's natives need must be one the project DECLARES.
- # A framework that only reaches the link through an autolink hint -- a Swift
- # file's `import SwiftUI`, a CocoaPods dependency, `@import` under the Metal
- # build's CLANG_ENABLE_MODULES -- links this sample and no plain Objective-C
- # application. That is how `_OBJC_CLASS_$_UTType` stayed undefined in every
- # customer archive while this job was green for five days.
- #
- # Runs on the project the step above already generated, so it costs seconds
- # and it never links a Swift object, a pod or an extension.
- - name: Check the port links only frameworks the project declares (Metal)
- run: |
- set -euo pipefail
- # Resolve against the SAME Xcode build-ios-app.sh used. This step used
- # to shell out to the runner's ambient xcrun, so it answered "is this
- # symbol declared?" against a different SDK than the one that produced
- # the project it was checking.
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- scripts/check-ios-framework-links.py \
- --developer-dir "$DEVELOPER_DIR" \
- "$(dirname "${{ steps.build-ios-app.outputs.workspace }}")"
- timeout-minutes: 10
-
- # App Store Connect rejects an upload that imports any SDK symbol no public header
- # declares ("Validation failed (409) The app references non-public symbols"), and
- # nothing else here can see one: a private symbol compiles and links like any other.
- # Customer uploads were rejected for CommonCrypto's private AES-GCM calls while every
- # job stayed green, because the calls sat behind a feature gate this sample never
- # turns on. So this compiles EVERY port native with EVERY gate on, from pristine
- # sources, and fails on any import that is exported but undeclared. The linked
- # binary is checked the same way in ios-packaging.yml.
- - name: Check the port references no private Apple API
- run: |
- set -euo pipefail
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- scripts/check-ios-private-api.py \
- --developer-dir "$DEVELOPER_DIR" \
- --project-dir "$(dirname "${{ steps.build-ios-app.outputs.workspace }}")"/*-src
- timeout-minutes: 15
-
- # Apple can deprecate an API, or change a behaviour for anything LINKED
- # against the new SDK, and nothing else here would notice: every other
- # check compiles against one SDK and has nothing to compare it to. This one
- # compiles the port twice, varying only -isysroot, so what it reports is
- # caused by the SDK and not by the command line.
- #
- # It sweeps the renderer and on-device-debug configurations itself, from
- # pristine port sources, so hosting it in this job costs one build.
- #
- # It is a no-op on a runner that carries a single Xcode, which is the case
- # today -- and it starts working, without another edit, on the first image
- # that ships two. That is deliberate: the alternative is remembering to add
- # it at exactly the moment a toolchain moves, which is the moment nobody
- # has spare attention.
- - name: Compare the port against the next iOS SDK
- run: |
- set -euo pipefail
- scripts/check-ios-sdk-deltas.py \
- --skip-if-single-sdk \
- --project-dir "$(dirname "${{ steps.build-ios-app.outputs.workspace }}")"/*-src
- timeout-minutes: 20
-
- - name: Boot an iPhone 16 on iOS 27
- id: sim27
- # run-ios-ui-tests.sh asks xcodebuild for a destination named "iPhone 16",
- # and -showdestinations lists only simulators that ALREADY EXIST. This
- # image pre-creates iPhone 17 / 17e / 18 Pro / 18 Pro Max / Air and no
- # iPhone 16, so the suite logged "Simulator auto-selection did not return
- # a destination" and captured on whatever fallback_sim_destination
- # happened to return -- an iPad, on the run that exposed this. A baseline
- # taken on an arbitrary device is one nobody can reason about, and it
- # moves the day the image's device list changes.
- #
- # The device TYPE is available even though no instance is, so create one.
- # Same model as the iOS 26 leg on purpose: the two sets then differ by
- # runtime and theme, which is what they are for, rather than by hardware.
- #
- # Booted, proven, and shut down again: this step is here to create the
- # device and to find out on a deadline that its runtime boots, not to
- # keep it running. run-ios-ui-tests.sh boots the device itself (simctl
- # boot, then bootstatus -b) before it compiles and again before it
- # installs. See the script for what the first boot was costing the
- # step after it.
- env:
- CN1_SIM_SHUTDOWN_AFTER_BOOT: '1'
- run: ./scripts/ci/boot-ios-simulator.sh 'iOS-27[0-9-]*' 'iPhone 16' iPhone16-metal27
- - name: Run iOS UI screenshot tests (Metal)
- env:
- # The simulator created by the step above. Without it the suite asks
- # xcodebuild for a destination named "iPhone 16", finds none on this
- # image, and silently captures on a fallback device.
- IOS_SIM_DESTINATION: 'platform=iOS Simulator,id=${{ steps.sim27.outputs.udid }}'
- ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27
- # Golden set for the iOS simulator. See
- # scripts/ios/screenshots-metal/README.md.
- SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-metal-27
- # Override the PR comment marker / preview path / title so this
- # job posts its own comment instead of overwriting the GL job's
- # comment (both jobs ran with the same default marker before, so
- # whichever finished last clobbered the other's results).
- CN1SS_COMMENT_MARKER: ''
- CN1SS_PREVIEW_SUBDIR: ios-metal-27
- CN1SS_REPORT_TITLE: 'iOS Metal screenshot updates'
- CN1SS_SUCCESS_MESSAGE: '✅ Native iOS Metal screenshot tests passed.'
- CN1SS_COMMENT_LOG_PREFIX: '[run-ios-device-tests-metal]'
- # Strict screenshot gating: fail on any pixel mismatch and on any
- # missing screenshot. The Metal backend must produce the full
- # baseline set; a test that hangs (e.g. the DialogTheme texture
- # backdrop) drops every later capture and silently shrinks the
- # suite from 122 to 107 - that now fails the job. No missing
- # screenshots are tolerated. Enforced in scripts/lib/cn1ss.sh.
- CN1SS_FAIL_ON_MISMATCH: '1'
- # Enable Apple's Metal API Validation in the simulator. Catches
- # render-pass / pipeline-state mismatches at the moment they
- # happen (issue #5103: stencil pixel-format mismatch shipped in
- # four consecutive 7.0.x releases because no test exercised the
- # validation layer). assert mode crashes the app on the first
- # validation error -- the missed CN1SS:SUITE:FINISHED marker
- # then fails this step. run-ios-ui-tests.sh forwards both vars
- # to the launched app via simctl --setenv.
- MTL_DEBUG_LAYER: '1'
- MTL_DEBUG_LAYER_ERROR_MODE: 'assert'
- CN1SS_PORT_ID: ios-metal
- # Count this build's compiler warnings and attribute each to whoever
- # owns the code. This used to ride on the GL leg; that leg is gone, so
- # it moves here -- and this is now the ONLY leg that runs the census,
- # which means the baseline comparison and its injected-warning probe
- # exist nowhere else. pr.yml only runs the parser self-test, which
- # censuses nothing.
- #
- # This leg can host it for the same reason the old one could: it sets
- # no CN1_IOS_DERIVED_DATA, so run-ios-ui-tests.sh wipes its derived
- # data and compiles every translation unit from cold. An incremental
- # build reports no warnings and is indistinguishable from a clean
- # codebase, which is why the tool exits 2 rather than passing when the
- # compile count falls short of the manifest.
- CN1_WARNING_CENSUS: '1'
- CN1_WARNING_LEG: ios-sim-debug-xcode27
- # build-ios-app.sh stages the manifest under the default artifacts dir,
- # which is not the per-step one above.
- CN1_WARNING_MANIFEST: ${{ github.workspace }}/artifacts/cn1-source-manifest.txt
- run: |
- set -euo pipefail
- mkdir -p "${ARTIFACTS_DIR}"
-
- echo "workspace='${{ steps.build-ios-app.outputs.workspace }}'"
- echo "scheme='${{ steps.build-ios-app.outputs.scheme }}'"
- echo "reference dir='${SCREENSHOT_REF_DIR}'"
-
- ./scripts/run-ios-ui-tests.sh \
- "${{ steps.build-ios-app.outputs.workspace }}" \
- "" \
- "${{ steps.build-ios-app.outputs.scheme }}"
- # Match the GL envelope; run-ios-ui-tests.sh still fails a stalled
- # DeviceRunner after 12 minutes without CN1SS progress. The Swing and
- # JavaFX compatibility runtimes took the step past 76 minutes.
- timeout-minutes: 110
-
- # NO port-status upload here, deliberately. The published port report is
- # keyed on the port id `ios-metal`, and there is only one iOS port -- this
- # leg differs by TOOLCHAIN, not by port. A second upload under that id
- # would publish whichever leg finished last, the same clobber the comment
- # marker above already had to be split to avoid.
-
- - name: The suite must have compared screenshots
- # Runs in BOTH iOS Metal legs, and is the control that was missing.
- #
- # The screenshot step can be tolerated while a baseline set is being
- # seeded -- there is nothing to compare against yet -- but "tolerated"
- # kept turning into "produced nothing and said nothing". On the iOS 27
- # leg that concealed three separate defects in a row: a warning census
- # keyed to the wrong toolchain, a simulator destination that fell back to
- # an iPad, and before those a reference directory that did not exist.
- # Every one of them reported the job green with zero PNGs in the
- # artifact, and each was only found by downloading that artifact by hand.
- #
- # A run that captures nothing is never a pass, whatever else is tolerated.
- # Deliberately NOT expressed as a count against the reference directory:
- # that guard exists inside run-ios-ui-tests.sh and is disabled by an empty
- # reference set, which is exactly the situation a seeding run is in.
- # Not in a capture (cn1ss_capture): it renders goldens nobody has, so
- # there is no comparison report, and the capture artifact is the check.
- if: ${{ (!cancelled()) && inputs.cn1ss_capture == '' }}
- env:
- # Declared HERE rather than inherited: ARTIFACTS_DIR is set in the
- # screenshot step's own env block, and step env does not reach other
- # steps. Without this the check reads an empty path, finds nothing and
- # fails a leg that captured a full set -- which is exactly what it did
- # on its first run, the same scope mistake as the warning leg above.
- ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27
- #
- # Counted from the COMPARISON REPORT, not from PNGs on disk. The runner
- # keeps only the captures that failed comparison, so a run in which all
- # 155 matched leaves zero PNGs behind -- indistinguishable, by file
- # count, from a run that never started. That was this check's first
- # version, and it failed the iOS 27 leg on the very run where every
- # screenshot matched its baseline. The report exists only once the suite
- # reached the screenshot stage, and lists every screenshot it compared.
- run: |
- set -euo pipefail
- report="${ARTIFACTS_DIR}/screenshot-compare.json"
- if [ ! -f "${report}" ]; then
- echo "::error title=No screenshots::no comparison report at ${report}; the suite never reached the screenshot stage"
- exit 1
- fi
- count=$(python3 -c 'import json,sys; print(len(json.load(open(sys.argv[1])).get("results") or []))' "${report}")
- echo "screenshots compared: ${count}"
- if [ "${count}" -eq 0 ]; then
- echo "::error title=No screenshots::the suite compared 0 screenshots; the leg validated nothing"
- exit 1
- fi
- - name: Publish Metal screenshot summary
- # Surfaces run-ios-ui-tests.sh's comparison result in the job's
- # GitHub Actions summary page so the Metal port status is visible
- # at a glance without digging into the artifact zip. Always runs
- # so a failed or cancelled tests step still reports whatever got
- # captured. The Python helper lives in scripts/ci/ because
- # embedding Python heredocs inside a YAML "run: |" block is
- # fragile -- unindented Python breaks the block scalar.
- if: ${{ !cancelled() }}
- env:
- COMPARE_JSON: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27/screenshot-compare.json
- COMMENT_MD: ${{ github.workspace }}/artifacts/ios-ui-tests-metal-27/screenshot-comment.md
- run: |
- set -eu
- {
- echo "## iOS Metal screenshot comparison"
- echo
- echo "Ran against \`scripts/hellocodenameone\` on the iOS simulator."
- echo "Golden images: \`scripts/ios/screenshots-metal/\`."
- echo
- if [ -s "$COMPARE_JSON" ]; then
- python3 scripts/ci/metal-screenshot-summary.py --markdown "$COMPARE_JSON"
- elif [ -s "$COMMENT_MD" ]; then
- cat "$COMMENT_MD"
- else
- echo "_No screenshot comparison artifact was produced. See the upload step output for details._"
- fi
- } >> "$GITHUB_STEP_SUMMARY"
- if [ -s "$COMPARE_JSON" ]; then
- NOTICE="$(python3 scripts/ci/metal-screenshot-summary.py --headline "$COMPARE_JSON" || true)"
- if [ -n "$NOTICE" ]; then
- echo "::notice title=Metal screenshot comparison::${NOTICE}"
- fi
- fi
-
- - name: Upload iOS Metal artifacts
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: ios-ui-tests-metal-27
- path: |
- artifacts/ios-ui-tests-metal-27
- artifacts/*.log
- artifacts/*-stats.txt
- artifacts/vm_time.txt
- artifacts/xcodebuild-list.txt
- artifacts/cn1-source-manifest.txt
- artifacts/ios-ui-tests-metal-27/native-warnings.json
- if-no-files-found: warn
- retention-days: 14
-
- - name: Upload golden capture
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: cn1ss-capture-ios-metal-27
- path: artifacts/cn1ss-capture
- if-no-files-found: ignore
- build-ios-watch:
- if: ${{ needs.golden-plan.outputs.run == 'true' && (needs.select.outputs.watch == 'true') }}
- # Native Apple Watch (watchOS) screenshot pipeline. The watch slice
- # auto-enables from codename1.watchMain in the sample, so build-ios-app.sh
- # generates the Watch target alongside the iOS app. This job renders
- # the cn1ss suite on the watch simulator through the Core Graphics backend
- # (no GL/Metal on watchOS), streams frames to the same cn1ss test server
- # WS sink the iOS jobs use, and compares against scripts/ios/screenshots-watch.
- # Isolated in its own job (like build-ios-metal) so the watch result is a
- # distinct check and a regression there doesn't mask the iOS path.
- needs: [golden-plan, select, build-port, unity-gallery]
- permissions:
- contents: read
- pull-requests: write
- issues: write
- runs-on: macos-15
- timeout-minutes: 60
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # The device runner reports logical test failures through CN1SS log
- # markers, not through the build or the screenshot comparison. Make the
- # normalized report authoritative so a failing or never-run compliance
- # test cannot leave this workflow green and then be published from master.
- CN1SS_FAIL_ON_TEST_PROBLEMS: '1'
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # Optional: when set, build-ios-app.sh writes it as a bundled resource so
- # the GoogleWebMap screenshot test renders a live Google map; absent (e.g.
- # fork PRs with no access to the secret) the test skips.
- GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- if ! command -v ruby >/dev/null; then
- echo "ruby not found"; exit 1
- fi
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: |
- set -euo pipefail
- echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
+ set -u
+ ENV_FILE="${TMPDIR%/}/codenameone-tools/tools/env.sh"
+ if [ -f "$ENV_FILE" ]; then . "$ENV_FILE"; fi
+ export JDK_8_HOME="$JAVA_HOME"
+ export PATH="${MAVEN_HOME:+$MAVEN_HOME/bin:}$PATH"
+ vm/selfhost/ci-perf-gate.sh run macos-arm64 artifacts/macos-ui-tests/perf
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- # Replaces the evictable cn1-built cache restore with the artifact
- # build-port handed off (not LRU-evicted, survives --failed re-runs).
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
- # The test server build-port built for the whole run, when it did.
- # Without it the suite script builds its own, as it always has.
- if [ -f "$RUNNER_TEMP/cn1ss-server.tar" ]; then
- tar -C / -xf "$RUNNER_TEMP/cn1ss-server.tar"
- fi
- if [ -d "$RUNNER_TEMP/cn1ss-server/classes" ]; then
- echo "CN1SS_SERVER_DIST=$RUNNER_TEMP/cn1ss-server" >> "$GITHUB_ENV"
- echo "Using the prebuilt test server in $RUNNER_TEMP/cn1ss-server"
- else
- echo "No prebuilt test server in the bundle; the suite builds its own."
- fi
-
- # 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: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
-
- - name: Build sample iOS app (generates the watch target)
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 30
-
- - name: Ensure watchOS simulator runtime
- run: |
- set -euo pipefail
- if ! xcrun simctl list runtimes available 2>/dev/null | grep -qi watchOS; then
- echo "No watchOS runtime found; attempting download"
- xcodebuild -downloadPlatform watchOS || true
- fi
- xcrun simctl list runtimes available 2>/dev/null | grep -i watchOS || true
- xcrun simctl list devices available 2>/dev/null | grep -i "Apple Watch" || true
-
- - name: Run watchOS UI screenshot tests
+ - name: Run macOS UI screenshot tests
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') && steps.build-macos-app.outcome == 'success' }}
env:
- ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/watch-ui-tests
- SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-watch
- CN1SS_COMMENT_MARKER: ''
- CN1SS_PREVIEW_SUBDIR: ios-watch
- CN1SS_REPORT_TITLE: 'Apple Watch (watchOS) screenshot updates'
- CN1SS_SUCCESS_MESSAGE: '✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.'
- CN1SS_COMMENT_LOG_PREFIX: '[run-watch-ui-tests]'
+ ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/macos-ui-tests
+ CN1SS_EXTRA_MARKDOWN: ${{ github.workspace }}/artifacts/macos-ui-tests/perf/perf-comment.md
+ # Strict screenshot gating: every expected frame must be captured and
+ # compared. Enforced centrally in scripts/lib/cn1ss.sh.
CN1SS_FAIL_ON_MISMATCH: '1'
- CN1SS_WATCH_TIMEOUT: '2400'
- # A missing frame is an incomplete run, not an allowed result.
CN1SS_ALLOWED_MISSING: '0'
run: |
set -euo pipefail
mkdir -p "${ARTIFACTS_DIR}"
- echo "workspace='${{ steps.build-ios-app.outputs.workspace }}'"
- echo "scheme='${{ steps.build-ios-app.outputs.scheme }}'"
- ./scripts/run-watch-ui-tests.sh \
- "${{ steps.build-ios-app.outputs.workspace }}" \
- "${{ steps.build-ios-app.outputs.scheme }}"
- timeout-minutes: 90
- - name: Upload watchOS port status
- if: ${{ !cancelled() }}
+ echo "workspace='${{ steps.build-macos-app.outputs.workspace }}'"
+ echo "scheme='${{ steps.build-macos-app.outputs.scheme }}'"
+
+ ./scripts/run-macos-ui-tests.sh \
+ "${{ steps.build-macos-app.outputs.workspace }}" \
+ "" \
+ "${{ steps.build-macos-app.outputs.scheme }}"
+ # The script's own suite budget is already 1500s (25m); add app
+ # launch + post-processing (compare 122 images, render report, post
+ # comment) and a slow runner tips just over the old 30m step cap and
+ # gets SIGKILLed mid-compare -- a flaky timeout, not a real mismatch.
+ # 45m lets the script's internal timeout govern gracefully instead.
+ timeout-minutes: 45
+
+ - name: Upload macOS port status
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') }}
uses: actions/upload-artifact@v7
with:
- name: port-status-watchos
- path: artifacts/watch-ui-tests/port-status-watchos.json
+ name: port-status-macos
+ path: artifacts/macos-ui-tests/port-status-macos.json
if-no-files-found: warn
retention-days: 14
- - name: Upload watch artifacts
- if: ${{ !cancelled() }}
+ - name: Publish macOS screenshot summary
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') }}
+ # Surfaces run-macos-ui-tests.sh's comparison result in the
+ # job's GitHub Actions summary page so the Mac slice status is
+ # visible at a glance without digging into the artifact zip.
+ # Reuses the existing metal-screenshot-summary.py helper because
+ # the JSON schema is identical -- the summary text says "iOS
+ # Metal" so the wrapper here overrides the headline manually.
+ env:
+ COMPARE_JSON: ${{ github.workspace }}/artifacts/macos-ui-tests/screenshot-compare.json
+ COMMENT_MD: ${{ github.workspace }}/artifacts/macos-ui-tests/screenshot-comment.md
+ run: |
+ set -eu
+ {
+ echo "## macOS screenshot comparison"
+ echo
+ echo "Ran against \`scripts/hellocodenameone\` as a native macOS (AppKit) build."
+ echo "Golden images: \`scripts/macos/screenshots/\` (see the README there for the seeding workflow)."
+ echo
+ if [ -s "$COMPARE_JSON" ]; then
+ python3 scripts/ci/metal-screenshot-summary.py --markdown "$COMPARE_JSON"
+ elif [ -s "$COMMENT_MD" ]; then
+ cat "$COMMENT_MD"
+ else
+ echo "_No screenshot comparison artifact was produced. See the upload step output for details._"
+ fi
+ } >> "$GITHUB_STEP_SUMMARY"
+ if [ -s "$COMPARE_JSON" ]; then
+ NOTICE="$(python3 scripts/ci/metal-screenshot-summary.py --headline "$COMPARE_JSON" || true)"
+ if [ -n "$NOTICE" ]; then
+ echo "::notice title=macOS screenshot comparison::${NOTICE}"
+ fi
+ fi
+
+ - name: Upload macOS artifacts
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') }}
uses: actions/upload-artifact@v7
with:
- name: watch-ui-tests
+ name: macos-ui-tests
path: |
- artifacts/watch-ui-tests
+ artifacts/macos-ui-tests
artifacts/*.log
artifacts/*-stats.txt
artifacts/vm_time.txt
@@ -1282,242 +812,162 @@ jobs:
if-no-files-found: warn
retention-days: 14
- - name: Upload golden capture
- if: always()
+ # Read by perf-baseline.yml's nightly tighten job, which lowers a baseline once
+ # master has beaten it consistently, so a win cannot be given back unnoticed.
+ - name: Upload the performance gate results
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') }}
uses: actions/upload-artifact@v7
with:
- name: cn1ss-capture-ios-watch
- path: artifacts/cn1ss-capture
+ name: perf-results-macos-arm64
+ path: artifacts/macos-ui-tests/perf/perf-results.json
if-no-files-found: ignore
+ retention-days: 14
- build-ios-tv:
- if: ${{ needs.golden-plan.outputs.run == 'true' && (!inputs.watch_only && needs.select.outputs.tv == 'true') }}
- # Native Apple TV (tvOS) screenshot pipeline. The tvOS slice auto-enables
- # from codename1.tvMain in the sample, so build-ios-app.sh generates the
- # TV target alongside the iOS app. tvOS reuses the iOS UIApplicationMain
- # entry and the Metal renderer (no OpenGL ES on tvOS); this job builds the TV
- # target for the appletvsimulator, renders the cn1ss suite and streams frames
- # to the same cn1ss test server the iOS/watch jobs use, comparing against
- # scripts/ios/screenshots-tv.
- #
- # BLOCKING (a hard golden gate, like build-ios-watch): the tvOS slice
- # compiles end-to-end and the golden set is seeded from a CI capture (see
- # Ports/iOSPort/nativeSources/TVOS_PORT.md). A mismatch fails the job.
- needs: [golden-plan, select, build-port, unity-gallery]
- permissions:
- contents: read
- pull-requests: write
- issues: write
- runs-on: macos-15
- # Measured: the sample build takes 15-22 min and the tvOS screenshot run
- # 28-33 min on a hosted macos-15, so 60 left nothing for a slow runner and
- # cancelled the suite mid-run on unrelated branches.
- timeout-minutes: 90
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # The device runner reports logical test failures through CN1SS log
- # markers, not through the build or the screenshot comparison. Make the
- # normalized report authoritative so a failing or never-run compliance
- # test cannot leave this workflow green and then be published from master.
- CN1SS_FAIL_ON_TEST_PROBLEMS: '1'
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
+ - name: Fail on a ParparVM performance regression
+ if: ${{ !cancelled() && (!inputs.watch_only && needs.select.outputs.macos == 'true') && inputs.cn1ss_capture == '' }}
+ # Not in a capture (cn1ss_capture): that run exists to render goldens,
+ # and a timing gate failing it only marks the capture red.
+ run: vm/selfhost/ci-perf-gate.sh verdict artifacts/macos-ui-tests/perf
- - name: Ensure CocoaPods tooling
+ # Last, because it regenerates the native themes in the workspace.
+ # ---- Native theme fidelity (iOS Modern 27, Metal) ----
+ - name: Regenerate native themes from CSS
+ if: ${{ !cancelled() && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.fidelity == 'true') }}
+ env:
+ CN1SS_FAIL_ON_MISMATCH: '1'
+ CN1SS_FIDELITY_EPSILON: '2.0'
+ CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'
+ CN1SS_FAIL_ON_TEST_PROBLEMS: '0'
+ # The fidelity app bundles a committed .res; theme.css is the source of
+ # truth. Recompile here so a stale committed copy can never silently
+ # render an old theme (the cause of phantom "regressions").
+ run: ./scripts/build-native-themes.sh
+
+ - name: Build fidelity app (iOS, Metal)
+ if: ${{ !cancelled() && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.fidelity == 'true') }}
+ env:
+ CN1SS_FAIL_ON_MISMATCH: '1'
+ CN1SS_FIDELITY_EPSILON: '2.0'
+ CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'
+ CN1SS_FAIL_ON_TEST_PROBLEMS: '0'
+ id: fid-build
run: |
mkdir -p ~/.codenameone
cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- if ! command -v ruby >/dev/null; then
- echo "ruby not found"; exit 1
- fi
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: |
- set -euo pipefail
- echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- # Replaces the evictable cn1-built cache restore with the artifact
- # build-port handed off (not LRU-evicted, survives --failed re-runs).
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
- # The test server build-port built for the whole run, when it did.
- # Without it the suite script builds its own, as it always has.
- if [ -f "$RUNNER_TEMP/cn1ss-server.tar" ]; then
- tar -C / -xf "$RUNNER_TEMP/cn1ss-server.tar"
- fi
- if [ -d "$RUNNER_TEMP/cn1ss-server/classes" ]; then
- echo "CN1SS_SERVER_DIST=$RUNNER_TEMP/cn1ss-server" >> "$GITHUB_ENV"
- echo "Using the prebuilt test server in $RUNNER_TEMP/cn1ss-server"
- else
- echo "No prebuilt test server in the bundle; the suite builds its own."
- fi
-
- # 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: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
+ ./scripts/build-fidelity-app.sh ios -q -DskipTests
- - name: Build sample iOS app (generates the tvOS target)
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 30
-
- # The tvOS half of the private-API gate, and the tvOS compile gate. A tvOS slice compiles
- # the port with whatever switches the iOS app turned on, and the iOS jobs compile it only
- # for iOS -- where every `#if TARGET_OS_TV` branch is preprocessed away -- so a feature
- # whose code tvOS cannot compile (contacts, NFC, the photo picker, StoreKit's identifier
- # payments ...) broke every TV build of an app using it, unseen. This compiles every
- # native with every gate on against BOTH tvOS SDKs: the device SDK differs (it has no
- # LocalAuthentication) and no job builds it. The tvOS app itself is binary-checked by
- # run-tv-ui-tests.sh after its build.
- - name: Check the port compiles for tvOS and references no private Apple API
+ - name: Build simulator app
+ if: ${{ !cancelled() && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.fidelity == 'true') && steps.fid-build.outcome == 'success' }}
+ env:
+ CN1SS_FAIL_ON_MISMATCH: '1'
+ CN1SS_FIDELITY_EPSILON: '2.0'
+ CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'
+ CN1SS_FAIL_ON_TEST_PROBLEMS: '0'
+ id: fid-simapp
run: |
set -euo pipefail
+ # build-fidelity-app.sh -> build-ios-app.sh is pinned by
+ # scripts/lib/xcode.sh; this step used to compile that project with the
+ # runner's ambient xcodebuild instead, so the project was GENERATED by
+ # one Xcode and BUILT by another. Pin both ends to the same one.
# shellcheck source=/dev/null
source scripts/lib/xcode.sh
cn1_select_xcode || exit 1
- for sdk in appletvos appletvsimulator; do
- scripts/check-ios-private-api.py \
- --developer-dir "$DEVELOPER_DIR" --sdk "$sdk" \
- --project-dir "$(dirname "${{ steps.build-ios-app.outputs.workspace }}")"/*-src
- done
- timeout-minutes: 20
-
- - name: Ensure tvOS simulator runtime
- run: |
- set -euo pipefail
- if ! xcrun simctl list runtimes available 2>/dev/null | grep -qi tvOS; then
- echo "No tvOS runtime found; attempting download"
- xcodebuild -downloadPlatform tvOS || true
- fi
- xcrun simctl list runtimes available 2>/dev/null | grep -i tvOS || true
- xcrun simctl list devices available 2>/dev/null | grep -i "Apple TV" || true
-
- - name: Run tvOS UI screenshot tests
+ WS="$(find scripts/fidelity-app/ios/target -name '*.xcworkspace' -maxdepth 3 | head -n1)"
+ PROJ_DIR="$(dirname "$WS")"
+ SCHEME="$(xcodebuild -workspace "$WS" -list 2>/dev/null | awk '/Schemes:/{f=1;next} f&&NF{print $1; exit}')"
+ DD="$PROJ_DIR/dd"
+ # arm64-only: the xcode-27 runner is Apple Silicon and the x86_64
+ # simulator slice fails to build the ParparVM SIMD code (clang
+ # '_Builtin_intrinsics.arm.neon requires feature neon' module error).
+ xcodebuild -workspace "$WS" -scheme "$SCHEME" -sdk iphonesimulator \
+ -configuration Debug -derivedDataPath "$DD" \
+ ARCHS=arm64 ONLY_ACTIVE_ARCH=YES VALID_ARCHS=arm64 \
+ CODE_SIGNING_ALLOWED=NO build
+ APP="$(find "$DD/Build/Products" -maxdepth 2 -name '*.app' -type d | head -n1)"
+ echo "app_path=$APP" >> "$GITHUB_OUTPUT"
+
+ - name: Boot simulator (runtime matching the golden set)
+ if: ${{ !cancelled() && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.fidelity == 'true') && steps.fid-build.outcome == 'success' }}
env:
- ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/tv-ui-tests
- SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-tv
- CN1SS_COMMENT_MARKER: ''
- CN1SS_PREVIEW_SUBDIR: ios-tv
- CN1SS_REPORT_TITLE: 'Apple TV (tvOS) screenshot updates'
- CN1SS_SUCCESS_MESSAGE: '✅ Native Apple TV (tvOS, Metal) screenshot tests passed.'
- CN1SS_COMMENT_LOG_PREFIX: '[run-tv-ui-tests]'
CN1SS_FAIL_ON_MISMATCH: '1'
- # A missing frame is an incomplete run, not an allowed result.
- CN1SS_ALLOWED_MISSING: '0'
- run: |
- set -euo pipefail
- mkdir -p "${ARTIFACTS_DIR}"
- echo "workspace='${{ steps.build-ios-app.outputs.workspace }}'"
- echo "scheme='${{ steps.build-ios-app.outputs.scheme }}'"
- ./scripts/run-tv-ui-tests.sh \
- "${{ steps.build-ios-app.outputs.workspace }}" \
- "${{ steps.build-ios-app.outputs.scheme }}"
- timeout-minutes: 45
-
- - name: Upload tvOS port status
- if: ${{ !cancelled() }}
+ CN1SS_FIDELITY_EPSILON: '2.0'
+ CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'
+ CN1SS_FAIL_ON_TEST_PROBLEMS: '0'
+ id: fid-sim
+ # The golden set names the OS design generation it was captured on
+ # (ios-26-metal). The suite MUST run on a matching runtime: a different
+ # iOS generation renders different SF fonts/glyphs and produces phantom
+ # regressions. The helper fails loudly (78) if the runner lacks the
+ # runtime -- the fix is pinning a runner image/Xcode that ships it,
+ # never regenerating references on whatever the runner happens to have.
+ #
+ # It also puts every simctl call on a deadline. Inline, these four calls
+ # twice hung with no output at all and burned the job's entire 90-minute
+ # budget, ending as "cancelled" rather than as a failure; the script's
+ # header records the runs and why the one retry it does is allowed.
+ run: ./scripts/ci/boot-ios-simulator.sh 'iOS-27[0-9-]*' 'iPhone 16' iPhone16-fidelity27
+
+ - name: Run fidelity suite (simulator, Metal)
+ if: ${{ !cancelled() && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.fidelity == 'true') && steps.fid-build.outcome == 'success' }}
+ env:
+ CN1SS_FAIL_ON_MISMATCH: '1'
+ CN1SS_FIDELITY_EPSILON: '2.0'
+ CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'
+ CN1SS_FAIL_ON_TEST_PROBLEMS: '0'
+ # The committed baseline is the ratchet floor: the gate fails the job
+ # on any regression. To re-anchor intentionally, run locally with
+ # FIDELITY_UPDATE_BASELINE=1 and commit the updated baseline JSON.
+ run: ./scripts/run-ios-fidelity-tests.sh "${{ steps.fid-simapp.outputs.app_path }}" "${{ steps.fid-sim.outputs.udid }}"
+
+ - name: Upload fidelity artifacts
+ if: ${{ !cancelled() && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.fidelity == 'true') }}
uses: actions/upload-artifact@v7
with:
- name: port-status-tvos
- path: artifacts/tv-ui-tests/port-status-tvos.json
+ name: ios-fidelity-27
+ path: |
+ artifacts/ios-fidelity/**
+ scripts/fidelity-app/baseline/ios-27-metal-fidelity-baseline.json
if-no-files-found: warn
retention-days: 14
- - name: Upload tv artifacts
+ # Every suite above ran whatever an earlier one did; any failed step has
+ # already failed the job. This lists which ones, in one place.
+ - name: Suite outcomes
if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: tv-ui-tests
- path: |
- artifacts/tv-ui-tests
- artifacts/*.log
- artifacts/*-stats.txt
- artifacts/vm_time.txt
- artifacts/xcodebuild-list.txt
- if-no-files-found: warn
- retention-days: 14
+ env:
+ STEPS: ${{ toJSON(steps) }}
+ run: |
+ python3 - <<'PY'
+ import json, os
+ bad = [k for k, v in json.loads(os.environ['STEPS']).items() if v.get('outcome') == 'failure']
+ print('failed steps: ' + (', '.join(bad) if bad else 'none'))
+ PY
+ # One capture artifact for every suite of the job: each image is filed at
+ # its golden's repository path, so the legs cannot collide.
- name: Upload golden capture
if: always()
uses: actions/upload-artifact@v7
with:
- name: cn1ss-capture-ios-tv
+ name: cn1ss-capture-apple
path: artifacts/cn1ss-capture
if-no-files-found: ignore
native:
- needs: [golden-plan, select, build-port, unity-gallery]
+ needs: [select, build-port]
# Not a screenshot suite: a golden capture skips it.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.native == 'true') }}
+ if: ${{ (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.native == 'true') }}
uses: ./.github/workflows/scripts-ios-native.yml
with:
port_prepared: true
- unity_prepared: true
secrets: inherit
packaging:
- needs: [golden-plan, select, build-port, unity-gallery]
+ needs: [select, build-port]
# Not a screenshot suite: a golden capture skips it.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.packaging == 'true') }}
+ if: ${{ (!inputs.watch_only && inputs.cn1ss_capture == '' && needs.select.outputs.packaging == 'true') }}
uses: ./.github/workflows/ios-packaging.yml
with:
port_prepared: true
- unity_prepared: true
secrets: inherit
diff --git a/.github/workflows/scripts-javascript.yml b/.github/workflows/scripts-javascript.yml
index 5e8cfb3f341..843a4fbe607 100644
--- a/.github/workflows/scripts-javascript.yml
+++ b/.github/workflows/scripts-javascript.yml
@@ -18,149 +18,19 @@ on:
type: boolean
schedule:
- cron: '35 1 * * *'
- 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/compose-compat/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- - '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/**'
- - 'scripts/ci/retry.sh'
- - '.github/workflows/scripts-javascript.yml'
- - 'scripts/run-javascript-browser-tests.sh'
- - 'scripts/run-javascript-screenshot-tests.sh'
- - 'scripts/run-javascript-headless-browser.mjs'
- - 'scripts/run-javascript-lifecycle-tests.mjs'
- - 'scripts/test-javascript-surface-replay.mjs'
- - 'scripts/test-javascript-weak-refs.mjs'
- - 'scripts/test-javascript-dispatch-caches.mjs'
- - 'scripts/test-javascript-native-stub-bindings.mjs'
- - 'scripts/ci/tests/cn1ss-async-sink-test.sh'
- - 'scripts/ci/tests/Cn1ssAsyncSinkTest.java'
- - 'scripts/fidelity-app/common/src/main/java/com/codenameone/fidelity/Cn1ssAsyncSink.java'
- - 'scripts/test-javascript-vault-bridge.mjs'
- - 'scripts/test-javascript-composited-rendering.mjs'
- - 'scripts/javascript/composited-app/**'
- - 'vm/ByteCodeTranslator/src/javascript/browser_bridge.js'
- - 'scripts/run-javascript-lifecycle-tests.sh'
- - 'scripts/verify-javascript-lens-parity.mjs'
- - 'scripts/build-javascript-port-hellocodenameone.sh'
- - 'scripts/javascript_browser_harness.py'
- - 'scripts/javascript/screenshots/**'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/common/java/**'
- - 'scripts/hellocodenameone/**'
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'Ports/JavaScriptPort/**'
- - 'vm/**'
- - 'maven/**'
- - '!maven/core-unittests/**'
- - '!docs/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
- push:
- 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/compose-compat/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- - '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/**'
- - 'scripts/ci/retry.sh'
- - '.github/workflows/scripts-javascript.yml'
- - 'scripts/run-javascript-browser-tests.sh'
- - 'scripts/test-javascript-composited-rendering.mjs'
- - 'scripts/javascript/composited-app/**'
- - 'scripts/run-javascript-screenshot-tests.sh'
- - 'scripts/run-javascript-headless-browser.mjs'
- - 'scripts/run-javascript-lifecycle-tests.mjs'
- - 'scripts/test-javascript-surface-replay.mjs'
- - 'scripts/test-javascript-weak-refs.mjs'
- - 'scripts/test-javascript-dispatch-caches.mjs'
- - 'scripts/test-javascript-native-stub-bindings.mjs'
- - 'scripts/ci/tests/cn1ss-async-sink-test.sh'
- - 'scripts/ci/tests/Cn1ssAsyncSinkTest.java'
- - 'scripts/fidelity-app/common/src/main/java/com/codenameone/fidelity/Cn1ssAsyncSink.java'
- - 'scripts/run-javascript-lifecycle-tests.sh'
- - 'scripts/verify-javascript-lens-parity.mjs'
- - 'scripts/build-javascript-port-hellocodenameone.sh'
- - 'scripts/javascript_browser_harness.py'
- - 'scripts/javascript/screenshots/**'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/common/java/**'
- - 'scripts/hellocodenameone/**'
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'Ports/JavaScriptPort/**'
- - 'vm/**'
- - 'maven/**'
- - '!maven/core-unittests/**'
- - '!docs/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
-
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: scripts-javascript-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # First, so a PR whose new screenshot tests have no goldens yet runs nothing
- # here; Golden capture (golden-capture.yml) records them instead.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- with:
- capture: ${{ inputs.cn1ss_capture || '' }}
-
- # 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:
- needs: golden-plan
- if: ${{ needs.golden-plan.outputs.run == 'true' && (!inputs.port_status_browser_evidence) }}
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
javascript-screenshots:
- needs: [golden-plan, unity-gallery]
- if: ${{ needs.golden-plan.outputs.run == 'true' && (!inputs.port_status_browser_evidence) }}
+ if: ${{ (!inputs.port_status_browser_evidence) }}
permissions:
contents: read
pull-requests: write
@@ -361,11 +231,6 @@ jobs:
- name: Setup workspace
run: ./scripts/setup-workspace.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: Enter golden capture mode
uses: ./.github/actions/cn1ss-capture
with:
@@ -479,8 +344,7 @@ jobs:
if-no-files-found: ignore
port-status-browser-evidence:
- needs: golden-plan
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name == 'workflow_dispatch' && inputs.port_status_browser_evidence) }}
+ if: ${{ (github.event_name == 'workflow_dispatch' && inputs.port_status_browser_evidence) }}
permissions:
actions: write
contents: write
diff --git a/.github/workflows/scripts-javase.yml b/.github/workflows/scripts-javase.yml
index c0239a105b7..8f8189d1e80 100644
--- a/.github/workflows/scripts-javase.yml
+++ b/.github/workflows/scripts-javase.yml
@@ -5,46 +5,18 @@ on:
# diff limit, so pull_request triggers stopped firing -- dispatch with
# gh workflow run --ref
workflow_dispatch:
- pull_request:
- paths:
- - '.github/workflows/scripts-javase.yml'
- - 'scripts/run-javase-simulator-integration-tests.sh'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/common/java/**'
- - 'scripts/javase/**'
- - '!scripts/javase/**/*.md'
- - 'Ports/JavaSE/**'
- - '!Ports/JavaSE/**/*.md'
- push:
- branches: [ master ]
- paths:
- - '.github/workflows/scripts-javase.yml'
- - 'scripts/run-javase-simulator-integration-tests.sh'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/common/java/**'
- - 'scripts/javase/**'
- - '!scripts/javase/**/*.md'
- - 'Ports/JavaSE/**'
- - '!Ports/JavaSE/**/*.md'
-
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: scripts-javase-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
javase-simulator-tests:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
permissions:
contents: read
pull-requests: write
diff --git a/.github/workflows/scripts-macos.yml b/.github/workflows/scripts-macos.yml
deleted file mode 100644
index b2372c8bc21..00000000000
--- a/.github/workflows/scripts-macos.yml
+++ /dev/null
@@ -1,434 +0,0 @@
-name: Test macOS UI build scripts
-
-# The native macOS (AppKit) port. A real macOS Xcode project: SDKROOT=macosx,
-# AppKit and Metal, no UIKit.
-# The build routes the generated project to target/-mac-source/
-# with every setting written at generation time -- no post-hoc injection and
-# no Ruby xcodeproj gem, because the project is macOS-shaped to begin with
-# rather than an iOS one being adjusted. This workflow exercises that path
-# end-to-end: sample app -> Xcode project -> .app -> screenshot suite ->
-# golden comparison.
-#
-# The port artifact comes from the reusable _build-mac-port.yml workflow
-# rather than _build-ios-port.yml. Sharing the iOS one would put
-# Ports/MacPort in its source hash, so a macOS-only change would invalidate
-# the cache for all four of its iOS consumers -- one change paying for four
-# rebuilds.
-
-on:
- workflow_dispatch:
- inputs:
- cn1ss_capture:
- description: Golden capture only (golden-capture.yml) - the tests without goldens, for the log; the full suite runs
- required: false
- default: ''
- type: string
- schedule:
- - cron: '25 1 * * *'
- 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/compose-compat/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- - '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/scripts-macos.yml'
- - '.github/workflows/_build-mac-port.yml'
- - 'scripts/setup-workspace.sh'
- - 'scripts/build-mac-port.sh'
- - 'scripts/build-macos-app.sh'
- - 'scripts/run-macos-ui-tests.sh'
- - 'scripts/hellocodenameone/**'
- - 'scripts/ios/tests/**'
- - 'scripts/macos/**'
- - 'scripts/templates/**'
- - '!scripts/templates/**/*.md'
- - 'scripts/common/java/**'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/lib/xcode.sh'
- - 'CodenameOne/src/**'
- - '!CodenameOne/src/**/*.md'
- - 'Ports/MacPort/**'
- - '!Ports/MacPort/**/*.md'
- # The mac module stages and compiles shared sources out of Ports/iOSPort --
- # IOSImplementation, IOSNative.m, the Metal renderer, the whole drawing
- # core. An iOS-port-only change to any of that reaches this port, so
- # without this filter the AppKit suite never starts and the change ships
- # untested here. The reusable build workflow's source hash cannot save
- # it: the workflow is not invoked at all.
- - 'Ports/iOSPort/**'
- - '!Ports/iOSPort/**/*.md'
- - 'native-themes/ios-modern/**'
- - '!native-themes/ios-modern/**/*.md'
- - 'vm/**'
- - '!vm/**/*.md'
- - 'tests/**'
- - '!tests/**/*.md'
- - 'maven/**'
- - '!maven/cn1-ai-*/**'
- - '!maven/cn1-admob/**'
- - '!maven/cn1-applovin/**'
- - '!maven/cn1-unity-levelplay/**'
- - '!maven/core-unittests/**'
- - '!docs/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
- push:
- 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/compose-compat/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- - '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/scripts-macos.yml'
- - '.github/workflows/_build-mac-port.yml'
- - 'scripts/setup-workspace.sh'
- - 'scripts/build-mac-port.sh'
- - 'scripts/build-macos-app.sh'
- - 'scripts/run-macos-ui-tests.sh'
- - 'scripts/hellocodenameone/**'
- - 'scripts/ios/tests/**'
- - 'scripts/macos/**'
- - 'scripts/templates/**'
- - '!scripts/templates/**/*.md'
- - 'scripts/common/java/**'
- - 'scripts/lib/cn1ss.sh'
- - 'scripts/lib/xcode.sh'
- - 'CodenameOne/src/**'
- - 'Ports/MacPort/**'
- - 'Ports/iOSPort/**'
- - 'native-themes/ios-modern/**'
- - 'vm/**'
- - 'tests/**'
- - 'maven/**'
- - '!maven/cn1-ai-*/**'
- - '!maven/cn1-admob/**'
- - '!maven/cn1-applovin/**'
- - '!maven/cn1-unity-levelplay/**'
- - '!maven/core-unittests/**'
- # The screenshot transport is now a Codename One backend application, so the
- # two files that are ONLY exercised here have to trigger this leg: the
- # server itself and the script that launches it.
- #
- # Deliberately NOT the rest of vm/backend. The websocket protocol code is
- # covered by maven/backend's unit tests, by vm/tests against the translated
- # binary, and by the Autobahn conformance job -- all of which already
- # trigger on vm/**. Fanning every backend change out to the macOS and
- # emulator legs as well would buy nothing and cost a great deal: a change to
- # the ORM, the database layer or the HTTP parser cannot reach this
- # transport.
- - 'scripts/hellocodenameone/backend/**'
-env:
- # A method the translator culled as unreachable is still emitted as a stub,
- # because dispatch tables name it. With this on, the stub aborts with the
- # method's name instead of returning 0, so a wrong cull fails the suite that
- # reached it rather than shipping a silent null. Ours to enforce, like
- # CN1_NATIVE_VERIFY: customer builds keep the plain stub. See
- # BytecodeMethod.appendMethodC. Not in the size or perf benchmarks, whose
- # binaries should be the ones customers get.
- CN1_CULL_TRAP: '1'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-jobs:
- # First, so a PR whose new screenshot tests have no goldens yet runs nothing
- # here; Golden capture (golden-capture.yml) records them instead.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- with:
- capture: ${{ inputs.cn1ss_capture || '' }}
-
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
- build-port:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- # AppKit has its own source hash and producer; it does not invalidate
- # the iOS coordinator's bundle.
- uses: ./.github/workflows/_build-mac-port.yml
-
- build-macos:
- if: needs.golden-plan.outputs.run == 'true'
- needs: [golden-plan, build-port, unity-gallery]
- permissions:
- contents: read
- pull-requests: write
- issues: write
- runs-on: macos-15
- # build step (<=45) + screenshot-run step (<=45) <= 90, matching the
- # iOS Metal job headroom bump (a08e87b32). The 45-min job cap used to
- # SIGKILL the screenshot run mid-post-processing on slow runners. Plus 50 for the
- # ParparVM vs JDK 25 performance gate.
- timeout-minutes: 140
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # The device runner reports logical test failures through CN1SS log
- # markers, not through the build or the screenshot comparison. Make the
- # normalized report authoritative so a failing or never-run compliance
- # test cannot leave this workflow green and then be published from master.
- CN1SS_FAIL_ON_TEST_PROBLEMS: '1'
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- # Optional: when set, build-macos-app.sh writes it as a bundled
- # resource so the GoogleWebMap screenshot test renders a live Google map;
- # absent (e.g. fork PRs with no access to the secret) the test skips.
- GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
-
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods / xcodeproj tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- # No xcodeproj gem here, deliberately: this generates a macOS
- # project with its settings already in it.
- echo "no gem dependencies for the AppKit build"
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: |
- set -euo pipefail
- echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- # build-macos-app.sh reads ${TMPDIR}/codenameone-tools/tools/env.sh, and
- # build-port bundles that directory relative to runner.temp. The two have
- # to agree on TMPDIR or the build stops at "Workspace tools not found"
- # before it compiles a line.
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> $GITHUB_ENV
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + mac port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-mac-bundle
- path: ${{ runner.temp }}
-
- - name: Restore built CN1 + mac port tree
- run: |
- set -euo pipefail
- # An artifact rather than the cache restore: caches are LRU-evicted
- # once the repo store is over quota, and an eviction between build-port
- # and this job would fail here with nothing built. tar relative to /
- # so the home and workspace paths land where the build script looks.
- tar -C / -xf "$RUNNER_TEMP/cn1-built-mac-bundle.tar"
-
- - name: Install Metal Toolchain
- # Xcode 26+ requires the Metal Toolchain component for .metal shader
- # compilation. This port is Metal-only -- OpenGL ES does not exist on
- # macOS -- so the download is always required.
- run: |
- set -euo pipefail
- # Same selection the build scripts use, so this cannot install the
- # component into one Xcode and then build with another.
- # shellcheck source=/dev/null
- source scripts/lib/xcode.sh
- cn1_select_xcode || exit 1
- "$XCODEBUILD" -downloadComponent MetalToolchain
- timeout-minutes: 10
-
- # 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: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
-
- - name: Build sample macOS app and compile workspace
- id: build-macos-app
- run: ./scripts/build-macos-app.sh -q -DskipTests
- timeout-minutes: 30
-
- # ParparVM against JDK 25 on this runner: the HelloCodenameOne classes the step
- # above just built, the translator translating itself, and every Bench workload.
- # Before the screenshot step, whose PR comment carries the table
- # (CN1SS_EXTRA_MARKDOWN); the job's last step fails it on a regression. The
- # workspace JDK 8 comes from setup-workspace's env.sh, exactly as the app build
- # got it, and JDK 25 is fetched privately so no later step sees a different JDK.
- - name: ParparVM vs JDK 25 (performance gate)
- if: success() || failure()
- # Names this pull request's overlay (perf-baseline/pr/.json) in the
- # comment. A workflow_dispatch run carries no pull request, so the gate asks gh.
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- set -u
- ENV_FILE="${TMPDIR%/}/codenameone-tools/tools/env.sh"
- if [ -f "$ENV_FILE" ]; then . "$ENV_FILE"; fi
- export JDK_8_HOME="$JAVA_HOME"
- export PATH="${MAVEN_HOME:+$MAVEN_HOME/bin:}$PATH"
- vm/selfhost/ci-perf-gate.sh run macos-arm64 artifacts/macos-ui-tests/perf
-
- - name: Run macOS UI screenshot tests
- env:
- ARTIFACTS_DIR: ${{ github.workspace }}/artifacts/macos-ui-tests
- CN1SS_EXTRA_MARKDOWN: ${{ github.workspace }}/artifacts/macos-ui-tests/perf/perf-comment.md
- # Strict screenshot gating: every expected frame must be captured and
- # compared. Enforced centrally in scripts/lib/cn1ss.sh.
- CN1SS_FAIL_ON_MISMATCH: '1'
- CN1SS_ALLOWED_MISSING: '0'
- run: |
- set -euo pipefail
- mkdir -p "${ARTIFACTS_DIR}"
-
- echo "workspace='${{ steps.build-macos-app.outputs.workspace }}'"
- echo "scheme='${{ steps.build-macos-app.outputs.scheme }}'"
-
- ./scripts/run-macos-ui-tests.sh \
- "${{ steps.build-macos-app.outputs.workspace }}" \
- "" \
- "${{ steps.build-macos-app.outputs.scheme }}"
- # The script's own suite budget is already 1500s (25m); add app
- # launch + post-processing (compare 122 images, render report, post
- # comment) and a slow runner tips just over the old 30m step cap and
- # gets SIGKILLed mid-compare -- a flaky timeout, not a real mismatch.
- # 45m lets the script's internal timeout govern gracefully instead.
- timeout-minutes: 45
-
- - name: Upload macOS port status
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: port-status-macos
- path: artifacts/macos-ui-tests/port-status-macos.json
- if-no-files-found: warn
- retention-days: 14
-
- - name: Publish macOS screenshot summary
- # Surfaces run-macos-ui-tests.sh's comparison result in the
- # job's GitHub Actions summary page so the Mac slice status is
- # visible at a glance without digging into the artifact zip.
- # Reuses the existing metal-screenshot-summary.py helper because
- # the JSON schema is identical -- the summary text says "iOS
- # Metal" so the wrapper here overrides the headline manually.
- if: ${{ !cancelled() }}
- env:
- COMPARE_JSON: ${{ github.workspace }}/artifacts/macos-ui-tests/screenshot-compare.json
- COMMENT_MD: ${{ github.workspace }}/artifacts/macos-ui-tests/screenshot-comment.md
- run: |
- set -eu
- {
- echo "## macOS screenshot comparison"
- echo
- echo "Ran against \`scripts/hellocodenameone\` as a native macOS (AppKit) build."
- echo "Golden images: \`scripts/macos/screenshots/\` (see the README there for the seeding workflow)."
- echo
- if [ -s "$COMPARE_JSON" ]; then
- python3 scripts/ci/metal-screenshot-summary.py --markdown "$COMPARE_JSON"
- elif [ -s "$COMMENT_MD" ]; then
- cat "$COMMENT_MD"
- else
- echo "_No screenshot comparison artifact was produced. See the upload step output for details._"
- fi
- } >> "$GITHUB_STEP_SUMMARY"
- if [ -s "$COMPARE_JSON" ]; then
- NOTICE="$(python3 scripts/ci/metal-screenshot-summary.py --headline "$COMPARE_JSON" || true)"
- if [ -n "$NOTICE" ]; then
- echo "::notice title=macOS screenshot comparison::${NOTICE}"
- fi
- fi
-
- - name: Upload macOS artifacts
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: macos-ui-tests
- path: artifacts
- if-no-files-found: warn
- retention-days: 14
-
- # Read by perf-baseline.yml's nightly tighten job, which lowers a baseline once
- # master has beaten it consistently, so a win cannot be given back unnoticed.
- - name: Upload the performance gate results
- if: success() || failure()
- uses: actions/upload-artifact@v7
- with:
- name: perf-results-macos-arm64
- path: artifacts/macos-ui-tests/perf/perf-results.json
- if-no-files-found: ignore
- retention-days: 14
-
- - name: Fail on a ParparVM performance regression
- # Not in a capture (cn1ss_capture): that run exists to render goldens,
- # and a timing gate failing it only marks the capture red.
- if: ${{ (success() || failure()) && inputs.cn1ss_capture == '' }}
- run: vm/selfhost/ci-perf-gate.sh verdict artifacts/macos-ui-tests/perf
-
- - name: Upload golden capture
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: cn1ss-capture-macos
- path: artifacts/cn1ss-capture
- if-no-files-found: ignore
diff --git a/.github/workflows/skirmish.yml b/.github/workflows/skirmish.yml
deleted file mode 100644
index 41519d0aa47..00000000000
--- a/.github/workflows/skirmish.yml
+++ /dev/null
@@ -1,559 +0,0 @@
-name: Skirmish (game sample)
-
-# scripts/skirmish is one Maven project holding a game and its server: a
-# `shared` module (the deterministic simulation both sides run, plus the
-# transfer objects and @RestClient contracts), the Codename One client
-# (`common`), a Codename One Backend that implements the contracts, and an `ios`
-# module for the device build. It is modelled on savor.yml.
-#
-# Five things are checked here, because each fails without the others noticing:
-#
-# rules the simulation's own tests (in `shared`), on the JVM, with no server
-# backend the server's own tests, on the JVM and compiled by ParparVM,
-# then the same tests on PostgreSQL and MySQL
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server (run-e2e.sh builds and starts
-# the server itself)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# Savor's `web` job (the browser build hosted by the server) is dropped: Skirmish
-# has no run-web-e2e.sh, so there is nothing to run. The two device builds stop
-# at a build: the screens are covered by the simulator run, and neither port
-# holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/skirmish/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/skirmish.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/skirmish and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/skirmish
- run: |
- python3 scripts/sync-initializr-template.py skirmish
-
- rules:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Rules tests (deterministic simulation)
- runs-on: ubuntu-24.04
- timeout-minutes: 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the simulation tests
- working-directory: scripts/skirmish
- run: mvn -B -pl shared test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: skirmish-simulation-tests
- path: scripts/skirmish/shared/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/skirmish
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/skirmish/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: skirmish-backend-tests
- path: scripts/skirmish/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/skirmish \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: skirmish-backend-${{ matrix.database }}-tests
- path: scripts/skirmish/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/skirmish/check-template.sh "$RUNNER_TEMP/skirmish-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/skirmish/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: skirmish-e2e
- path: |
- scripts/skirmish/target/e2e-shots/**
- scripts/skirmish/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/skirmish
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-skirmish-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-skirmish-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-skirmish-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-skirmish-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/skirmish
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/skirmish-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -sdk iphonesimulator \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/slate.yml b/.github/workflows/slate.yml
deleted file mode 100644
index a86b3d5d142..00000000000
--- a/.github/workflows/slate.yml
+++ /dev/null
@@ -1,591 +0,0 @@
-name: Slate (full-stack sample)
-
-# scripts/slate is one Maven project holding an appointment booking application and
-# its server: a `shared` module of transfer objects and @RestClient contracts,
-# the Codename One client that calls them, and a Codename One Backend that
-# implements them.
-#
-# Five things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it builds (client-e2e)
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/slate/**'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/slate.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/slate and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/slate
- run: python3 scripts/sync-initializr-template.py slate
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/slate
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/slate/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: slate-backend-tests
- path: scripts/slate/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/slate \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: slate-backend-${{ matrix.database }}-tests
- path: scripts/slate/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/slate/check-template.sh "$RUNNER_TEMP/slate-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/slate/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: slate-e2e
- path: |
- scripts/slate/target/e2e-shots/**
- scripts/slate/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/slate/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: slate-web-e2e
- path: scripts/slate/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/slate
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-slate-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-slate-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-slate-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-slate-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/slate
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/slate-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
- # embedded watch app included, whose watch-only icon then has nothing to
- # compile for. The destination picks each target's own SDK.
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/source-gates.yml b/.github/workflows/source-gates.yml
index b2a903f32a1..2277aa7ac06 100644
--- a/.github/workflows/source-gates.yml
+++ b/.github/workflows/source-gates.yml
@@ -16,31 +16,17 @@ permissions:
on:
workflow_dispatch:
- pull_request:
- branches:
- - master
- push:
- branches:
- - master
-
+ # Pull requests and master pushes run this as part of ci.yml's precheck,
+ # which every other job of that run waits on.
+ workflow_call:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: source-gates-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
source-gates:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
@@ -76,6 +62,15 @@ jobs:
shell: bash
run: scripts/check-author-tags.py
+ # The same check javadocs.yml runs, here so a missing package-info.java
+ # fails in seconds instead of after the javadoc build.
+ - name: Every documented package has a package-info.java
+ if: ${{ !cancelled() }}
+ shell: bash
+ run: |
+ scripts/check-package-info.sh
+ scripts/check-package-info.sh vm/backend/src
+
- name: Reject since markers in API docs
if: ${{ !cancelled() }}
shell: bash
diff --git a/.github/workflows/splat.yml b/.github/workflows/splat.yml
deleted file mode 100644
index 42d080da8f1..00000000000
--- a/.github/workflows/splat.yml
+++ /dev/null
@@ -1,558 +0,0 @@
-name: Splat (paintball sample)
-
-# scripts/splat is one Maven project holding a game and its server: a
-# `shared` module (the deterministic simulation both sides run, plus the
-# transfer objects and @RestClient contracts), the Codename One client
-# (`common`), a Codename One Backend that implements the contracts, and an `ios`
-# module for the device build. It is modelled on savor.yml.
-#
-# Five things are checked here, because each fails without the others noticing:
-#
-# rules the simulation's own tests (in `shared`), on the JVM, with no server
-# backend the server's own tests, on the JVM and compiled by ParparVM,
-# then the same tests on PostgreSQL and MySQL
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server (run-e2e.sh builds and starts
-# the server itself)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# Savor's `web` job (the browser build hosted by the server) is dropped: Splat
-# has no run-web-e2e.sh, so there is nothing to run. The two device builds stop
-# at a build: the screens are covered by the simulator run, and neither port
-# holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/splat/**'
- - '.github/workflows/splat.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/splat and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/splat
- run: |
- python3 scripts/sync-initializr-template.py splat
-
- rules:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Rules tests (deterministic simulation)
- runs-on: ubuntu-24.04
- timeout-minutes: 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the simulation tests
- working-directory: scripts/splat
- run: mvn -B -pl shared test -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: splat-simulation-tests
- path: scripts/splat/shared/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/splat
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/splat/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: splat-backend-tests
- path: scripts/splat/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit,cn1-app-kit/common,cn1-app-kit/backend,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/splat \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: splat-backend-${{ matrix.database }}-tests
- path: scripts/splat/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/splat/check-template.sh "$RUNNER_TEMP/splat-template"
-
- # The Initializr's own tests, which cover this template too, run in
- # wayline.yml: a change here reaches the generator's resources, which
- # trigger it.
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/splat/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: splat-e2e
- path: |
- scripts/splat/target/e2e-shots/**
- scripts/splat/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/splat
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-splat-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-splat-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- key: ${{ runner.os }}-gradle-splat-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-splat-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/splat
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/splat-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- # No -sdk: it forces every target of the scheme onto the iPhone SDK, the
- # embedded watch app included, whose watch-only icon then has nothing to
- # compile for. The destination picks each target's own SDK.
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/spreadsheet-interop.yml b/.github/workflows/spreadsheet-interop.yml
index bd00d5f9fca..e22cdb5b124 100644
--- a/.github/workflows/spreadsheet-interop.yml
+++ b/.github/workflows/spreadsheet-interop.yml
@@ -47,7 +47,7 @@ jobs:
uses: actions/cache@v5
with:
path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ key: ${{ runner.os }}-m2-${{ hashFiles('maven/**/pom.xml', 'vm/*/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
- name: Use Google's copy of Maven Central first
diff --git a/.github/workflows/unity-compat.yml b/.github/workflows/unity-compat.yml
index fc0b46c3a2d..ae6e2f9ca64 100644
--- a/.github/workflows/unity-compat.yml
+++ b/.github/workflows/unity-compat.yml
@@ -25,94 +25,34 @@ name: Unity compatibility
# modules, enforced by the script PR CI uses for
# the rest of the tree, and the ClassCastException
# gate over the runtime, which ParparVM translates
-# unity-gallery-consumer the archive unity-gallery-prebuilt.yml makes for
-# the screenshot workflows, unpacked into a job
-# that built neither Unity module and has no SDK
-# it may use: the application's common module has
-# to build from it, and a stale archive has to be
-# refused by name
#
# The static analysis gates run HERE and not in pr.yml's Java 8 leg, where the
# other modules are judged. Both modules build only with the .NET SDK, and
# putting them in that leg would make every pull request in the repository
-# install .NET and build C# to analyse code it did not touch. Nothing is lost
-# by keeping them apart: the `paths` below name both modules, the rulesets and
-# the scripts that do the judging, so no change to any of them can merge
-# without this workflow running, and the report script fails on a module that
-# produced no report rather than reading the absence as clean.
+# install .NET and build C# to analyse code it did not touch. A change to the
+# rulesets or the report script is judged by the nightly run, and the report
+# script fails on a module that produced no report rather than reading the
+# absence as clean.
+# Nightly, and on a pull request only when the Unity tree itself changes: a
+# change to core, the VM, the archetype or the quality rulesets is covered by
+# the night's run rather than by every pull request. The screenshot app no
+# longer compiles the Unity gallery, so no PR workflow needs .NET either.
on:
pull_request:
branches: [ master ]
paths:
- 'maven/cil-translator/**'
- 'maven/unity-compat/**'
- - 'maven/pom.xml'
- 'maven/integration-tests/unity-compat-test.sh'
- 'maven/integration-tests/unity-compat-project-test.sh'
- 'maven/build-engine/src/main/java/com/codename1/maven/Unity*'
- 'maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*'
- - 'maven/codenameone-gradle-plugin/src/main/java/com/codename1/gradle/AppSupport.java'
- 'maven/codenameone-gradle-plugin/src/main/java/com/codename1/gradle/tasks/CompileUnityTask.java'
- - 'maven/build-engine/src/main/java/com/codename1/maven/GradleConversion.java'
- - 'maven/cn1app-archetype/**'
- - 'maven/integration-tests/inc/**'
- 'scripts/unity-compat-samples/**'
- - 'CodenameOne/src/com/codename1/gaming/**'
- # The platform the offscreen check of the game view runs on.
- - 'maven/core-unittests/src/test/java/com/codename1/testing/**'
- - 'vm/ByteCodeTranslator/**'
- - 'vm/JavaAPI/**'
- - 'vm/selfhost/js/**'
- # What judges the two modules: a change that weakens a gate has to run it.
- - '.github/scripts/generate-quality-report.py'
- - 'maven/core-unittests/pmd.xml'
- - 'maven/core-unittests/checkstyle.xml'
- - 'scripts/check-cast-semantics.sh'
- - 'scripts/cast-semantics-baseline.txt'
- # The archive the screenshot workflows build the application from,
- # and the one job here that proves a job without the SDK can use it.
- - 'scripts/unity-gallery-prebuilt.sh'
- - '.github/workflows/unity-gallery-prebuilt.yml'
- - '.github/actions/unity-gallery-prebuilt/**'
- - 'scripts/hellocodenameone/pom.xml'
- - 'scripts/hellocodenameone/common/pom.xml'
- - '.github/workflows/unity-compat.yml'
- push:
- branches: [ master ]
- paths:
- - 'maven/cil-translator/**'
- - 'maven/unity-compat/**'
- - 'maven/pom.xml'
- - 'maven/integration-tests/unity-compat-test.sh'
- - 'maven/integration-tests/unity-compat-project-test.sh'
- - 'maven/build-engine/src/main/java/com/codename1/maven/Unity*'
- - 'maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/*Unity*'
- - 'maven/codenameone-gradle-plugin/src/main/java/com/codename1/gradle/AppSupport.java'
- - 'maven/codenameone-gradle-plugin/src/main/java/com/codename1/gradle/tasks/CompileUnityTask.java'
- - 'maven/build-engine/src/main/java/com/codename1/maven/GradleConversion.java'
- - 'maven/cn1app-archetype/**'
- - 'maven/integration-tests/inc/**'
- - 'scripts/unity-compat-samples/**'
- - 'CodenameOne/src/com/codename1/gaming/**'
- # The platform the offscreen check of the game view runs on.
- - 'maven/core-unittests/src/test/java/com/codename1/testing/**'
- - 'vm/ByteCodeTranslator/**'
- - 'vm/JavaAPI/**'
- - 'vm/selfhost/js/**'
- # What judges the two modules: a change that weakens a gate has to run it.
- - '.github/scripts/generate-quality-report.py'
- - 'maven/core-unittests/pmd.xml'
- - 'maven/core-unittests/checkstyle.xml'
- - 'scripts/check-cast-semantics.sh'
- - 'scripts/cast-semantics-baseline.txt'
- # The archive the screenshot workflows build the application from,
- # and the one job here that proves a job without the SDK can use it.
- - 'scripts/unity-gallery-prebuilt.sh'
- - '.github/workflows/unity-gallery-prebuilt.yml'
- - '.github/actions/unity-gallery-prebuilt/**'
- - 'scripts/hellocodenameone/pom.xml'
- - 'scripts/hellocodenameone/common/pom.xml'
- '.github/workflows/unity-compat.yml'
+ schedule:
+ - cron: '11 0 * * *'
+ workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -310,89 +250,3 @@ jobs:
maven/integration-tests/build/unity-compat-project/*.err
maven/integration-tests/build/unity-compat-project/app/common/target/unity/*.log
if-no-files-found: ignore
-
- # The screenshot workflows build scripts/hellocodenameone, which has a Unity
- # project in it, on runners with no .NET SDK: one Linux job compiles the
- # project and they unpack what it made. This is that job, and below it the
- # only test of the handoff that does not cost a Mac.
- unity-gallery:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
- unity-gallery-consumer:
- if: needs.golden-plan.outputs.run == 'true'
- needs: [golden-plan, unity-gallery]
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- env:
- # An SDK setting that names nothing is an error, never a reason to look
- # elsewhere, so with this no step below can compile C# -- whatever the
- # runner image has on its PATH.
- NO_DOTNET: -Dcn1.unity.dotnet=/no/such/dotnet
- steps:
- - uses: actions/checkout@v6
- # Installed FIRST so the JDK 8 below is the one JAVA_HOME names.
- - name: Set up JDK 17 for the application build
- uses: actions/setup-java@v5
- with:
- java-version: '17'
- distribution: 'temurin'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- java-version: '8'
- distribution: 'temurin'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # xvfb for the CSS compiler, which opens an AWT frame.
- - name: Install xvfb
- run: bash scripts/ci/apt-get-install.sh xvfb
- # What a screenshot job builds of the framework: no -Dunity-compat. The
- # two artifacts are removed first because the Maven cache above is shared
- # with the jobs of this workflow that do build them.
- - name: Build the framework without the Unity modules
- run: |
- rm -rf ~/.m2/repository/com/codenameone/codenameone-unity-compat ~/.m2/repository/com/codenameone/codenameone-cil-translator
- cd maven
- bash ../scripts/ci/retry.sh xvfb-run -a mvn -B install -Plocal-dev-javase -DskipTests -Darchetype.test.skip=true -Dmaven.javadoc.skip=true -pl codenameone-maven-plugin,cn1-ads-mock,compose-compat,rive-runtime,android-compat -am
- test ! -e ~/.m2/repository/com/codenameone/codenameone-unity-compat
- - name: Unpack the Unity gallery prebuilt
- uses: ./.github/actions/unity-gallery-prebuilt
- - name: Build the application's common module from the archive
- run: |
- set -euo pipefail
- export JAVA_HOME="$JDK_17_HOME"
- export PATH="$JAVA_HOME/bin:$PATH"
- mkdir -p "$HOME/.codenameone"
- [ -f "$HOME/.codenameone/guibuilder.jar" ] || : > "$HOME/.codenameone/guibuilder.jar"
- common=scripts/hellocodenameone/common
- cp "$common/target/unity/state.txt" "$RUNNER_TEMP/unity-state.txt"
- bash scripts/ci/retry.sh xvfb-run -a mvn -B -f scripts/hellocodenameone/pom.xml -pl common -am install -DskipTests -Dmaven.javadoc.skip=true "$NO_DOTNET"
- cmp "$RUNNER_TEMP/unity-state.txt" "$common/target/unity/state.txt"
- test ! -e "$common/target/unity/dotnet.log"
- test -f "$common/target/classes/com/codename1/generated/unity/UnityAppImpl.class"
- # The other half: output that does not belong to these sources and jars
- # is not used, and the failure says that rather than only asking for an
- # SDK. This is what a screenshot job prints when its archive is stale.
- - name: A stale archive is refused by name
- run: |
- set -uo pipefail
- export JAVA_HOME="$JDK_17_HOME"
- export PATH="$JAVA_HOME/bin:$PATH"
- echo stale > scripts/hellocodenameone/common/target/unity/state.txt
- # The step runs under "bash -e": the build is meant to fail, so its
- # status is taken with "||" or the step would stop before judging it.
- status=0
- xvfb-run -a mvn -B -f scripts/hellocodenameone/pom.xml -pl common generate-sources -DskipTests "$NO_DOTNET" > "$RUNNER_TEMP/stale.log" 2>&1 || status=$?
- tail -n 30 "$RUNNER_TEMP/stale.log"
- if [ "$status" -eq 0 ]; then
- echo "::error::A build with a stale state.txt and no .NET SDK succeeded."
- exit 1
- fi
- grep -q 'does not match these sources or jars' "$RUNNER_TEMP/stale.log"
- grep -q 'unity-compat-samples/gallery' "$RUNNER_TEMP/stale.log"
diff --git a/.github/workflows/unity-gallery-prebuilt.yml b/.github/workflows/unity-gallery-prebuilt.yml
deleted file mode 100644
index 8bacfcf1ec5..00000000000
--- a/.github/workflows/unity-gallery-prebuilt.yml
+++ /dev/null
@@ -1,175 +0,0 @@
-name: _Unity gallery prebuilt (reusable)
-
-# scripts/hellocodenameone, the application every screenshot workflow builds,
-# contains a Unity project (scripts/unity-compat-samples/gallery). Compiling
-# it takes the .NET SDK and the two Maven modules behind -Dunity-compat. This
-# workflow is the ONE place that happens: it compiles the gallery on Linux,
-# packs the result with scripts/unity-gallery-prebuilt.sh and uploads it as the
-# artifact `unity-gallery-prebuilt`. Every job that builds the application
-# `needs:` the job that calls this workflow and runs
-# ./.github/actions/unity-gallery-prebuilt, which downloads and unpacks it.
-# No macOS, Windows, Android or iOS job installs .NET or builds those modules.
-#
-# What the consumer gets, and why it is safe on another machine and another
-# operating system, is described in scripts/unity-gallery-prebuilt.sh.
-#
-# Calling it:
-#
-# unity-gallery:
-# uses: ./.github/workflows/unity-gallery-prebuilt.yml
-#
-# ONCE per workflow run. The artifact has a fixed name, and a second upload of
-# it in the same run is refused, so a workflow that is itself called by one
-# that already made the archive takes an input saying so and skips its own
-# call (`unity_prepared`, beside `port_prepared`, in scripts-ios-native.yml
-# and ios-packaging.yml).
-#
-# The cache. A cold build is the framework up to the Maven plugin plus both
-# Unity modules, several minutes; the archive that comes out of it depends only
-# on the files hashed into the key below, so it is cached under that hash and a
-# run that finds it does nothing but upload it again. Two things about that:
-#
-# - The key has to name everything that can change a byte of the archive. The
-# consumer's check is by content, but of the archive's OWN jars: a stale
-# archive is not refused downstream, it is used. So the key takes the whole
-# core (the runtime is compiled against it, and javac copies constants and
-# binds overloads at compile time), both Unity modules, the builder and the
-# goal that drive the compile, the gallery, the application's poms and the
-# scripts and workflow that make the archive. The .NET SDK is not in it:
-# another SDK would write other bytes for the same sources, and either
-# archive is right.
-# - GitHub scopes a cache to the ref that saved it. A pull request's runs all
-# have the same ref (refs/pull/N/merge), so the screenshot workflows of one
-# pull request share one entry, and a run can also read what master saved.
-# Workflows that start together on a push all miss together and each
-# builds; the later ones find the entry. Another pull request never sees it.
-#
-# The artifact, not the cache, is the handoff within a run: a cache entry can
-# be evicted between this job and a consumer that waited for a runner.
-
-on:
- workflow_call:
-
-jobs:
- build:
- name: Unity gallery prebuilt
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- permissions:
- contents: read
- env:
- DOTNET_CLI_TELEMETRY_OPTOUT: '1'
- DOTNET_NOLOGO: '1'
- PACK: ${{ github.workspace }}/artifacts/unity-gallery-prebuilt/unity-gallery-prebuilt.tgz
- steps:
- - uses: actions/checkout@v6
-
- # Everything below this step but the upload is skipped on a hit, and
- # state.txt names the jars it was built with, not the builder that ran:
- # so the key hashes every module the compile-unity goal executes --
- # the plugin, build-engine and project-model whole, not only their
- # Unity-named classes, since AbstractCN1Mojo and the poms decide what
- # CompileUnityMojo resolves and runs. The plugin's other dependencies
- # (css-cli, the transcoders, the hint catalogs) are not on that path.
- - name: Cache the Unity gallery prebuilt
- id: pack
- uses: actions/cache@v5
- with:
- path: artifacts/unity-gallery-prebuilt/unity-gallery-prebuilt.tgz
- key: unity-gallery-prebuilt-v1-${{ hashFiles('maven/pom.xml', 'maven/cil-translator/**', 'maven/unity-compat/**', 'maven/build-engine/**', 'maven/codenameone-maven-plugin/**', 'maven/project-model/**', 'CodenameOne/src/**', 'Ports/CLDC11/src/**', 'scripts/unity-compat-samples/gallery/**', 'scripts/hellocodenameone/pom.xml', 'scripts/hellocodenameone/common/pom.xml', 'scripts/unity-gallery-prebuilt.sh', '.github/workflows/unity-gallery-prebuilt.yml') }}
-
- # Installed FIRST so the JDK 8 below is the one JAVA_HOME names.
- - name: Set up JDK 17 for the application build
- if: steps.pack.outputs.cache-hit != 'true'
- uses: actions/setup-java@v5
- with:
- java-version: '17'
- distribution: 'temurin'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - if: steps.pack.outputs.cache-hit != 'true'
- run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
- - name: Set up JDK 8
- if: steps.pack.outputs.cache-hit != 'true'
- uses: actions/setup-java@v5
- with:
- java-version: '8'
- distribution: 'temurin'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set up .NET
- if: steps.pack.outputs.cache-hit != 'true'
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: '10.0.x'
- # xvfb as in the other Maven builds of the framework.
- - name: Install xvfb
- if: steps.pack.outputs.cache-hit != 'true'
- run: bash scripts/ci/apt-get-install.sh xvfb
-
- # The least of the framework that compiles the gallery: the Maven plugin
- # (the compile-unity goal) and what the application's common module
- # depends on, plus the two Unity modules. These steps only build, so a
- # blanket retry cannot turn a flaky test into a pass.
- - name: Build the plugin, the Unity modules and the application's dependencies
- if: steps.pack.outputs.cache-hit != 'true'
- run: |
- cd maven
- bash ../scripts/ci/retry.sh xvfb-run -a mvn -B install -Plocal-dev-javase -Dunity-compat -DskipTests -Darchetype.test.skip=true -Dmaven.javadoc.skip=true -pl codenameone-maven-plugin,cn1-ads-mock,compose-compat,rive-runtime,android-compat,cil-translator,unity-compat -am
-
- # generate-sources is as far as the application has to go: compile-unity
- # is bound to it, and nothing after it writes what the archive carries.
- - name: Compile the gallery
- if: steps.pack.outputs.cache-hit != 'true'
- run: |
- set -euo pipefail
- export JAVA_HOME="$JDK_17_HOME"
- export PATH="$JAVA_HOME/bin:$PATH"
- mkdir -p "$HOME/.codenameone"
- [ -f "$HOME/.codenameone/guibuilder.jar" ] || : > "$HOME/.codenameone/guibuilder.jar"
- bash scripts/ci/retry.sh xvfb-run -a mvn -B -f scripts/hellocodenameone/pom.xml -pl common -am generate-sources -DskipTests
- test -s scripts/hellocodenameone/common/target/unity/state.txt
-
- - name: Pack
- if: steps.pack.outputs.cache-hit != 'true'
- run: bash scripts/unity-gallery-prebuilt.sh pack "$PACK"
-
- # On a hit as well: an entry that was cut short is caught here, in the
- # job that can say so, and not in a dozen consumers.
- - name: Check the archive
- run: |
- set -euo pipefail
- ls -la "$PACK"
- version="$(sed -n 's:.*\(.*\).*:\1:p' scripts/hellocodenameone/pom.xml | head -n 1)"
- info="$(tar -xzOf - pack-info.txt <"$PACK")"
- echo "$info"
- echo "$info" | grep -qx "cn1.version=$version"
- # The listing goes to a variable first: grep -q stops reading at its
- # first match, and tar, still writing, then fails the pipeline with
- # "write error" under pipefail -- on some runs and not on others.
- entries="$(tar -tzf - <"$PACK")"
- grep -qx 'target/unity/state.txt' <<<"$entries"
- if [ "${{ steps.pack.outputs.cache-hit }}" = "true" ]; then
- echo "Unity gallery prebuilt: cache HIT; nothing was built."
- else
- echo "Unity gallery prebuilt: cache MISS; built fresh."
- fi
-
- - name: Upload the Unity gallery prebuilt
- uses: actions/upload-artifact@v7
- with:
- name: unity-gallery-prebuilt
- path: ${{ env.PACK }}
- retention-days: 1
- if-no-files-found: error
- # A re-run of a failed attempt uploads under the same name.
- overwrite: true
-
- - name: Upload the build logs
- if: failure()
- uses: actions/upload-artifact@v7
- with:
- name: unity-gallery-prebuilt-logs
- path: scripts/hellocodenameone/common/target/unity/*.log
- if-no-files-found: ignore
diff --git a/.github/workflows/wayline.yml b/.github/workflows/wayline.yml
deleted file mode 100644
index ca128657c44..00000000000
--- a/.github/workflows/wayline.yml
+++ /dev/null
@@ -1,607 +0,0 @@
-name: Wayline (full-stack sample)
-
-# scripts/wayline is one Maven project holding an application and its server:
-# a `shared` module of transfer objects and @RestClient contracts, the
-# Codename One client that calls them, and a Codename One Backend that
-# implements them. It is also what the initializr offers as a template.
-#
-# Six things are checked here, because each fails without the others noticing:
-#
-# backend the server's own tests, on the JVM and compiled by ParparVM
-# client-e2e the application in the simulator, driven through its real
-# screens against a running server
-# web the browser build of the application, hosted by the server
-# (cn1:backend-webapp) and driven in a headless browser: it
-# loads, signs in and reaches the home screen
-# template the Initializr's template is this project (template-sync), and
-# a project generated from it under another name builds: its
-# server's tests pass and its app compiles (a step of client-e2e,
-# which has the artifacts installed)
-# android the Android Gradle project builds
-# ios the Xcode project generates and builds for the simulator
-#
-# The project has the minimal layout, with no platform modules: common builds
-# the simulator, the desktop, Android, iOS and the browser, and
-# build-android-app.sh and build-ios-app.sh find the device projects there.
-#
-# The two device builds stop at a build: the screens are covered by the
-# simulator run, and neither port holds screenshot baselines for this sample.
-
-on:
- # Nightly at 00:11 UTC on master (nightly-watchdog.yml opens an issue when it
- # fails), and on a pull request only when this workflow's own tree changes.
- # Shared code (core, ports, builders, backend) reaches it through the nightly.
- pull_request:
- paths:
- - 'scripts/wayline/**'
- - 'scripts/ci/sample-server-tests-on-database.sh'
- - 'scripts/ci/start-test-database.sh'
- - 'scripts/ci/reset-*.sh'
- # The app kit is part of the sample: its classes are the sample's own.
- - 'maven/cn1-app-kit/**'
- - '.github/workflows/wayline.yml'
- workflow_dispatch:
- schedule:
- - cron: '11 0 * * *'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- # Required to pull the pr-ci-container image from ghcr.io.
- packages: read
-
-jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
- template-sync:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Initializr template matches the sample
- runs-on: ubuntu-24.04
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- # The template's resources are derived from scripts/wayline and committed.
- # A change to one without the other is a template that is not the project
- # this workflow tests.
- - name: Compare the template with scripts/wayline
- run: python3 scripts/sync-initializr-template.py wayline
-
- backend:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests (JVM and compiled)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install native build tools
- run: |
- bash scripts/ci/apt-get-update.sh
- # A server binary links libcurl, OpenSSL and nghttp2; clang alone
- # compiles the tests and then fails at the link.
- sudo apt-get install -y clang zlib1g-dev libcurl4-openssl-dev libssl-dev libnghttp2-dev
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- # The quality gates run in pr.yml; here they would only slow an install
- # whose purpose is to put this checkout's artifacts in the repository.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on the JVM and compiled
- working-directory: scripts/wayline
- run: |
- mvn -B -Dcodename1.platform=backend -pl shared,backend test \
- -Dcn1.backend.compiledTests=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- # A goal that skipped leaves the job green, so the reports are what prove
- # that both runners ran.
- - name: Check that both runners reported
- working-directory: scripts/wayline/backend/target/surefire-reports
- run: |
- jvm=$(find . -maxdepth 1 -name 'TEST-*.xml' ! -name '*-compiled.xml' | wc -l)
- compiled=$(find . -maxdepth 1 -name 'TEST-*-compiled.xml' | wc -l)
- echo "JVM reports: $jvm, compiled reports: $compiled"
- if [ "$jvm" -eq 0 ] || [ "$compiled" -eq 0 ]; then
- echo "::error::a runner produced no test reports"
- exit 1
- fi
-
- - name: Upload the test reports
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: wayline-backend-tests
- path: scripts/wayline/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- backend-database:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Server tests on ${{ matrix.database }}
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- # The backend job runs on in-memory SQLite, which accepts any declared
- # column type for any value and has no collations to get wrong. PostgreSQL
- # and MySQL are what a deployment runs on, and where the ORM's schema
- # validation refuses a mapping that disagrees with its migration.
- strategy:
- fail-fast: false
- matrix:
- database: [postgresql, mysql, sqlserver, oracle]
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: cn1
- POSTGRES_PASSWORD: secret
- POSTGRES_DB: cn1
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U cn1" --health-interval 5s
- --health-timeout 5s --health-retries 20
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The runner's own MySQL 8.0 rather than a service container: a service
- # cannot be given server options, and MySQL 8.4 (mysql:8) turns
- # mysql_native_password off. The backend does caching_sha2_password's
- # full exchange only over verified TLS, which a throwaway server has no
- # certificate for.
- - name: Start MySQL
- if: matrix.database == 'mysql'
- run: |
- sudo systemctl start mysql.service
- sudo mysql -uroot -proot -e "CREATE USER 'cn1'@'%' IDENTIFIED WITH mysql_native_password BY 'secret'; GRANT ALL ON *.* TO 'cn1'@'%'; CREATE DATABASE cn1;"
-
- # Started as steps, not services, so each leg pulls only its own image.
- # The script exports CN1_TEST_DATABASE_URL and CN1_TEST_DATABASE_RESET.
- - name: Start ${{ matrix.database }}
- if: matrix.database == 'sqlserver' || matrix.database == 'oracle'
- run: scripts/ci/start-test-database.sh ${{ matrix.database }}
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B -pl core,backend,backend-test,codenameone-maven-plugin,cn1-app-kit/backend \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- - name: Run the server tests on ${{ matrix.database }}
- run: |
- if [ -n "${CN1_TEST_DATABASE_URL:-}" ]; then
- :
- elif [ "${{ matrix.database }}" = mysql ]; then
- export CN1_TEST_DATABASE_URL="mysql://cn1:secret@127.0.0.1:3306/cn1?sslmode=disable"
- else
- export CN1_TEST_DATABASE_URL="postgres://cn1:secret@localhost:5432/cn1?sslmode=disable"
- fi
- scripts/ci/sample-server-tests-on-database.sh scripts/wayline \
- -Dmaven.repo.local="$GITHUB_WORKSPACE/.m2-repo"
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
-
- - name: Upload the test reports
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: wayline-backend-${{ matrix.database }}-tests
- path: scripts/wayline/backend/target/surefire-reports/**
- if-no-files-found: warn
- retention-days: 14
-
- client-e2e:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Application against a running server (simulator)
- runs-on: ubuntu-24.04
- container: ghcr.io/codenameone/codenameone/pr-ci-container:latest
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install Codename One artifacts (core / javase / css-compiler / plugin / backend)
- # Retried only for a failure that is the network's: a compilation
- # error has to fail on the first attempt.
- env:
- RETRY_ONLY_MATCHING: transient
- RETRY_ATTEMPTS: '5'
- RETRY_DELAY_SECONDS: '60'
- run: |
- export JAVA_HOME="${JAVA_HOME_8}"
- export PATH="${JAVA_HOME_8}/bin:$PATH"
- cd maven
- bash ../scripts/ci/retry.sh mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib -am install \
- -Plocal-dev-javase -DskipTests -Dmaven.javadoc.skip=true \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
-
- - name: Ensure a virtual display (xvfb) for the simulator
- run: |
- if ! command -v xvfb-run >/dev/null 2>&1; then
- (timeout 300 apt-get update && timeout 300 apt-get install -y xvfb) || true
- fi
-
- # Ahead of the simulator run: it is quick, and a template that does not
- # build should not wait behind the screens to say so.
- - name: Build a project generated from the Initializr template
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/wayline/check-template.sh "$RUNNER_TEMP/wayline-template"
-
- # The generator's matrix of templates, layouts and IDEs, and the screens
- # that offer them. No other workflow runs these tests.
- - name: Run the Initializr's tests
- working-directory: scripts/initializr
- run: |
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- xvfb-run -a mvn -B -Dcn1.localWorkspace=true -Dcodename1.platform=javase -Ptest verify
-
- - name: Run the application against the server
- run: |
- export JDK_8_HOME="${JAVA_HOME_8}"
- export JAVA_HOME="${JAVA_HOME_17}"
- export PATH="${JAVA_HOME_17}/bin:$PATH"
- scripts/wayline/run-e2e.sh
-
- - name: Upload the captures and the server log
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: wayline-e2e
- path: |
- scripts/wayline/target/e2e-shots/**
- scripts/wayline/target/e2e-server.log
- if-no-files-found: warn
- retention-days: 14
-
- web:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Web app hosted by the server (headless browser)
- runs-on: ubuntu-24.04
- timeout-minutes: 45
- steps:
- - uses: actions/checkout@v6
-
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '8'
- cache: 'maven'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 8 Path
- run: echo "JDK_8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Save JDK 17 Path
- run: echo "JDK_17_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
-
- - name: Set up Node 20
- uses: actions/setup-node@v6
- with:
- node-version: '20'
-
- - name: Cache Playwright browsers
- uses: actions/cache@v5
- with:
- path: ~/.cache/ms-playwright
- key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('scripts/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-playwright-chromium-
-
- - name: Install Playwright Chromium
- run: |
- cd scripts
- npm ci
- # Playwright shells out to apt for the OS-level packages, so the
- # runner image's third-party sources are pruned first.
- bash "$GITHUB_WORKSPACE/scripts/ci/apt-get-update.sh"
- npx playwright install-deps chromium
- npx playwright install chromium
-
- # The JavaScript build is the plugin's own: the port and the translator
- # travel inside it, so installing the plugin with what it is built from
- # is all the browser build needs.
- - name: Install the framework, the backend runtime and the plugin
- working-directory: maven
- run: |
- bash "$GITHUB_WORKSPACE/scripts/ci/retry.sh" mvn -B \
- -pl core,javase,css-compiler,codenameone-maven-plugin,backend,backend-test,cn1-app-kit/backend,cn1-app-kit/common,cn1-app-kit/lib \
- -am install -DskipTests -Plocal-dev-javase \
- -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true \
- -Dmaven.javadoc.skip=true
- env:
- JAVA_HOME: ${{ env.JDK_8_HOME }}
- RETRY_ONLY_MATCHING: transient
-
- # Builds the server and the browser build of the app, starts the server
- # with the app staged where it serves it from, and signs in through the
- # real screens.
- - name: Run the hosted web app in a headless browser
- run: scripts/wayline/run-web-e2e.sh
- env:
- JAVA_HOME: ${{ env.JDK_17_HOME }}
- JDK_8_HOME: ${{ env.JDK_8_HOME }}
-
- - name: Upload the screenshots and the logs
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v7
- with:
- name: wayline-web-e2e
- path: scripts/wayline/target/web-e2e/**
- if-no-files-found: warn
- retention-days: 14
-
- android:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- name: Android build
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- env:
- CN1_APP_DIR: scripts/wayline
- steps:
- - uses: actions/checkout@v6
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-wayline-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-wayline-
- ${{ runner.os }}-m2-
- - name: Cache Gradle
- uses: actions/cache@v5
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- ~/.codenameone/gradle8
- key: ${{ runner.os }}-gradle-g8-wayline-${{ hashFiles('Ports/Android/build.gradle*') }}
- restore-keys: |
- ${{ runner.os }}-gradle-wayline-
- ${{ runner.os }}-gradle-
- - name: Setup workspace
- run: ./scripts/setup-workspace.sh -q -DskipTests
- - name: Build Android port
- run: ./scripts/build-android-port.sh -q -DskipTests
- - name: Build the Android application
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- ./scripts/build-android-app.sh -q -DskipTests
-
- build-ios-port:
- needs: golden-plan
- # The nightly iOS build is samples-ios-nightly.yml's: one port build and
- # shared warm runners for every sample, instead of two macOS jobs per sample.
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- # The reusable workflow scripts-ios.yml depends on; sharing it shares its cache.
- uses: ./.github/workflows/_build-ios-port.yml
-
- ios:
- name: iOS build (simulator)
- if: ${{ needs.golden-plan.outputs.run == 'true' && (github.event_name != 'schedule') }}
- needs: [golden-plan, build-ios-port]
- runs-on: macos-15
- timeout-minutes: 50
- env:
- CN1_APP_DIR: scripts/wayline
- steps:
- - uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Cache CocoaPods and user gems
- uses: actions/cache@v5
- with:
- path: |
- ~/.gem
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos
- key: ${{ runner.os }}-pods-v1-${{ hashFiles('scripts/setup-workspace.sh') }}
- restore-keys: |
- ${{ runner.os }}-pods-v1-
-
- - name: Ensure CocoaPods tooling
- run: |
- mkdir -p ~/.codenameone
- cp maven/UpdateCodenameOne.jar ~/.codenameone/
- set -euo pipefail
- GEM_USER_DIR="$(ruby -e 'print Gem.user_dir')"
- export PATH="$GEM_USER_DIR/bin:$PATH"
- if ! command -v pod >/dev/null 2>&1; then
- gem install cocoapods xcodeproj --no-document --user-install
- fi
- pod --version
-
- - name: Compute setup-workspace hash
- id: setup_hash
- run: echo "hash=$(shasum -a 256 scripts/setup-workspace.sh | awk '{print $1}')" >> "$GITHUB_OUTPUT"
-
- - name: Set TMPDIR
- run: echo "TMPDIR=${{ runner.temp }}" >> "$GITHUB_ENV"
-
- - name: Cache codenameone-tools
- uses: actions/cache@v5
- with:
- path: ${{ runner.temp }}/codenameone-tools
- key: ${{ runner.os }}-cn1-tools-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- ${{ runner.os }}-cn1-tools-
-
- - name: Cache Maven repository
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-m2-
-
- - name: Restore cn1-binaries cache
- uses: actions/cache@v5
- with:
- path: ../cn1-binaries
- key: cn1-binaries-${{ runner.os }}-${{ steps.setup_hash.outputs.hash }}
- restore-keys: |
- cn1-binaries-${{ runner.os }}-
-
- - name: Download built CN1 + iOS port bundle
- uses: actions/download-artifact@v4
- with:
- name: cn1-built-bundle
- path: ${{ runner.temp }}
- - name: Restore built CN1 + iOS port tree
- run: |
- set -euo pipefail
- tar -C / -xf "$RUNNER_TEMP/cn1-built-bundle.tar"
-
- - name: Install XcodeGen
- run: brew install xcodegen
-
- - name: Generate the Xcode project
- id: build-ios-app
- run: ./scripts/build-ios-app.sh -q -DskipTests
- timeout-minutes: 25
-
- - name: Build the application for the simulator
- run: |
- set -euo pipefail
- WORKSPACE='${{ steps.build-ios-app.outputs.workspace }}'
- SCHEME='${{ steps.build-ios-app.outputs.scheme }}'
- DERIVED_DATA="${{ runner.temp }}/wayline-dd"
- rm -rf "$DERIVED_DATA"
- # One architecture, the host's: the port's SIMD natives are NEON
- # under __aarch64__, and a universal simulator build compiles an
- # x86_64 slice that has no use here.
- HOST_ARCH="$(uname -m)"
- case "$HOST_ARCH" in
- arm64|x86_64) BUILD_ARCH="$HOST_ARCH" ;;
- *) BUILD_ARCH=arm64 ;;
- esac
- XCB_CONTAINER_FLAG="-workspace"
- if [[ "$WORKSPACE" != *.xcworkspace ]]; then
- XCB_CONTAINER_FLAG="-project"
- fi
- xcodebuild "$XCB_CONTAINER_FLAG" "$WORKSPACE" -scheme "$SCHEME" \
- -sdk iphonesimulator \
- -configuration Debug \
- -destination 'generic/platform=iOS Simulator' \
- -derivedDataPath "$DERIVED_DATA" \
- ARCHS="$BUILD_ARCH" ONLY_ACTIVE_ARCH=YES \
- EXCLUDED_ARCHS="armv7 armv7s" \
- CODE_SIGNING_ALLOWED=NO build
- APP_BUNDLE="$(find "$DERIVED_DATA/Build/Products" -maxdepth 3 -type d -name "${SCHEME}.app" | head -n 1)"
- if [ -z "$APP_BUNDLE" ]; then
- echo "::error::no .app bundle under $DERIVED_DATA"
- exit 1
- fi
- timeout-minutes: 20
diff --git a/.github/workflows/website-docs.yml b/.github/workflows/website-docs.yml
index 2a409146803..4ab7611de50 100644
--- a/.github/workflows/website-docs.yml
+++ b/.github/workflows/website-docs.yml
@@ -1,113 +1,6 @@
name: Build Hugo Website
on:
- pull_request:
- paths:
- - 'docs/website/**'
- - 'docs/developer-guide/**'
- - 'scripts/cn1playground/**'
- - 'scripts/initializr/**'
- # The /agents/ kit: create-app scripts and the bootstrap skill (build_agent_kit.py).
- - 'scripts/agent-kit/**'
- - 'scripts/website/**'
- - 'scripts/skindesigner/**'
- # The Initializr/playground/skindesigner JS bundles are built from
- # JavaScriptPort sources and the ParparVM translator at workflow
- # time, so a change in either also needs to redeploy the website.
- # Without these paths a JS-port bug fix (e.g. dialog rendering
- # in be3bc6dcd) sits in the branch with no Cloudflare preview
- # refresh until an unrelated docs change happens to trigger
- # the workflow.
- - 'Ports/JavaScriptPort/**'
- - 'vm/ByteCodeTranslator/**'
- - 'vm/JavaAPI/**'
- - 'CodenameOne/src/**'
- # The other root build_javadocs.sh generates from, and the other one
- # check-guide-links.py indexes. Without it, deleting a linked CLDC type
- # merges unvalidated and the next scheduled build is where it surfaces.
- - 'Ports/CLDC11/src/**'
- # The developer guide this site renders includes a build hint table that is
- # generated rather than committed, so a change to the catalog or to the
- # renderer changes the published page without touching docs/. The
- # annotations it is also rendered from are covered by CodenameOne/src/**
- # above. Same gap codex reported on developer-guide-docs.yml; this is the
- # other workflow that renders the table.
- - 'maven/build-hint-catalog/**'
- - 'maven/build-hint-tools/**'
- - 'scripts/gen-build-hint-table.sh'
- # The Hugo build embeds JavaDocs produced by this script, so a change
- # to how the docs are generated must redeploy the website too.
- - '.github/scripts/build_javadocs.sh'
- # The doclet that renders the API pages themselves. It is outside the
- # maven reactor and built only by this workflow, so nothing else would
- # catch a change to it.
- - 'maven/javadoc-hugo-doclet/**'
- # The backend API reference is generated from the server runtime, so a
- # change there changes published pages just as CodenameOne/src does.
- - 'vm/backend/src/**'
- - 'vm/backend/impl/**'
- - 'vm/backend/shared-sources.sh'
- - 'vm/backend/package-docs/**'
- # build.sh renders the Port Status JDK 25 table with this script's `summary`, so a
- # change to its output shape must go through the Hugo build and validate_port_status.
- # The baseline DATA (vm/selfhost/perf-baseline/**) is left out on purpose: a row
- # changes numbers, not shape, and the nightly fold dispatches a rebuild for it.
- - 'vm/selfhost/perf_baseline.py'
- - '.github/workflows/website-docs.yml'
- push:
- branches: [main, master]
- paths:
- - 'docs/website/**'
- - 'docs/developer-guide/**'
- - 'scripts/cn1playground/**'
- - 'scripts/initializr/**'
- # The /agents/ kit: create-app scripts and the bootstrap skill (build_agent_kit.py).
- - 'scripts/agent-kit/**'
- # The developer guide's Wayline chapters include the sample's sources by
- # tag, so a merged change there changes the published guide. Not on pull
- # requests: developer-guide-docs.yml already renders the guide for those.
- - 'scripts/wayline/**'
- - 'scripts/savor/**'
- - 'scripts/bazaar/**'
- - 'scripts/bastion/**'
- - 'scripts/pulse/**'
- - 'scripts/slate/**'
- - 'scripts/fieldline/**'
- - 'scripts/splat/**'
- - 'scripts/skirmish/**'
- - 'scripts/papercut/**'
- - 'scripts/dash/**'
- - 'scripts/parley/**'
- - 'scripts/hellocodenameone/common/src/main/kmp/**'
- - 'scripts/website/**'
- - 'scripts/skindesigner/**'
- - 'Ports/JavaScriptPort/**'
- - 'vm/ByteCodeTranslator/**'
- - 'vm/JavaAPI/**'
- - 'CodenameOne/src/**'
- # The other root build_javadocs.sh generates from, and the other one
- # check-guide-links.py indexes. Without it, deleting a linked CLDC type
- # merges unvalidated and the next scheduled build is where it surfaces.
- - 'Ports/CLDC11/src/**'
- # As above: the build hint table is generated, not committed.
- - 'maven/build-hint-catalog/**'
- - 'maven/build-hint-tools/**'
- - 'scripts/gen-build-hint-table.sh'
- # The Hugo build embeds JavaDocs produced by this script, so a change
- # to how the docs are generated must redeploy the website too.
- - '.github/scripts/build_javadocs.sh'
- # The doclet that renders the API pages themselves. It is outside the
- # maven reactor and built only by this workflow, so nothing else would
- # catch a change to it.
- - 'maven/javadoc-hugo-doclet/**'
- # As above: the backend API reference is generated from these.
- - 'vm/backend/src/**'
- - 'vm/backend/impl/**'
- - 'vm/backend/shared-sources.sh'
- - 'vm/backend/package-docs/**'
- # As above: the JDK 25 table's renderer.
- - 'vm/selfhost/perf_baseline.py'
- - '.github/workflows/website-docs.yml'
workflow_dispatch:
inputs:
deploy_production:
@@ -123,6 +16,10 @@ on:
schedule:
- cron: '15 0 * * *'
+ # Pull requests and master pushes reach this workflow through ci.yml,
+ # after its precheck; the paths that used to trigger it are in
+ # .github/ci/ci-members.json.
+ workflow_call:
permissions:
contents: read
pull-requests: write
@@ -130,21 +27,11 @@ permissions:
concurrency:
# Only the latest revision needs validation. PR numbers keep forks isolated;
# event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
+ group: website-docs-${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
- # The gate every PR workflow waits on: a PR missing a golden is known to
- # fail as a whole, so nothing here runs until Golden capture
- # (golden-capture.yml) has committed them.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- permissions:
- contents: read
-
build:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
runs-on: ubuntu-24.04
# A ceiling, because there was not one: this job hung in apt and ran for six
# hours before GitHub's own limit stopped it.
diff --git a/.github/workflows/windows-cross-build-run.yml b/.github/workflows/windows-cross-build-run.yml
deleted file mode 100644
index cdecf6b759a..00000000000
--- a/.github/workflows/windows-cross-build-run.yml
+++ /dev/null
@@ -1,596 +0,0 @@
-# Real-life Windows build pipeline: CROSS-COMPILE the native Windows port's full
-# hellocodenameone screenshot-suite .exe on a *Linux* runner (clang-cl + lld-link
-# + llvm-rc against an xwin-laid-out Windows SDK, with the WebView2 SDK fetched so
-# the BrowserComponent peer is linked), then RUN that exact Linux-built binary on
-# a real Windows runner and capture the screenshot suite over the cn1ss WebSocket.
-#
-# This mirrors how a Codename One app is actually shipped for Windows -- compiled
-# on a (Linux) build host, executed on the user's Windows machine -- which neither
-# of the other two Windows workflows does on its own: windows-cross-compile.yml
-# builds on Linux but only *links* (never runs), and parparvm-tests-windows.yml
-# builds *natively on Windows* and runs. Here the binary that renders on Windows
-# is the one cross-compiled on Linux, browser included.
-#
-# Three jobs, artifact-chained within the run:
-# cross-build (ubuntu) -> uploads WinHelloMain.exe (Linux-cross-compiled, x64)
-# run-on-windows (x64) -> downloads + runs it, captures the suite PNGs
-# compare-comment (ubuntu)-> diffs the PNGs vs the in-repo baseline, posts the PR
-name: Windows cross-build + run (Linux build -> Windows run)
-
-on:
- # Manual dispatch: this PR's changed-file count exceeds GitHub's paths-filter
- # diff limit, so pull_request triggers stopped firing -- dispatch with
- # gh workflow run --ref
- workflow_dispatch:
- inputs:
- cn1ss_capture:
- description: Golden capture only (golden-capture.yml) - the tests without goldens, for the log
- required: false
- default: ''
- type: string
- schedule:
- - cron: '55 1 * * *'
- 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/compose-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/windows-cross-build-run.yml'
- - 'vm/**'
- - 'Ports/WindowsPort/**'
- - 'maven/windows/**'
- - 'scripts/windows/**'
- - 'scripts/hellocodenameone/**'
- # The Rive screenshot tests draw classes this translator generates.
- - 'maven/rive-transcoder/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- # This job's first step runs through both CI shell helpers, so a change to either has
- # to be exercised here rather than merged untested -- the same reason every other
- # consumer lists them.
- - 'scripts/ci/apt-get-install.sh'
- - 'scripts/ci/apt-get-update.sh'
- - 'scripts/ci/retry.sh'
- - '!vm/**/README.md'
- - '!vm/**/readme.md'
- - '!vm/**/docs/**'
- push:
- branches: [ master, main ]
- 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/compose-compat/**'
- - 'maven/rive-runtime/**'
- - 'maven/rive-schema-gen/**'
- - '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/windows-cross-build-run.yml'
- - 'vm/**'
- - 'Ports/WindowsPort/**'
- - 'maven/windows/**'
- - 'scripts/ci/apt-get-install.sh'
- - 'scripts/ci/apt-get-update.sh'
- - 'scripts/ci/retry.sh'
-
-concurrency:
- # Only the latest revision needs validation. PR numbers keep forks isolated;
- # event names keep a manual/scheduled run from cancelling a push or PR run.
- group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: true
-
-env:
- # A method the translator culled as unreachable is still emitted as a stub,
- # because dispatch tables name it. With this on, the stub aborts with the
- # method's name instead of returning 0, so a wrong cull fails the suite that
- # reached it rather than shipping a silent null. Ours to enforce, like
- # CN1_NATIVE_VERIFY: customer builds keep the plain stub. See
- # BytecodeMethod.appendMethodC. Not in the size or perf benchmarks, whose
- # binaries should be the ones customers get.
- CN1_CULL_TRAP: '1'
-
-jobs:
- # First, so a PR whose new screenshot tests have no goldens yet runs nothing
- # here; Golden capture (golden-capture.yml) records them instead.
- golden-plan:
- uses: ./.github/workflows/golden-plan.yml
- with:
- capture: ${{ inputs.cn1ss_capture || '' }}
-
- # 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:
- needs: golden-plan
- if: needs.golden-plan.outputs.run == 'true'
- uses: ./.github/workflows/unity-gallery-prebuilt.yml
-
- cross-build:
- if: needs.golden-plan.outputs.run == 'true'
- needs: [golden-plan, unity-gallery]
- name: cross-build suite exe (Linux, x64 + WebView2)
- runs-on: ubuntu-24.04
- timeout-minutes: 60
- steps:
- - name: Check out repository
- uses: actions/checkout@v6
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- # The native BrowserComponent peer (cn1_windows_browser.cpp) is C++ that
- # uses the MSVC STL via the xwin headers; the MSVC STL gates on a recent
- # clang (older clang-cl trips STL1000 "Unexpected compiler version"), so
- # pin LLVM 19 for the cross-build rather than the distro default.
- - name: Install LLVM 19 + CMake/Ninja
- # Capped well inside the job's 60 minutes. The inner bounds give a stalled mirror a
- # second chance; this one guarantees that however they compound, the step cannot eat
- # the budget the build itself needs -- which is what happened twice on 2026-08-19,
- # each time surfacing as "Artifact not found" in a different job.
- timeout-minutes: 20
- run: |
- set -e
- # No explicit index refresh here: apt-get-install.sh does one itself, and doing it
- # twice doubles the time a stalling mirror can take before anything is installed.
- # No xvfb: nothing in this job opens a window. The sample build's css
- # goal compiles theme.css headless, and the PE this job produces is
- # run by the Windows jobs downstream, not here.
- # Every network call here is bounded and retried. On 2026-08-19 this step sat in
- # its first line for a full hour and was cancelled having installed nothing, which
- # then failed the screenshot-comment job downstream for a missing artifact. That is
- # the same hang apt-get-install.sh was written for -- a hung mirror should cost one
- # attempt, not the job -- and this workflow had never adopted it.
- bash scripts/ci/apt-get-install.sh cmake ninja-build unzip
- # apt.llvm.org is a single host with no mirror, and llvm.sh both adds its repo and
- # installs from it, so it is the likeliest thing in this step to stall forever.
- RETRY_ATTEMPTS=3 bash scripts/ci/retry.sh \
- wget -q --timeout=30 --tries=3 -O llvm.sh https://apt.llvm.org/llvm.sh
- chmod +x llvm.sh
- # Two attempts of ten minutes, not three of fifteen: the point of a bound is to
- # leave the job enough budget to do its actual work afterwards, and 3x900s is
- # three quarters of the runner's hour.
- RETRY_ATTEMPTS=2 bash scripts/ci/retry.sh timeout 600 sudo ./llvm.sh 19
- bash scripts/ci/apt-get-install.sh clang-19 lld-19 llvm-19
- echo "/usr/lib/llvm-19/bin" >> "$GITHUB_PATH"
- /usr/lib/llvm-19/bin/clang-cl --version
- /usr/lib/llvm-19/bin/lld-link --version 2>&1 | head -1 || true
- /usr/lib/llvm-19/bin/llvm-rc --version 2>&1 | head -1 || true
-
- # JDK matrix the translator harness auto-discovers (JDK_*_HOME). JDK 8 is
- # restored last so it is the active JAVA_HOME (it builds codename1-core and
- # is what CompilerHelper translates with). JDK 17 builds the sample app.
- - name: Set up JDK 8
- uses: actions/setup-java@v5
- with: { distribution: 'temurin', java-version: '8' }
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - run: echo "JDK_8_HOME=$JAVA_HOME" >> $GITHUB_ENV
- - name: Set up JDK 11
- uses: actions/setup-java@v5
- with: { distribution: 'temurin', java-version: '11' }
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - run: echo "JDK_11_HOME=$JAVA_HOME" >> $GITHUB_ENV
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with: { distribution: 'temurin', java-version: '17' }
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
- - run: echo "JDK_17_HOME=$JAVA_HOME" >> $GITHUB_ENV
- - name: Restore JDK 8 as the active JDK
- uses: actions/setup-java@v5
- with: { distribution: 'temurin', java-version: '8' }
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Install xwin + lay out the Windows SDK (x64)
- env:
- # `cargo install xwin` and `xwin splat` flake on transient crates.io /
- # download errors ("curl [16] HTTP2 framing layer", "[55] OpenSSL
- # SSL_read unexpected eof"). Disable HTTP/2 multiplexing (forces
- # HTTP/1.1, which avoids the framing errors) and let cargo retry.
- CARGO_NET_RETRY: "10"
- CARGO_HTTP_MULTIPLEXING: "false"
- # --manifest-version 16 (SDK 10.0.22621): the current VS 17 manifest
- # lists Win11SDK_10.0.26100 without the per-arch header packages xwin
- # 0.9.0 looks for, so the default splat fails with "unable to find
- # x86_64 headers". Every target here builds against 22621.
- run: |
- set -e
- # Retry the whole install/splat a few times for non-cargo download
- # hiccups (the xwin SDK fetch from Microsoft).
- n=0
- until [ "$n" -ge 3 ]; do
- cargo install xwin --version 0.9.0 --locked \
- && xwin --accept-license --manifest-version 16 --arch x86_64 splat --output "$RUNNER_TEMP/xwin-sdk" \
- && break
- n=$((n+1))
- echo "xwin install/splat attempt $n failed; retrying after backoff..."
- rm -rf "$RUNNER_TEMP/xwin-sdk"
- sleep $((n*15))
- done
- test -d "$RUNNER_TEMP/xwin-sdk/crt/include"
- test -f "$RUNNER_TEMP/xwin-sdk/sdk/include/um/d2d1.h"
-
- # Fetch the WebView2 NuGet SDK on Linux (portable bash counterpart of the
- # Windows fetch script). It is a plain zip of headers + the x64/arm64 static
- # loader libs, so the cross-build links the BrowserComponent peer exactly
- # like the Windows runners do. Non-fatal: if the download fails the browser
- # natives compile as stubs (WEBVIEW2_SDK_DIR stays unset) and the suite runs
- # without the BrowserComponent tile rather than failing the whole pipeline.
- - name: Fetch WebView2 SDK (Linux)
- continue-on-error: true
- run: |
- set -e
- LINE="$(bash scripts/windows/fetch-webview2-sdk.sh "$RUNNER_TEMP/webview2sdk" | tail -1)"
- echo "Resolved: $LINE"
- case "$LINE" in
- WEBVIEW2_SDK_DIR=*) echo "$LINE" >> "$GITHUB_ENV" ;;
- *) echo "WebView2 fetch did not yield a dir; browser will be stubbed" ;;
- esac
-
- # Build codename1-core + the Windows port, the codenameone maven plugin
- # (runs transcode-svg / css / annotation processing during the sample build)
- # and cn1-ads-mock (a sample dependency) -- the same inputs the native
- # Windows screenshot job installs. JDK 8: core is source/target 1.5.
- - name: Build core + Windows port + CN1 maven plugin (JDK 8)
- env:
- # A build-only step: it compiles and then asserts two class files
- # exist, so there is no test for a blanket retry to launder. Narrowed
- # to resolution failures anyway, on the same principle the steps below
- # apply -- this died on `Connection reset` pulling maven-plugin-api
- # from Central, which is the canonical set's business and not this
- # branch's.
- RETRY_ONLY_MATCHING: transient
- run: |
- cd maven
- JAVA_HOME="$JDK_8_HOME" bash ../scripts/ci/retry.sh \
- mvn -B -pl windows,codenameone-maven-plugin,cn1-ads-mock,compose-compat,rive-runtime -am \
- -DskipTests '-Dmaven.javadoc.skip=true' '-Plocal-dev-javase' install
- test -f core/target/classes/com/codename1/ui/Form.class
- test -f windows/target/classes/com/codename1/impl/windows/WindowsImplementation.class
-
- # 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
-
- # Build the hellocodenameone screenshot app into common/target/classes (the
- # suite the cross-build translates). Plain Maven build of the sample on JDK
- # 17 -- exactly what a fresh initializr project does; the plugin runs
- # transcode-svg/css/annotation processing. Kotlin 1.6.0 compiles on JDK 17.
- # Seed an empty guibuilder.jar marker to skip the codenameone install
- # bootstrap's network step (artifacts are already in the local repo).
- - name: Build hellocodenameone-common (Maven, JDK 17)
- env:
- JDK_17_HOME: ${{ env.JDK_17_HOME }}
- run: |
- set -e
- export JAVA_HOME="$JDK_17_HOME"
- mkdir -p "$HOME/.codenameone"
- [ -f "$HOME/.codenameone/guibuilder.jar" ] || : > "$HOME/.codenameone/guibuilder.jar"
- RETRY_ONLY_MATCHING=transient bash scripts/ci/retry.sh \
- mvn -B -f scripts/hellocodenameone/pom.xml -pl common -am install \
- -DskipTests '-Dmaven.javadoc.skip=true'
- test -f scripts/hellocodenameone/common/target/classes/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.class
- test -f scripts/hellocodenameone/common/target/classes/com/codename1/generated/svg/SVGRegistry.class
-
- # Translate the full suite and cross-compile it to a Windows x64 PE with
- # clang-cl + xwin. WEBVIEW2_SDK_DIR (exported above when the fetch worked)
- # flows into the generated CMake and links the BrowserComponent peer. The
- # exe is written to CN1_CROSS_EXE_OUT for the upload below.
- - name: Cross-build the full suite exe (clang-cl + xwin + WebView2)
- env:
- CN1_XWIN_SYSROOT: ${{ runner.temp }}/xwin-sdk
- CN1_CLANG_CL: clang-cl
- CN1_LLVM_RC: llvm-rc
- CN1_CROSS_EXE_OUT: ${{ github.workspace }}/artifacts/WinHelloMain.exe
- # Narrowed to resolution failures, because this step RUNS A TEST. The wrapper
- # retries every nonzero exit unless it is told what to look for, so a cross-build or
- # translation failure that came and went would have passed on attempt two and taken
- # the gate green with it -- laundering exactly the kind of intermittent product bug
- # this job exists to catch. The unit test workflow narrows it for the same reason.
- RETRY_ONLY_MATCHING: transient
- run: |
- cd vm
- # Through the retry wrapper: this resolves plugins from Maven Central and the runner
- # edge intermittently resets the connection mid-download, which Maven treats as a
- # permanent resolution failure -- this run died on a truncated plexus-utils with nothing
- # compiled yet. A real failure fails the same way on every attempt.
- JAVA_HOME="$JDK_8_HOME" bash ../scripts/ci/retry.sh mvn -B -pl tests -am test \
- '-Dtest=CleanTargetIntegrationTest#crossBuildsHelloSuiteExe' \
- '-Dsurefire.failIfNoSpecifiedTests=false'
- test -f "$CN1_CROSS_EXE_OUT"
- ls -l "$CN1_CROSS_EXE_OUT"
-
- # The CI test server (scripts/hellocodenameone/backend) the suite streams its
- # screenshots to and drives its networking tests against, as a runnable copy
- # the Windows job runs with plain java: that job has a JDK and no Maven
- # repository with the backend in it. Built here, where the plugin and the
- # backend runtime are a Maven install away.
- - name: Build the test server
- env:
- JAVA17_HOME: ${{ env.JDK_17_HOME }}
- RETRY_ONLY_MATCHING: transient
- run: |
- bash scripts/ci/retry.sh scripts/hellocodenameone/backend/server.sh dist "$GITHUB_WORKSPACE/artifacts/cn1ss-server"
- test -f "$GITHUB_WORKSPACE/artifacts/cn1ss-server/classes/META-INF/cn1-backend-main"
-
- - name: Upload cross-built suite exe
- uses: actions/upload-artifact@v4
- with:
- name: windows-cross-suite-exe
- # The .exe plus its separate .pdb symbol companion (for crash symbolication).
- path: |
- artifacts/WinHelloMain.exe
- artifacts/WinHelloMain.pdb
- artifacts/cn1ss-server/**
- if-no-files-found: error
- retention-days: 1
-
- run-on-windows:
- if: needs.golden-plan.outputs.run == 'true'
- name: run cross-built exe + capture (Windows x64)
- needs: [golden-plan, cross-build]
- runs-on: windows-latest
- timeout-minutes: 60
- steps:
- - name: Check out repository
- uses: actions/checkout@v4
-
- # Only a JDK is needed here: with CN1_PREBUILT_EXE set the capture test
- # neither translates nor builds -- it runs the test server the cross-build
- # job built (CN1SS_SERVER_DIST), launches the prebuilt exe and collects the
- # PNGs it streams. No MSVC /
- # Ninja / clang. windows-latest ships the WebView2 Evergreen runtime the
- # BrowserComponent peer loads at activation.
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
- cache: 'maven'
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Download cross-built suite exe
- uses: actions/download-artifact@v4
- with:
- name: windows-cross-suite-exe
- path: artifacts
-
- - name: Verify the downloaded exe
- shell: pwsh
- run: |
- $exe = "artifacts/WinHelloMain.exe"
- if (!(Test-Path $exe)) { Write-Error "cross-built exe missing: $exe"; exit 1 }
- Write-Host "Cross-built exe: $((Get-Item $exe).Length) bytes"
-
- # Run the Linux-cross-compiled exe and capture the screenshot suite over the
- # cn1ss WebSocket. CN1_PREBUILT_EXE makes the capture test run this exact
- # binary instead of building one. ~112 PNGs land in CN1_SHOT_OUTPUT_DIR.
- - name: Run cross-built suite + capture screenshots
- working-directory: vm
- shell: pwsh
- env:
- CN1_PREBUILT_EXE: ${{ github.workspace }}\artifacts\WinHelloMain.exe
- CN1SS_SERVER_DIST: ${{ github.workspace }}\artifacts\cn1ss-server
- CN1_PERFORMANCE_BINARY_OUT: ${{ github.workspace }}\artifacts\windows-port\raw\benchmark-app.exe
- CN1_REQUIRE_PERFORMANCE: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
- CN1_SHOT_OUTPUT_DIR: ${{ github.workspace }}\artifacts\windows-port\raw
- run: |
- mvn -B clean package -pl JavaAPI -am -DskipTests
- mvn -B test -pl tests -am '-Dtest=CleanTargetIntegrationTest#capturesHelloSuiteOverWebSocket' '-Dsurefire.failIfNoSpecifiedTests=false'
-
- - name: Upload screenshot artifact (cross-compiled, x64)
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v4
- with:
- name: windows-cross-screenshot-raw
- path: artifacts/windows-port/raw
- if-no-files-found: warn
- retention-days: 14
-
- # Diffs the screenshots produced by the Linux-cross-compiled binary against the
- # in-repo baseline (scripts/windows/screenshots) and posts them to the PR, with
- # a marker distinct from the native-Windows screenshot comment so both coexist.
- compare-comment:
- name: cross-compiled screenshot-comment
- needs: [golden-plan, run-on-windows]
- # !cancelled(), for the same reason as linux-build-run.yml: without it GitHub
- # skips this job whenever run-on-windows fails, so the run that most needs
- # reporting uploads raw evidence but no port-status artifact. The nightly
- # sweep then falls back to an older run, and while that one is still inside
- # the freshness window the public table keeps showing it -- the current
- # Windows failure masked by a stale pass. The workflow still goes red because
- # run-on-windows itself failed.
- if: >-
- needs.golden-plan.outputs.run == 'true' && (
- !cancelled() &&
- (github.event_name == 'pull_request' || github.event_name == 'push' ||
- github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
- )
- runs-on: ubuntu-24.04
- permissions:
- # write, because this job publishes the normalized report to the
- # port-status-data branch itself (see the publish step below).
- contents: write
- # write, to dispatch website-docs.yml -- the Port Status page is static,
- # so a published report is invisible until Hugo rebuilds.
- actions: write
- pull-requests: write
- issues: write
- env:
- GITHUB_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- GH_TOKEN: ${{ secrets.CN1SS_GH_TOKEN }}
- steps:
- - name: Check out repository
- uses: actions/checkout@v4
-
- - name: Set up JDK 17
- uses: actions/setup-java@v5
- with:
- distribution: 'temurin'
- java-version: '17'
-
- - name: Use Google's copy of Maven Central first
- uses: ./.github/actions/maven-central-mirror
-
- - name: Download cross-compiled screenshot artifact
- uses: actions/download-artifact@v4
- with:
- name: windows-cross-screenshot-raw
- path: artifacts/windows-port/raw-x64
-
- - name: Enter golden capture mode
- uses: ./.github/actions/cn1ss-capture
- with:
- tests: ${{ inputs.cn1ss_capture }}
- mode: ${{ inputs.cn1ss_capture != '' && 'capture' || 'harvest' }}
-
- - name: Post screenshots to PR
- shell: bash
- env:
- CN1SS_COMMENT_MARKER: ''
- CN1SS_COMMENT_LOG_PREFIX: '[windows-cross-compiled]'
- CN1SS_PREVIEW_SUBDIR: 'windows-cross'
- CN1SS_SUCCESS_MESSAGE: 'Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.'
- run: |
- set -e
- ART="artifacts/windows-port"
- entries=()
- if [ -d "$ART/raw-x64" ]; then
- for f in "$ART"/raw-x64/*.png; do
- [ -f "$f" ] || continue
- name=$(basename "$f" .png)
- entries+=("$name=$f")
- done
- fi
- if [ ${#entries[@]} -eq 0 ]; then
- # A run that died before its first PNG still persists app-output.log,
- # and that log is what normalization reads to produce the fail /
- # not-run counts. Bailing out here left the failed capture with no
- # port-status artifact at all, so the nightly sweep fell back to an
- # older report and the table kept showing it. Carry on with an empty
- # entry list when there is a log; only a run with neither has nothing
- # to say. (Same handling as linux-build-run.yml.)
- if [ ! -f "$ART/raw-x64/app-output.log" ]; then
- echo "No screenshots and no app log; nothing to normalize."
- exit 0
- fi
- echo "No screenshots were produced; normalizing from the app log so the failure reaches the table."
- fi
- echo "Posting ${#entries[@]} screenshot(s)"
- mkdir -p "$ART/previews"
- # Lift the SIMD benchmark tally (captured next to the PNGs) to the dir
- # cn1ss scans for --extra-stats, so it renders in the comment.
- cp -f "$ART"/raw-x64/windows-benchmark-stats.txt "$ART/" 2>/dev/null || true
- source scripts/lib/cn1ss.sh
- cn1ss_setup "$JAVA_HOME/bin/java" "$(pwd)/scripts/common/java"
- # Gate for real: differing or missing screenshots FAIL the job (the
- # comparison previously only posted diffs to the PR and exited green,
- # which let 100+ render changes land unreviewed).
- export CN1SS_FAIL_ON_MISMATCH=1
- REF_DIR="$(pwd)/scripts/windows/screenshots"
- # Gate like the Linux port: fail on any mismatch/error or a new
- # screenshot with no committed golden. Previously this job only
- # posted the comparison as a PR comment, so stale goldens sailed
- # through green CI.
- export CN1SS_FAIL_ON_MISMATCH=1
- export CN1SS_ALLOWED_MISSING=0
- export CN1SS_PORT_ID=windows-x64
- export CN1SS_SUITE_LOG="$ART/raw-x64/app-output.log"
- export CN1SS_BINARY_PATH="$ART/raw-x64/benchmark-app.exe"
- if [ "${{ github.event_name }}" != "pull_request" ]; then export CN1SS_SKIP_COMMENT=1; fi
- # Assertion-only failures count here as they do on every other producer.
- # A test like CryptoApiTest can fail while the suite still emits its
- # completion marker and every screenshot matches, and without this the
- # step exited zero: the workflow stayed green and published a report
- # containing failed tests. Linux, Android, JavaScript, iOS and Mac all
- # set this; Windows was the one producer that did not.
- export CN1SS_FAIL_ON_TEST_PROBLEMS=1
- set +e
- cn1ss_process_and_report \
- "Native Windows port (cross-compiled)" \
- "$ART/compare.json" "$ART/summary.txt" "$ART/comment.md" \
- "$REF_DIR" "$ART/previews" "$ART" \
- ${entries[@]+"${entries[@]}"}
- gate_rc=$?
- set -e
- fail=0
- if [ "$gate_rc" -ne 0 ]; then
- echo "[windows-cross] FATAL: screenshot gate failed (rc=$gate_rc)"; fail=1
- fi
- if [ -f "$ART/summary.txt" ] && grep -q "^missing_expected|" "$ART/summary.txt"; then
- me="$(grep -c "^missing_expected|" "$ART/summary.txt" || echo 0)"
- echo "[windows-cross] FATAL: $me screenshot(s) streamed with no stored golden (missing_expected) -- add them to $REF_DIR."; fail=1
- fi
- if [ "$fail" -ne 0 ]; then echo "Windows cross screenshot gate failed."; exit 1; fi
-
- - name: Upload Windows port status
- if: ${{ !cancelled() }}
- uses: actions/upload-artifact@v4
- with:
- name: port-status-windows-x64
- path: artifacts/windows-port/port-status-windows-x64.json
- if-no-files-found: warn
- retention-days: 14
-
- # Publish from here rather than waiting for port-status-publish.yml.
- # That workflow reacts to a workflow_run "completed" event, and GitHub has
- # never delivered one for this workflow: ports/windows-x64.json had never
- # existed on the data branch, so the public table served the checked-in
- # fallback for the Windows x64 column. The report is already on disk in
- # this job, so publish it directly and depend on no event.
- #
- # if: ${{ !cancelled() }} for the same reason the job itself runs on failure -- a
- # report recording real failures is the one the table most needs.
- - name: Publish the Windows report to the data branch
- if: >-
- !cancelled() && github.ref == 'refs/heads/master' &&
- (github.event_name == 'push' || github.event_name == 'schedule' ||
- github.event_name == 'workflow_dispatch')
- env:
- GH_TOKEN: ${{ github.token }}
- PORT_STATUS_PUBLISH: '1'
- run: |
- set -euo pipefail
- report=artifacts/windows-port/port-status-windows-x64.json
- if [ ! -f "$report" ]; then
- echo "No normalized Windows report to publish." >&2
- exit 1
- fi
- ./scripts/hellocodenameone/conformance/publish_port_status.sh "$report"
- # Publishing to the data branch is only half the job. The Port Status
- # page is STATIC -- Hugo reads the reports at build time -- and
- # website-docs.yml is triggered by pushes to master, not by the data
- # branch, so a report published here would sit unseen until the next
- # daily rebuild. That is the same stale window this whole change
- # exists to close. port-status-publish.yml dispatches the rebuild for
- # the producers it handles; do the same for the ones that publish
- # themselves. In the same step as the publish, so it runs only when
- # the publish actually succeeded.
- gh workflow run website-docs.yml --ref master -f deploy_production=true
-
- - name: Upload golden capture
- if: always()
- uses: actions/upload-artifact@v7
- with:
- name: cn1ss-capture-windows-cross-x64
- path: artifacts/cn1ss-capture
- if-no-files-found: ignore
diff --git a/.github/workflows/windows-cross-compile.yml b/.github/workflows/windows-cross-compile.yml
index 6c4092d6cc1..9c4ac5eaef8 100644
--- a/.github/workflows/windows-cross-compile.yml
+++ b/.github/workflows/windows-cross-compile.yml
@@ -5,7 +5,7 @@
# pre-check that the port + a real Form app translate and *link* into a Windows
# binary. It is compile-and-link only (Direct2D/DirectWrite need a real Windows
# GPU stack to run), so there is no run/screenshot step; the authoritative
-# run/render gate stays on the Windows runners (parparvm-tests-windows.yml).
+# run/render gate stays on the Windows runners (linux-build-run.yml).
name: Windows cross-compile (Linux)
on:
diff --git a/CLAUDE.md b/CLAUDE.md
index 8758f6c8797..15a6e241c79 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -120,9 +120,9 @@ its own on JDK 17 (it compiles at release 17), then enforces the result in
`unity-compat` (the Unity compatibility translator and runtime) are held to the
same script with SpotBugs, PMD and Checkstyle all three, but in
`.github/workflows/unity-compat.yml`: they build only with the .NET SDK, and
-the Java 8 leg must not need one. That workflow's `paths` name both modules,
-the core's `pmd.xml` and `checkstyle.xml` and the report script, so a change to
-any of them cannot skip it.
+the Java 8 leg must not need one. That workflow is nightly; on a pull request
+it runs only when the Unity tree itself changes, so a change to the core's
+`pmd.xml`, `checkstyle.xml` or the report script is judged there overnight.
- **SpotBugs is a zero-findings gate.** *Any* finding of *any* pattern in *any*
of those projects fails the build, and a project that produces no SpotBugs
@@ -472,7 +472,7 @@ shared `SqlAccess` is the pattern -- never a second copy. A marked class may onl
on the JDK subset the backend compiles against and on other marked classes, and
`package-info.java` cannot be marked (javac would emit a `package-info.class`).
A class marked outside the current packages also needs its path added to
-`parparvm-tests.yml`'s `paths`, which cannot read the marker.
+the `linux-build-run` entry's `paths` in `.github/ci/ci-members.json`, which cannot read the marker.
### Two API references: client and backend
@@ -749,7 +749,7 @@ of them on by default in a customer build**:
`CN1_NATIVE_VERIFY` or `-Dparparvm.nativeVerify` says `strict` or `warn`. Making
the old soft failure hard would change the outcome of app builds that succeed
today, so our CI opts in (`CN1_NATIVE_VERIFY: strict` at workflow level in
- `pr.yml`, `parparvm-tests.yml` and `parparvm-tests-windows.yml`, inherited by
+ `pr.yml` and `linux-build-run.yml`, inherited by
every forked translation) and nobody else has to. The `nativeVerify` build hint
turns it on for a single build. With the check on, the per-symbol opt-out for a
native that lives in a prebuilt `.a`/`.framework` is
@@ -1135,67 +1135,17 @@ Traps that have already cost a fix:
application build never restores anything: its generated project turns the
implicit framework reference off and names the three assemblies by path.
-#### The screenshot suite's Unity gallery is prebuilt, once, on Linux
-
-`scripts/hellocodenameone` compiles `scripts/unity-compat-samples/gallery`
-(`compile-unity` in `common/pom.xml`) for the `UnityCompat*` screenshot tests,
-so every job that builds the application would need the .NET SDK and both
-Unity modules. None has them. One Linux job per workflow run does:
-
-- **`.github/workflows/unity-gallery-prebuilt.yml`** (reusable) builds the
- plugin and the two modules, runs the application's common module to
- `generate-sources`, and uploads what `scripts/unity-gallery-prebuilt.sh pack`
- writes as the artifact `unity-gallery-prebuilt`: the `codenameone-unity-compat`
- and `codenameone-cil-translator` artifacts plus `common/target/unity` and
- `common/target/generated-sources/unity`. The archive is cached on a hash of
- everything that can change a byte of it, so most runs only upload it again.
-- **`.github/actions/unity-gallery-prebuilt`** downloads and unpacks it.
- `compile-unity` then finds a matching content digest and never starts
- `dotnet`.
-
-Traps:
-
-- **A new job that builds the application must use both**: a job that
- `uses:` the workflow, `needs:` on it, and the action after everything that
- fills the local Maven repository and before the first build of the
- application. Without them the job fails in `compile-unity` with ".NET SDK,
- which was not found", naming the gallery directory.
-- **A consumer must not build the Unity jars itself**, or install them from
- anywhere else. The digest covers every class of the runtime, the references
- and the translator, so output is good only with the archive's own jars. When
- they differ the failure adds "does not match these sources or jars" -- that,
- not a missing SDK, is the thing to fix. `state.txt` records a digest per
- part under the whole one, and the message names the part that differs and,
- within it, the first entry: read that before guessing.
-- **The translator's class path is its runtime scope and nothing more**
- (`CompileUnityMojo.resolve`). Maven's legacy resolver also hands back a
- pom's test-scoped dependencies unless it is filtered; that once put the
- consumer's own `codenameone-core` jar into the digest, which a Linux job
- rebuilds byte for byte and a Windows one does not, so every Windows consumer
- refused an archive that was good.
-- **A hand-assembled translation takes the application's libraries from
- `common/target/translation-libs`**, which the application's own pom stages
- from its runtime class path in `process-classes`. The native Linux and
- Windows translations (`vm/tests`, `helloSuiteLibraryClasses`) and the
- JavaScript build script read it; a list of class directories per workflow
- is how the Unity runtime was missing from three of them.
-- **The artifact name is fixed, so the workflow is called once per run.** A
- workflow that is itself called (`scripts-ios-native.yml`, `ios-packaging.yml`)
- takes `unity_prepared` and skips its own call
- when `scripts-ios.yml` already made one.
-- **Anything new that determines the archive goes into the cache key** in the
- reusable workflow. A stale cached archive is not refused downstream -- it is
- self-consistent -- it is simply used.
-- **Every PR-gating workflow that builds the application lists the gallery, both
- modules, the script, the workflow and the action in its `paths`**, and
- `.github/ci/apple-checks.json` lists them for the four Apple suites.
- A nightly suite (see *Nightly CI*) lists only its own tree and is exempt.
-- **`unpack` after `mvn clean` on the application, never before**: the output
- lives under `common/target`.
-- `unity-compat.yml`'s `unity-gallery-consumer` job is the end-to-end test:
- it unpacks into a job that built neither module, builds the common module
- with an SDK setting that names nothing, and then checks that a stale
- `state.txt` is refused by name.
+#### Unity is tested nightly, not on every pull request
+
+`unity-compat.yml` runs every night (`cron: '11 0 * * *'`) and on a pull
+request only when the Unity tree changes: the two modules, their integration
+scripts, the Unity goals of the build tools and `scripts/unity-compat-samples`.
+`scripts/hellocodenameone` does **not** compile the Unity gallery and has no
+`UnityCompat*` screenshot tests: that made every device suite depend on a
+.NET build, and a Unity failure stopped iOS, Android, JavaScript and the native
+suites alike. Do not add Unity back to the screenshot app or to a `ci.yml`
+member; the gallery is still built and run by `unity-compat-test.sh`.
+
### Desktop compatibility: Swing and JavaFX apps as Codename One apps
A desktop project's `src/main` dropped into `common/src/main/desktop` (or
@@ -1442,6 +1392,40 @@ target's upload (`.github/workflows/kmp-compat.yml`). `scripts/kmp-bench` runs
the same Compose source against Compose Multiplatform on an iOS simulator; see
its README for the numbers and what they do not show.
+### Pull request CI is one workflow: `ci.yml`
+
+A pull request or master push starts `ci.yml` ("CI") and the path-scoped
+workflows of the samples, cn1libs and feature trees; nothing else.
+
+- **Precheck first.** `golden-plan.yml`, `source-gates.yml` and
+ `check-workflows.yml` run in parallel on Linux in a few minutes. Every other
+ job of the run `needs:` all three, so a missing golden, a missing
+ `package-info.java`, a header, a workflow lint error or a broken gate test
+ ends the run before any build starts. A cheap check that keeps failing PRs
+ late belongs in `source-gates.yml`.
+- **The heavy workflows are members**, called from `ci.yml` as reusable
+ workflows: `pr`, the `scripts-*` device suites, the ParparVM, Linux and
+ Windows native suites and the docs workflows. They have no `pull_request` or
+ `push` trigger of their own; their old `paths` filters are in
+ `.github/ci/ci-members.json` and `scripts/ci/select-ci-members.py` applies
+ them (`test_select_ci_members.py`). A new heavy workflow is a member: an entry
+ there and a job in `ci.yml`. They keep `workflow_dispatch` and their
+ schedules, so golden capture and the nightlies dispatch them as before.
+- **One build per platform family, then the tests.** `scripts-ios.yml` builds
+ the iOS and Mac ports once (`_build-ios-port.yml`, `mac_port: true`) and runs
+ Metal, watchOS, tvOS, macOS and iOS fidelity as steps of ONE `xcode-27` job:
+ every suite runs even after an earlier one fails, and the job fails at the
+ end. `linux-build-run.yml` holds every native ParparVM suite (Linux, Windows
+ cross and native, the ParparVM JVM tests) behind one `prepare-suite`
+ producer, and Android fidelity runs inside `scripts-android.yml`. Do not split
+ a suite back out into its own workflow or runner; the `xcode-27` image is
+ scarce and every extra job is another wait.
+- **One run shares its artifacts.** Inside a member `github.workflow` is `CI`, so each member's concurrency group
+ starts with its own file name; keep that on a new one.
+- **Check names are `CI / / `.** Branch protection and anything
+ that looks a PR run up by workflow name must use them; `golden-harvest.sh`
+ lists `ci.yml` beside the members for that reason.
+
### Screenshot goldens: capture, harvest, and how to watch them
A PR that adds or changes a hellocodenameone screenshot test needs a golden per
@@ -1522,6 +1506,12 @@ never failed there. They now run:
only trace. Re-running a nightly by hand keeps `event: schedule`, so the
watchdog judges the re-run.
+- **The sample applications are one workflow, `samples.yml`.** One job per
+ kind of check (template sync, server tests, each database, client end to
+ end, browser, Android, iOS in two shards), and each sample a step of it,
+ named `: ...`; its `select` job keeps every sample's old `paths`
+ filter. They were fourteen workflows of eight to ten jobs each. A new sample
+ goes in as steps of the existing jobs, not as a workflow of its own.
- **The samples' nightly iOS builds are one workflow**,
`samples-ios-nightly.yml`: the port built once, then two macOS shards build
every sample, one step each (`scripts/ci/build-sample-ios-simulator.sh`).
diff --git a/CodenameOne/src/com/codename1/annotations/buildhints/Ios.java b/CodenameOne/src/com/codename1/annotations/buildhints/Ios.java
index 6fee3c86fa8..d7cc8681afb 100644
--- a/CodenameOne/src/com/codename1/annotations/buildhints/Ios.java
+++ b/CodenameOne/src/com/codename1/annotations/buildhints/Ios.java
@@ -134,7 +134,7 @@
String plistInject() default "";
/// A comma separated list of https://cocoapods.org/[Cocoa Pods] that should be
- /// linked to the app to build it. For example, `AFNetworking ~> 2.6,
+ /// linked to the app to build it. For example, `MBProgressHUD ~> 1.2,
/// ORStackView ~> 3.0, SwiftyJSON ~> 2.3`
@Hint(appendable = true, separator = ",")
String[] pods() default {};
diff --git a/CodenameOne/src/com/codename1/annotations/buildhints/IosThemeGeneration.java b/CodenameOne/src/com/codename1/annotations/buildhints/IosThemeGeneration.java
index 9e95e2debf9..040862e3ce9 100644
--- a/CodenameOne/src/com/codename1/annotations/buildhints/IosThemeGeneration.java
+++ b/CodenameOne/src/com/codename1/annotations/buildhints/IosThemeGeneration.java
@@ -34,9 +34,7 @@
/// themeMode ignores it, because there is only one iOS 7 and one pre-flat look.
public enum IosThemeGeneration {
/// Say nothing, and let the build server apply its own default, which is
- /// [#IOS26]. An application that never sets this keeps the theme it has.
- /// New projects from the Initializr and the archetype set [#IOS27] in their
- /// settings, so only older projects land here.
+ /// [#IOS27]. An application that wants the iOS 26 look sets [#IOS26].
@HintUnset
DEFAULT,
diff --git a/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java b/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java
index 7df4959b40a..cc084efd89d 100644
--- a/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java
+++ b/Ports/JavaSE/src/com/codename1/impl/javase/JavaSEPort.java
@@ -3584,8 +3584,9 @@ private void injectDesktopThemeConstants(HashMap h) {
/// caching: the simulator picks up a project's settings without a restart,
/// so a cached answer would survive the change that was meant to alter it.
private static String modernIosTheme() {
- return "27".equals(buildHint("ios.themeGeneration"))
- ? "iOSModern27Theme" : "iOSModernTheme";
+ // 27 unless the project asks for 26, as the builder defaults it.
+ return "26".equals(buildHint("ios.themeGeneration"))
+ ? "iOSModernTheme" : "iOSModern27Theme";
}
private static String resolveAutoNativeTheme(String platformName) {
diff --git a/Ports/JavaSE/src/com/codename1/impl/javase/cef/CEFBrowserComponent.java b/Ports/JavaSE/src/com/codename1/impl/javase/cef/CEFBrowserComponent.java
index d5bd53fa327..9c92c1d55ce 100644
--- a/Ports/JavaSE/src/com/codename1/impl/javase/cef/CEFBrowserComponent.java
+++ b/Ports/JavaSE/src/com/codename1/impl/javase/cef/CEFBrowserComponent.java
@@ -136,14 +136,18 @@ protected void deinitialize() {
* Chromium back to the FreeType backend. Only the JavaSE simulator's bundled CEF is
* affected; the iOS (WKWebView) and Android (system WebView) ports are untouched.
*
- * Gated to macOS so Windows/Linux behavior is unchanged. Passed as a jcef arg
+ *
Applied on every platform. On Linux x86-64 the CEF 146 simulator died with
+ * SIGILL inside libcef.so -- the trap instruction a Rust panic or a Chromium CHECK
+ * compiles to on that architecture -- at one fixed offset, in a full-stack sample
+ * that had just loaded a custom TrueType font. That is the macOS failure's
+ * signature on another CPU, so the font backend is switched off there too. Passed as a jcef arg
* (see {@code CN1JcefRuntime.createBuilder}); Chromium propagates {@code --disable-features}
* to the CEF helper subprocesses automatically via its FeatureList mechanism. The
* {@code -Dcef.disableFeatures=...} system property overrides this on any platform
* (an empty value disables it entirely).
*/
private static String defaultDisableFeatures() {
- return isMac ? "FontationsFontBackend" : null;
+ return "FontationsFontBackend";
}
private static String[] createArgs() {
diff --git a/Ports/JavaScriptPort/STATUS.md b/Ports/JavaScriptPort/STATUS.md
index 0db9d78506f..6fa2438277f 100644
--- a/Ports/JavaScriptPort/STATUS.md
+++ b/Ports/JavaScriptPort/STATUS.md
@@ -151,7 +151,7 @@ ARTIFACTS_DIR=/tmp/js-verify \
CI runs at 375×667 viewport with Playwright `deviceScaleFactor: 2` so the
density picker lands on `DENSITY_VERY_HIGH` and screenshots come out 750×1334
-— phone-proportional to the iOS/Android baselines in `scripts/ios/screenshots-metal`
+— phone-proportional to the iOS/Android baselines in `scripts/ios/screenshots-metal-27`
and `scripts/android/screenshots`.
Screenshot baselines
diff --git a/Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java b/Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java
index 31d686dabf0..90aa23e4cfd 100644
--- a/Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java
+++ b/Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java
@@ -3150,9 +3150,8 @@ protected String nativeThemeMode() {
/// Which generation of the MODERN theme this build ships. "26" or "27",
/// emitted into the generated stub by IPhoneBuilder from the
- /// ios.themeGeneration hint. Defaults to 26 so a build that says nothing --
- /// including one produced before the hint existed -- keeps the theme it had.
- private static String iosThemeGeneration = "26";
+ /// ios.themeGeneration hint. Defaults to 27, the builder's own default.
+ private static String iosThemeGeneration = "27";
/// Invoked from the generated stub (do not rename).
public static void setIosThemeGeneration(String g) {
diff --git a/docs/demos/common/src/main/java/com/codenameone/developerguide/advancedtopics/BuildHintAnnotationSnippet.java b/docs/demos/common/src/main/java/com/codenameone/developerguide/advancedtopics/BuildHintAnnotationSnippet.java
index 10cbceae5bd..1ce6a9d7ed2 100644
--- a/docs/demos/common/src/main/java/com/codenameone/developerguide/advancedtopics/BuildHintAnnotationSnippet.java
+++ b/docs/demos/common/src/main/java/com/codenameone/developerguide/advancedtopics/BuildHintAnnotationSnippet.java
@@ -37,7 +37,7 @@
@DesktopBuild(titleBar = DesktopTitleBar.NATIVE, width = 1280, height = 800)
@Ios(themeMode = ThemeMode.MODERN,
newStorageLocation = Toggle.ON,
- pods = {"Intercom", "AFNetworking"})
+ pods = {"Intercom", "MBProgressHUD"})
public class BuildHintAnnotationSnippet {
}
// end::buildHintAnnotations[]
diff --git a/docs/demos/common/src/main/snippets/developer-guide/advanced-topics-under-the-hood.properties b/docs/demos/common/src/main/snippets/developer-guide/advanced-topics-under-the-hood.properties
index 7ff5d7be91a..397b2de3556 100644
--- a/docs/demos/common/src/main/snippets/developer-guide/advanced-topics-under-the-hood.properties
+++ b/docs/demos/common/src/main/snippets/developer-guide/advanced-topics-under-the-hood.properties
@@ -104,5 +104,5 @@ codename1.arg.desktop.width=1280
codename1.arg.desktop.height=800
codename1.arg.ios.themeMode=modern
codename1.arg.ios.newStorageLocation=true
-codename1.arg.ios.pods=Intercom,AFNetworking
+codename1.arg.ios.pods=Intercom,MBProgressHUD
// end::advanced-topics-under-the-hood-properties-004[]
diff --git a/docs/developer-guide/Brickyard-Implementors-Guide.asciidoc b/docs/developer-guide/Brickyard-Implementors-Guide.asciidoc
index dfae0b593cc..d3fa3e12d38 100644
--- a/docs/developer-guide/Brickyard-Implementors-Guide.asciidoc
+++ b/docs/developer-guide/Brickyard-Implementors-Guide.asciidoc
@@ -252,7 +252,7 @@ The project is in `scripts/brickyard`. Its README has the exact commands: instal
framework, the engine and the backend runtime from the repository root with JDK 8,
then run `mvn -Dcodename1.platform=backend -pl shared,backend test` for the server and
`mvn -Dcodename1.platform=javase -pl common -am test` for the client, both with JDK 17.
-`.github/workflows/brickyard.yml` runs the same steps: the engine tests, the server
+`.github/workflows/samples.yml` runs the same steps: the engine tests, the server
tests on SQLite, PostgreSQL and MySQL, and the client tests.
[[brickyard-reskin]]
diff --git a/docs/developer-guide/Fieldline-Implementors-Guide.asciidoc b/docs/developer-guide/Fieldline-Implementors-Guide.asciidoc
index 02c4598653e..ef0be1b7a4b 100644
--- a/docs/developer-guide/Fieldline-Implementors-Guide.asciidoc
+++ b/docs/developer-guide/Fieldline-Implementors-Guide.asciidoc
@@ -398,7 +398,7 @@ sign-in to the technician's day, with the live channel open. It needs Node with
Playwright. `check-template.sh` generates a project from the Initializr template
under another name and package and builds it. The server's own tests run with
`@BackendTest` on the `test` profile, which takes fewer search steps so a run stays
-quick. CI runs them in `.github/workflows/fieldline.yml`.
+quick. CI runs them in `.github/workflows/samples.yml`.
=== Making it yours
diff --git a/docs/developer-guide/Pulse-Implementors-Guide.asciidoc b/docs/developer-guide/Pulse-Implementors-Guide.asciidoc
index d2acda78d73..52ca7b4b0b3 100644
--- a/docs/developer-guide/Pulse-Implementors-Guide.asciidoc
+++ b/docs/developer-guide/Pulse-Implementors-Guide.asciidoc
@@ -199,7 +199,7 @@ include::../demos/common/src/main/snippets/developer-guide/pulse.sh[tag=pulse-sh
The server's tests run on in-memory SQLite, which accepts any value in any column.
`sample-server-tests-on-database.sh` runs them against PostgreSQL or MySQL, where
the ORM checks every mapping against its migration. CI runs both, in
-`.github/workflows/pulse.yml`.
+`.github/workflows/samples.yml`.
=== Making it yours
diff --git a/docs/developer-guide/Reel-Implementors-Guide.asciidoc b/docs/developer-guide/Reel-Implementors-Guide.asciidoc
index f94ae2e8a11..c0585e683cd 100644
--- a/docs/developer-guide/Reel-Implementors-Guide.asciidoc
+++ b/docs/developer-guide/Reel-Implementors-Guide.asciidoc
@@ -187,7 +187,7 @@ include::../demos/common/src/main/snippets/developer-guide/reel.sh[tag=reel-sh-t
The server's tests run on the JVM and again compiled to a native binary, which
is how the server ships. `run-e2e.sh` starts a server and drives the app through
its screens in the simulator as each role; `run-web-e2e.sh` does the same for the
-browser build in a headless browser. `.github/workflows/reel.yml` runs them all,
+browser build in a headless browser. `.github/workflows/samples.yml` runs them all,
the server tests on each database, and the Android and iOS builds.
=== Making it yours
diff --git a/docs/developer-guide/Slate-Implementors-Guide.asciidoc b/docs/developer-guide/Slate-Implementors-Guide.asciidoc
index ca079dd90ec..e6e1ae23f03 100644
--- a/docs/developer-guide/Slate-Implementors-Guide.asciidoc
+++ b/docs/developer-guide/Slate-Implementors-Guide.asciidoc
@@ -367,7 +367,7 @@ The slot engine's rules are tested one at a time, against the engine alone, and
again end to end through the booking service. `run-e2e.sh` starts the server and
drives the app in the simulator as a client, a provider and an owner.
`sample-server-tests-on-database.sh` runs the server tests against PostgreSQL or
-MySQL. CI runs all them, in `.github/workflows/slate.yml`.
+MySQL. CI runs all them, in `.github/workflows/samples.yml`.
=== Making it yours
diff --git a/docs/developer-guide/Working-With-iOS.asciidoc b/docs/developer-guide/Working-With-iOS.asciidoc
index 9dc121e92e1..7fb0529b092 100644
--- a/docs/developer-guide/Working-With-iOS.asciidoc
+++ b/docs/developer-guide/Working-With-iOS.asciidoc
@@ -207,32 +207,34 @@ https://cocoapods.org/[CocoaPods] is a dependency manager for Swift and Objectiv
**Examples**
-Include the https://github.com/AFNetworking/AFNetworking[AFNetworking] library in your app:
+Include the https://github.com/jdg/MBProgressHUD[MBProgressHUD] library in your app:
----
-ios.pods=AFNetworking
+ios.pods=MBProgressHUD
----
-Include the https://github.com/AFNetworking/AFNetworking[AFNetworking] version 3.0.x library in your app:
+Include the https://github.com/jdg/MBProgressHUD[MBProgressHUD] version 1.2.x library in your app:
----
-ios.pods=AFNetworking ~> 3.0
+ios.pods=MBProgressHUD ~> 1.2
----
+Pods are compiled with Clang modules enabled. An unmaintained pod may not build against a newer iOS SDK. AFNetworking, for example, includes `netinet6/in6.h` directly, which the iOS 27 SDK rejects when modules are enabled. Prefer a maintained alternative when a pod fails in its own sources.
+
For full versioning syntax specifying pods see the https://guides.cocoapods.org/syntax/podfile.html#pod[Podfile spec for the "pod" directive].
==== Including multiple pods
-Multiple pods can be separated by either commas or semi-colons in the value of the `ios.pods` build hint. For example: To include GoogleMaps and AFNetworking, you could:
+Multiple pods can be separated by either commas or semi-colons in the value of the `ios.pods` build hint. For example: To include GoogleMaps and MBProgressHUD, you could:
----
-ios.pods=GoogleMaps,AFNetworking
+ios.pods=GoogleMaps,MBProgressHUD
----
Or specifying versions:
----
-ios.pods=AFNetworking ~> 3.0,GoogleMaps
+ios.pods=MBProgressHUD ~> 1.2,GoogleMaps
----
==== Other pod related build hints
diff --git a/docs/developer-guide/languagetool-accept.txt b/docs/developer-guide/languagetool-accept.txt
index 45424241c7f..acb25bc3bbd 100644
--- a/docs/developer-guide/languagetool-accept.txt
+++ b/docs/developer-guide/languagetool-accept.txt
@@ -102,6 +102,7 @@ popover
popovers
# Acronyms and product / framework names
AFNetworking
+MBProgressHUD
AVKit
AWT
Appcompat
diff --git a/docs/website/data/port_status.json b/docs/website/data/port_status.json
index a2945ab4243..18e0a3b2daf 100644
--- a/docs/website/data/port_status.json
+++ b/docs/website/data/port_status.json
@@ -19,7 +19,7 @@
],
"golden_directories": [
"scripts/android/screenshots",
- "scripts/ios/screenshots-metal",
+ "scripts/ios/screenshots-metal-27",
"scripts/ios/screenshots-watch",
"scripts/ios/screenshots-tv",
"scripts/macos/screenshots",
@@ -45,7 +45,7 @@
"id": "macos",
"name": "macOS",
"detail": "Native AppKit build",
- "workflow": "scripts-macos.yml"
+ "workflow": "scripts-ios.yml"
},
{
"id": "javascript",
@@ -69,13 +69,13 @@
"id": "windows-x64",
"name": "Windows x64",
"detail": "Native cross-compiled binary on Windows",
- "workflow": "windows-cross-build-run.yml"
+ "workflow": "linux-build-run.yml"
},
{
"id": "windows-arm64",
"name": "Windows ARM64",
"detail": "Native ARM64 binary on Windows 11",
- "workflow": "parparvm-tests-windows.yml"
+ "workflow": "linux-build-run.yml"
},
{
"id": "watchos",
@@ -123,22 +123,6 @@
"AndroidCompatTallDialogScreenshotTest"
]
},
- {
- "id": "unity-compatibility",
- "category": "Application runtime",
- "name": "Unity 2D projects (UnityEngine and C# scripts)",
- "description": "Runs an unmodified Unity 2D project -- C# scripts, scenes and prefabs, sprites, 2D physics, the UI canvas, tilemaps, animators, particle systems, TextMeshPro and Cinemachine -- through the Unity compatibility runtime, drawn by the GPU.",
- "tests": [
- "UnityCompatSpritesScreenshotTest",
- "UnityCompatPhysicsScreenshotTest",
- "UnityCompatCanvasScreenshotTest",
- "UnityCompatTilemapScreenshotTest",
- "UnityCompatAnimatorScreenshotTest",
- "UnityCompatParticlesScreenshotTest",
- "UnityCompatTextMeshProScreenshotTest",
- "UnityCompatCinemachineScreenshotTest"
- ]
- },
{
"id": "desktop-compatibility",
"category": "Application runtime",
@@ -387,6 +371,7 @@
"Chart2PieScreenshotTest",
"Chart2RadarScreenshotTest",
"Chart2SankeyScreenshotTest",
+ "Chart2SharedTooltipScreenshotTest",
"Chart2SparklinesScreenshotTest",
"Chart2SunburstScreenshotTest",
"Chart2TreemapScreenshotTest",
@@ -1590,6 +1575,10 @@
"pattern": "chart2-sparklines",
"test": "Chart2SparklinesScreenshotTest"
},
+ {
+ "pattern": "chart2-shared-tooltip",
+ "test": "Chart2SharedTooltipScreenshotTest"
+ },
{
"pattern": "chart2-brush",
"test": "Chart2BrushScreenshotTest"
@@ -2122,38 +2111,6 @@
"pattern": "AndroidCompatTallDialog",
"test": "AndroidCompatTallDialogScreenshotTest"
},
- {
- "pattern": "UnityCompatSprites",
- "test": "UnityCompatSpritesScreenshotTest"
- },
- {
- "pattern": "UnityCompatPhysics",
- "test": "UnityCompatPhysicsScreenshotTest"
- },
- {
- "pattern": "UnityCompatCanvas",
- "test": "UnityCompatCanvasScreenshotTest"
- },
- {
- "pattern": "UnityCompatTilemap",
- "test": "UnityCompatTilemapScreenshotTest"
- },
- {
- "pattern": "UnityCompatAnimator",
- "test": "UnityCompatAnimatorScreenshotTest"
- },
- {
- "pattern": "UnityCompatParticles",
- "test": "UnityCompatParticlesScreenshotTest"
- },
- {
- "pattern": "UnityCompatTextMeshPro",
- "test": "UnityCompatTextMeshProScreenshotTest"
- },
- {
- "pattern": "UnityCompatCinemachine",
- "test": "UnityCompatCinemachineScreenshotTest"
- },
{
"pattern": "DesktopCompatSwingControls",
"test": "DesktopCompatSwingControlsScreenshotTest"
diff --git a/maven/build-engine/src/main/java/com/codename1/builders/IPhoneBuilder.java b/maven/build-engine/src/main/java/com/codename1/builders/IPhoneBuilder.java
index d3f7fe2e93f..3649a68de14 100644
--- a/maven/build-engine/src/main/java/com/codename1/builders/IPhoneBuilder.java
+++ b/maven/build-engine/src/main/java/com/codename1/builders/IPhoneBuilder.java
@@ -111,7 +111,7 @@ static boolean keepsPhoneOrientationDefault(String orientationHint, String plist
/// generated stub. Package-private so WatchNativeBuilder and
/// MacOSNativeBuilder emit the SAME value -- a phone and its watch resolving
/// to different generations would be a skew nobody would think to look for.
- String iosThemeGeneration = "26";
+ String iosThemeGeneration = "27";
/// Where each entry-point stub lives once they have been separated, or null when there is one
@@ -2465,11 +2465,11 @@ public boolean build(File sourceZip, BuildRequest request) throws BuildException
// design generation the modern theme targets.
//
// An unrecognised value is a build error rather than a silent fallback.
- // Falling back would ship the 26 look to someone who asked for 27 and
+ // Falling back would ship the default look to someone who asked for another and
// say nothing, and a theme is exactly the kind of thing nobody notices
// is wrong until it is in front of users -- the same failure the
// nativeTheme comment above records for iosMode.
- iosThemeGeneration = request.getArg("ios.themeGeneration", "26").trim();
+ iosThemeGeneration = request.getArg("ios.themeGeneration", "27").trim();
if (!"26".equals(iosThemeGeneration) && !"27".equals(iosThemeGeneration)) {
throw new BuildException("ios.themeGeneration must be 26 or 27, got '"
+ iosThemeGeneration + "'");
@@ -13735,6 +13735,20 @@ private void resolveInviteAppClipGroup(BuildRequest request) throws BuildExcepti
"true".equals(request.getArg("ios.invite.appClip", "true"));
}
+ /// The App Clip's deployment target: its own iOS 14 minimum, raised to the SDK's floor.
+ ///
+ /// The clip is a separate target with a fixed target of its own, so the floor the app
+ /// target gets through addMinDeploymentTarget never reached it: on Xcode 27, whose iOS
+ /// floor is 15.0, every project with the invite clip failed in target CN1InviteClip
+ /// while the app target built. On an older Xcode the floor is below 14.0 (or unknown)
+ /// and the clip is unchanged.
+ ///
+ /// @param sdkFloor the SDK's minimum iOS deployment target, or null when unknown
+ /// @return the deployment target to write for the clip
+ static String inviteAppClipDeploymentTarget(String sdkFloor) {
+ return AppleSdkFloor.raiseTo(InviteAppClipBuilder.DEPLOYMENT_TARGET, sdkFloor);
+ }
+
/// Emits the App Clip target into the schemes ruby.
///
/// Modelled on [#appendMatterExtensionTarget], with one structural
@@ -13774,8 +13788,13 @@ private void appendInviteAppClipTarget(StringBuilder sb, BuildRequest request,
buildSettingsMap.put("PRODUCT_NAME", "$(TARGET_NAME)");
buildSettingsMap.put("INFOPLIST_FILE", name + "/Info.plist");
buildSettingsMap.put("CODE_SIGN_ENTITLEMENTS", name + "/" + name + ".entitlements");
- buildSettingsMap.put("IPHONEOS_DEPLOYMENT_TARGET",
- InviteAppClipBuilder.DEPLOYMENT_TARGET);
+ String clipDeploymentTarget = inviteAppClipDeploymentTarget(sdkDeploymentFloor);
+ if (!InviteAppClipBuilder.DEPLOYMENT_TARGET.equals(clipDeploymentTarget)) {
+ log("App Clip " + name + " asks for iOS " + InviteAppClipBuilder.DEPLOYMENT_TARGET
+ + ", but this Xcode's iOS SDK accepts nothing below " + sdkDeploymentFloor
+ + "; building the clip against " + clipDeploymentTarget + " instead.");
+ }
+ buildSettingsMap.put("IPHONEOS_DEPLOYMENT_TARGET", clipDeploymentTarget);
// The HOST's families, through the same helper every other embedded
// target here uses. Hard-coding iPhone was wrong twice over: App Clips
// do run on iPad, and an ios.project_type=ipad build has an iPad-only
@@ -13843,7 +13862,7 @@ private void appendInviteAppClipTarget(StringBuilder sb, BuildRequest request,
// integration.
sb.append("\nif xcproj.targets.find{|e| e.name=='" + name + "'}.nil?\n"
+ "clip_target = xcproj.new_target(:application, '" + name + "', :ios, '"
- + InviteAppClipBuilder.DEPLOYMENT_TARGET + "')\n"
+ + clipDeploymentTarget + "')\n"
+ "clip_target.product_type = '" + InviteAppClipBuilder.PRODUCT_TYPE + "'\n"
+ "clip_target.add_system_framework('UIKit')\n"
// SKOverlay is the install affordance, and it is what carries
diff --git a/maven/build-engine/src/main/java/com/codename1/builders/NativeThemes.java b/maven/build-engine/src/main/java/com/codename1/builders/NativeThemes.java
index 07f806310a0..a8a0c7fca73 100644
--- a/maven/build-engine/src/main/java/com/codename1/builders/NativeThemes.java
+++ b/maven/build-engine/src/main/java/com/codename1/builders/NativeThemes.java
@@ -64,7 +64,7 @@ private NativeThemes() {
/// or null for `custom`, which installs none.
///
/// @param mode the theme mode written into the stub; null means the runtime default, "auto"
- /// @param generation the iOS modern generation, "26" or "27"; null means 26
+ /// @param generation the iOS modern generation, "26" or "27"; null means 27
/// @param mac true for the native macOS port, whose Aqua theme answers auto/aqua/native
static String themeFor(String mode, String generation, boolean mac) {
String m = mode == null ? "auto" : asciiLower(mode.trim());
@@ -75,7 +75,7 @@ static String themeFor(String mode, String generation, boolean mac) {
return "MacOSAquaTheme";
}
if ("modern".equals(m) || "liquid".equals(m)) {
- return "27".equals(generation) ? "iOSModern27Theme" : "iOSModernTheme";
+ return "26".equals(generation) ? "iOSModernTheme" : "iOSModern27Theme";
}
if ("ios7".equals(m) || "flat".equals(m) || "auto".equals(m)) {
return "iOS7Theme";
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatParticlesScreenshotTest.java b/maven/build-engine/src/test/java/com/codename1/builders/InviteAppClipDeploymentFloorTest.java
similarity index 51%
rename from scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatParticlesScreenshotTest.java
rename to maven/build-engine/src/test/java/com/codename1/builders/InviteAppClipDeploymentFloorTest.java
index 0f82683832a..02fb5194382 100644
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatParticlesScreenshotTest.java
+++ b/maven/build-engine/src/test/java/com/codename1/builders/InviteAppClipDeploymentFloorTest.java
@@ -20,11 +20,34 @@
* Please contact Codename One through http://www.codenameone.com/ if you
* need additional information or have any questions.
*/
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
+package com.codename1.builders;
-/// Particle systems, their random numbers seeded.
-public class UnityCompatParticlesScreenshotTest extends UnityScreenshotTest {
- public UnityCompatParticlesScreenshotTest() {
- super("Particles");
+import com.codename1.util.InviteAppClipBuilder;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/// The invite App Clip is its own target with a fixed iOS 14 minimum, so the SDK floor the
+/// app target is raised to must reach it separately: Xcode 27 (floor 15.0) rejected every
+/// project with the clip in target CN1InviteClip while the app target built.
+class InviteAppClipDeploymentFloorTest {
+
+ @Test
+ void xcode27FloorRaisesTheClip() {
+ assertEquals("15.0", IPhoneBuilder.inviteAppClipDeploymentTarget("15.0"));
+ }
+
+ @Test
+ void olderXcodeLeavesTheClipAtItsOwnMinimum() {
+ assertEquals(InviteAppClipBuilder.DEPLOYMENT_TARGET,
+ IPhoneBuilder.inviteAppClipDeploymentTarget("12.0"));
+ }
+
+ @Test
+ void unknownFloorLeavesTheClipAlone() {
+ assertEquals(InviteAppClipBuilder.DEPLOYMENT_TARGET,
+ IPhoneBuilder.inviteAppClipDeploymentTarget(null));
+ assertEquals(InviteAppClipBuilder.DEPLOYMENT_TARGET,
+ IPhoneBuilder.inviteAppClipDeploymentTarget(""));
}
}
diff --git a/maven/build-engine/src/test/java/com/codename1/builders/NativeThemesTest.java b/maven/build-engine/src/test/java/com/codename1/builders/NativeThemesTest.java
index 905b8c93f6a..97507724702 100644
--- a/maven/build-engine/src/test/java/com/codename1/builders/NativeThemesTest.java
+++ b/maven/build-engine/src/test/java/com/codename1/builders/NativeThemesTest.java
@@ -50,7 +50,7 @@ public void theIosChainPicksWhatInstallNativeThemeLoads() {
assertEquals("iOS7Theme", NativeThemes.themeFor("auto", "26", false));
assertEquals("iOS7Theme", NativeThemes.themeFor("FLAT", "26", false));
assertEquals("iOSModernTheme", NativeThemes.themeFor("modern", "26", false));
- assertEquals("iOSModernTheme", NativeThemes.themeFor("liquid", null, false));
+ assertEquals("iOSModern27Theme", NativeThemes.themeFor("liquid", null, false));
assertEquals("iOSModern27Theme", NativeThemes.themeFor("modern", "27", false));
assertEquals("iPhoneTheme", NativeThemes.themeFor("legacy", "26", false));
assertEquals("iPhoneTheme", NativeThemes.themeFor("material", "26", false));
@@ -61,8 +61,8 @@ public void macGetsAquaUnlessItAsksForAnIosLook() {
assertEquals("MacOSAquaTheme", NativeThemes.themeFor("aqua", null, true));
assertEquals("MacOSAquaTheme", NativeThemes.themeFor("auto", null, true));
assertEquals("MacOSAquaTheme", NativeThemes.themeFor("native", null, true));
- // The macOS stub never sets a generation, so the modern theme there is 26.
- assertEquals("iOSModernTheme", NativeThemes.themeFor("modern", null, true));
+ // No generation means the default one, 27, as on iOS.
+ assertEquals("iOSModern27Theme", NativeThemes.themeFor("modern", null, true));
assertEquals("iOS7Theme", NativeThemes.themeFor("ios7", null, true));
}
diff --git a/maven/core-unittests/src/test/java/com/codename1/ui/util/UtilCoverageTest.java b/maven/core-unittests/src/test/java/com/codename1/ui/util/UtilCoverageTest.java
index b6c5b7cfa56..ae6dedbbe52 100644
--- a/maven/core-unittests/src/test/java/com/codename1/ui/util/UtilCoverageTest.java
+++ b/maven/core-unittests/src/test/java/com/codename1/ui/util/UtilCoverageTest.java
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Codename One designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Codename One through http://www.codenameone.com/ if you
+ * need additional information or have any questions.
+ */
package com.codename1.ui.util;
import com.codename1.io.Util;
@@ -122,17 +144,21 @@ public void run() {
}
});
- CN.callSerially(new Runnable() {
+ // showOn blocks in a modal dialog. A single dispose queued up front can
+ // run before that dialog is current and then nothing ever closes it, so
+ // the test hung until its timeout on a loaded runner. Ask again on every
+ // poll until showOn has returned.
+ Runnable disposeDialog = new Runnable() {
public void run() {
Form current = Display.getInstance().getCurrent();
if (current instanceof Dialog) {
((Dialog) current).dispose();
}
}
- });
-
+ };
int attempts = 0;
- while (!finished[0] && attempts < 40) {
+ while (!finished[0] && attempts < 60) {
+ CN.callSerially(disposeDialog);
TestUtils.waitFor(50);
attempts++;
}
diff --git a/maven/javase/src/test/java/com/codename1/impl/javase/DesktopNativeThemeSelectionTest.java b/maven/javase/src/test/java/com/codename1/impl/javase/DesktopNativeThemeSelectionTest.java
index 8169edc984a..eac582ba2fa 100644
--- a/maven/javase/src/test/java/com/codename1/impl/javase/DesktopNativeThemeSelectionTest.java
+++ b/maven/javase/src/test/java/com/codename1/impl/javase/DesktopNativeThemeSelectionTest.java
@@ -67,7 +67,7 @@ void mobileHintsDoNotSelectDesktopThemesInSimulatorOrPackagedApps() throws Excep
assertNull(resolver.invoke(null, "ios"));
assertNull(resolver.invoke(null, "and"));
} else if ("modern".equals(mode)) {
- assertEquals("iOSModernTheme", resolver.invoke(null, "ios"));
+ assertEquals("iOSModern27Theme", resolver.invoke(null, "ios"));
assertEquals("AndroidMaterialTheme", resolver.invoke(null, "and"));
}
}
@@ -113,7 +113,7 @@ void theSharedNativeValueAlsoSelectsTheDesktopTheme() throws Exception {
JavaSEPort.resolvePackagedDesktopNativeTheme("win", new Properties()), hint);
// The mobile half of the hint is unchanged: native is modern plus desktop,
// not a different mobile theme.
- assertEquals("iOSModernTheme", resolver.invoke(null, "ios"), hint);
+ assertEquals("iOSModern27Theme", resolver.invoke(null, "ios"), hint);
assertEquals("AndroidMaterialTheme", resolver.invoke(null, "and"), hint);
// An explicit desktop hint still decides, in both directions.
System.setProperty(keys[0], "legacy");
@@ -356,8 +356,8 @@ public void iosThemeGenerationSelectsTheMatchingModernTheme() throws Exception {
System.setProperty(modeKey, "modern");
System.clearProperty(key);
- assertEquals("iOSModernTheme", resolver.invoke(null, "ios"),
- "unset must stay on generation 26 so an existing project does not move");
+ assertEquals("iOSModern27Theme", resolver.invoke(null, "ios"),
+ "unset must resolve to generation 27, the builder's default");
System.setProperty(key, "26");
assertEquals("iOSModernTheme", resolver.invoke(null, "ios"));
diff --git a/scripts/android/screenshots/UnityCompatAnimator.png b/scripts/android/screenshots/UnityCompatAnimator.png
deleted file mode 100644
index c9988524a83..00000000000
Binary files a/scripts/android/screenshots/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/android/screenshots/UnityCompatCanvas.png b/scripts/android/screenshots/UnityCompatCanvas.png
deleted file mode 100644
index 69d74a4aa3e..00000000000
Binary files a/scripts/android/screenshots/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/android/screenshots/UnityCompatCinemachine.png b/scripts/android/screenshots/UnityCompatCinemachine.png
deleted file mode 100644
index ea437d510c2..00000000000
Binary files a/scripts/android/screenshots/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/android/screenshots/UnityCompatParticles.png b/scripts/android/screenshots/UnityCompatParticles.png
deleted file mode 100644
index 74baa275358..00000000000
Binary files a/scripts/android/screenshots/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/android/screenshots/UnityCompatPhysics.png b/scripts/android/screenshots/UnityCompatPhysics.png
deleted file mode 100644
index 616b3ee5586..00000000000
Binary files a/scripts/android/screenshots/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/android/screenshots/UnityCompatSprites.png b/scripts/android/screenshots/UnityCompatSprites.png
deleted file mode 100644
index a1ba7745853..00000000000
Binary files a/scripts/android/screenshots/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/android/screenshots/UnityCompatTextMeshPro.png b/scripts/android/screenshots/UnityCompatTextMeshPro.png
deleted file mode 100644
index 7596966727f..00000000000
Binary files a/scripts/android/screenshots/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/android/screenshots/UnityCompatTilemap.png b/scripts/android/screenshots/UnityCompatTilemap.png
deleted file mode 100644
index f4bffa52a8a..00000000000
Binary files a/scripts/android/screenshots/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/android/screenshots/chart2-shared-tooltip.png b/scripts/android/screenshots/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..8ca76cc35b3
Binary files /dev/null and b/scripts/android/screenshots/chart2-shared-tooltip.png differ
diff --git a/scripts/bastion/README.adoc b/scripts/bastion/README.adoc
index 1d10d966705..4a6bf63f792 100644
--- a/scripts/bastion/README.adoc
+++ b/scripts/bastion/README.adoc
@@ -107,7 +107,7 @@ mvn -Dcodename1.platform=javase -Djava.awt.headless=true package # <4>
profile and then takes every screenshot in the user's guide, into
`docs/developer-guide/img`.
-`.github/workflows/bastion.yml` runs all of them, and builds the application for
+`.github/workflows/samples.yml` runs all of them, and builds the application for
Android and iOS through `scripts/build-android-app.sh` and
`scripts/build-ios-app.sh` with `CN1_APP_DIR=scripts/bastion`.
diff --git a/scripts/bazaar/README.adoc b/scripts/bazaar/README.adoc
index 682fb78c6b8..dcd5e9d8460 100644
--- a/scripts/bazaar/README.adoc
+++ b/scripts/bazaar/README.adoc
@@ -226,7 +226,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
`npx playwright install chromium` in `scripts/`). Screenshots and logs go
to `target/web-e2e`.
-`.github/workflows/bazaar.yml` runs all five, and builds the application for
+`.github/workflows/samples.yml` runs all five, and builds the application for
Android and iOS through `scripts/build-android-app.sh` and
`scripts/build-ios-app.sh` with `CN1_APP_DIR=scripts/bazaar`.
diff --git a/scripts/bazaar/web-e2e.mjs b/scripts/bazaar/web-e2e.mjs
index c065832b413..05a66a1a448 100644
--- a/scripts/bazaar/web-e2e.mjs
+++ b/scripts/bazaar/web-e2e.mjs
@@ -261,6 +261,15 @@ async function storefrontExtras() {
// page says so.
await shop.goto(origin + '/s/' + store, { waitUntil: 'load' });
await shop.locator('details[data-pick]:has(form[action="/lang"]) > summary').click();
+ // The page flips aria-expanded from the details element's toggle event,
+ // which the browser queues as a task after the click, so read it by
+ // waiting rather than the instant the click returns.
+ try {
+ await shop.locator('details[data-pick] > summary[aria-expanded=true]').first()
+ .waitFor({ state: 'attached', timeout: 5000 });
+ } catch (e) {
+ throw new Error('the language menu does not say it is open');
+ }
if (await shop.locator('details[data-pick] > summary[aria-expanded=true]').count() !== 1) {
throw new Error('the language menu does not say it is open');
}
@@ -498,7 +507,7 @@ async function productControls() {
const shot = name => shop.screenshot({ path: path.join(out, name + '.png') });
await shop.goto(origin + '/app/?store=littleclay&product=speckled-morning-mug', { waitUntil: 'load' });
- const add = await wait('the product page', startSeconds, labelled('Add to cart'));
+ await wait('the product page', startSeconds, labelled('Add to cart'));
await shop.waitForTimeout(1500);
await tap(await wait('the second gallery dot', stepSeconds, labelled('Picture 2 of 2')));
await wait('the second picture to show', stepSeconds, labelled('Picture 2 of 2, showing'));
@@ -511,7 +520,9 @@ async function productControls() {
|| c.label === 'Link copied'));
say('a gallery dot, a variant chip and Share (copied over http) work on the product page');
await shop.waitForTimeout(3500);
- await tap(add);
+ // Find the button again: the gallery, chip and Share steps above can move
+ // the layout, and the position read before them can miss it.
+ await tap(await wait('the Add to cart button', stepSeconds, labelled('Add to cart')));
await wait('the guest cart on the server', stepSeconds, () => tokens.length > 0);
await tap(await wait('the rating row', stepSeconds, list => list.find(c => c.text === 'See reviews'
|| (typeof c.label === 'string' && c.label.indexOf('See reviews') >= 0))));
diff --git a/scripts/brickyard/README.md b/scripts/brickyard/README.md
index f722b2909fe..cdf7093c20b 100644
--- a/scripts/brickyard/README.md
+++ b/scripts/brickyard/README.md
@@ -112,7 +112,7 @@ mvn -Dcodename1.platform=backend -pl shared,backend test -Dmaven.repo.local=$PWD
mvn -Dcodename1.platform=javase -pl common -am test -Dmaven.repo.local=$PWD/../../.m2-repo
```
-`.github/workflows/brickyard.yml` runs the server tests on the JVM and compiled by
+`.github/workflows/samples.yml` runs the server tests on the JVM and compiled by
ParparVM, on SQLite, PostgreSQL and MySQL, and the engine's and the client's tests.
## Limits worth knowing
diff --git a/scripts/build-android-native-ref.sh b/scripts/build-android-native-ref.sh
index 69c9ef0ef07..d0c37bf09fc 100755
--- a/scripts/build-android-native-ref.sh
+++ b/scripts/build-android-native-ref.sh
@@ -11,7 +11,7 @@
# the old look is retired.
#
# CONTRACT: capture on the same emulator profile the fidelity CI uses
-# (scripts-fidelity.yml: API 36, x86_64, google_apis, default 160dpi) so the
+# (scripts-android.yml: API 36, x86_64, google_apis, default 160dpi) so the
# CN1-side renders and these references share pixel density and dp metrics.
#
# Usage: build-android-native-ref.sh [adb_serial]
diff --git a/scripts/build-javascript-port-hellocodenameone.sh b/scripts/build-javascript-port-hellocodenameone.sh
index 9420119de8a..497a813b262 100755
--- a/scripts/build-javascript-port-hellocodenameone.sh
+++ b/scripts/build-javascript-port-hellocodenameone.sh
@@ -154,9 +154,8 @@ if [ -d "$COMMON_DEPS_DIR" ]; then
fi
# Stage the libraries the application ships besides its own classes: the
-# deterministic mock-ads provider (AdsScreenshotTest) and the Unity compatibility
-# runtime (the UnityCompat* tests). The COMMON_DEPS_DIR allowlist above only
-# extracts kotlin/annotations, so neither would reach the translator
+# deterministic mock-ads provider (AdsScreenshotTest). The COMMON_DEPS_DIR
+# allowlist above only extracts kotlin/annotations, so it would not reach the translator
# ("Unknown class com_codename1_ads_mock_MockAdProvider" at runtime). The common
# module unpacks them itself (stage-translation-libs in its pom), from its own
# dependency list: the native Linux and Windows suites read the same directory,
@@ -167,7 +166,7 @@ if [ ! -d "$COMMON_LIBS_DIR" ]; then
bj_log "Missing $COMMON_LIBS_DIR: build the common module to process-classes or later" >&2
exit 1
fi
-for required in com/codename1/ads/mock/MockAdProvider.class com/codename1/unitycompat/unityengine/UnityRuntime.class; do
+for required in com/codename1/ads/mock/MockAdProvider.class; do
if [ ! -f "$COMMON_LIBS_DIR/$required" ]; then
bj_log "$COMMON_LIBS_DIR has no $required" >&2
exit 1
diff --git a/scripts/check-admob-ios-link.sh b/scripts/check-admob-ios-link.sh
index ea30b76efd6..c08d597b92e 100755
--- a/scripts/check-admob-ios-link.sh
+++ b/scripts/check-admob-ios-link.sh
@@ -53,7 +53,34 @@ root, probe, project = map(pathlib.Path, sys.argv[1:4])
props = root / 'maven/cn1-admob/common'
pod = re.search(r'^codename1.arg.ios.pods=(.+)$', (props / 'codenameone_library_required.properties').read_text(), re.M).group(1)
name, version = pod.split(' ', 1)
-(project / 'Podfile').write_text("platform :ios, '14.0'\ntarget 'AdMobLinkProbe' do\n use_frameworks!\n pod '%s', '%s'\nend\n" % (name, version))
+# The probe's own minimum is 14.0, raised to the SDK's floor the way the builder
+# raises an app (Xcode 27's iOS SDK accepts nothing below 15.0). Pods keep their
+# podspec's target (Google-Mobile-Ads-SDK says 12.0), so post_install lifts any
+# pod below the app's target up to it, as the builder's Podfile does.
+import subprocess
+def _ver(v):
+ return tuple(int(x) if x.isdigit() else 0 for x in v.split('.'))
+target = '14.0'
+try:
+ sdk = subprocess.check_output(['xcrun', '--sdk', 'iphoneos', '--show-sdk-path'], text=True).strip()
+ floor = json.loads((pathlib.Path(sdk) / 'SDKSettings.json').read_text())['SupportedTargets']['iphoneos']['MinimumDeploymentTarget']
+ if _ver(floor) > _ver(target):
+ print('AdMob probe: iOS SDK floor %s is above %s; using %s' % (floor, target, floor))
+ target = floor
+except Exception as e:
+ print('AdMob probe: could not read the iOS SDK floor (%s); using %s' % (e, target))
+(project / 'Podfile').write_text(
+ "platform :ios, '%s'\ntarget 'AdMobLinkProbe' do\n use_frameworks!\n pod '%s', '%s'\nend\n"
+ "post_install do |installer|\n"
+ " installer.pods_project.targets.each do |t|\n"
+ " t.build_configurations.each do |config|\n"
+ " cur = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']\n"
+ " if cur.nil? || Gem::Version.new(cur) < Gem::Version.new('%s')\n"
+ " config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '%s'\n"
+ " end\n"
+ " end\n"
+ " end\n"
+ "end\n" % (target, name, version, target, target))
data = json.loads((probe / 'project.json').read_text())
objects = data['objects']
# A successful link alone is insufficient: other frameworks may supply C++
@@ -86,7 +113,7 @@ for obj in objects.values():
settings = obj['buildSettings']
settings.pop('INFOPLIST_FILE', None)
settings.update({'CLANG_ENABLE_MODULES': 'YES', 'CODE_SIGNING_ALLOWED': 'NO',
- 'GENERATE_INFOPLIST_FILE': 'YES', 'IPHONEOS_DEPLOYMENT_TARGET': '14.0',
+ 'GENERATE_INFOPLIST_FILE': 'YES', 'IPHONEOS_DEPLOYMENT_TARGET': target,
'PRODUCT_BUNDLE_IDENTIFIER': 'com.codenameone.test.AdMobLinkProbe',
'GCC_PREFIX_HEADER': 'Prefix.pch', 'GCC_PRECOMPILE_PREFIX_HEADER': 'NO',
'HEADER_SEARCH_PATHS': ['$(inherited)', '$(SRCROOT)'],
diff --git a/scripts/check-duplicated-ci-legs.py b/scripts/check-duplicated-ci-legs.py
deleted file mode 100755
index 8c65eb40b09..00000000000
--- a/scripts/check-duplicated-ci-legs.py
+++ /dev/null
@@ -1,212 +0,0 @@
-#!/usr/bin/env python3
-"""Hold each duplicated CI leg to being the same job as the one it copies.
-
-Two jobs here are COPIES of another job -- build-ios-metal-27 of build-ios-metal,
-and fidelity-ios-metal-27 of fidelity-ios-metal -- because each pair must run
-identical steps on different toolchains. A copy that nobody checks drifts: a step
-added to one, a timeout raised on the other, and the "identical" claim in the
-workflow comment quietly stops being true while both jobs stay green. Nothing
-else in the repository would notice, because each job passes on its own terms.
-
-This normalises away the differences that are SUPPOSED to exist -- the runner,
-the toolchain pin, the theme generation, the baseline directory, the artifact and
-comment names, the concurrency group, the header comment, and the port-status
-upload the 27 leg deliberately omits -- and requires everything else to match
-exactly.
-
-Adding a real difference means adding it to SUBSTITUTIONS below with a reason,
-which is a reviewable act rather than an invisible one.
-"""
-import re
-import sys
-from pathlib import Path
-
-ROOT = Path(__file__).resolve().parent.parent
-
-# One entry per duplicated pair. `subs` is applied to the COPY to bring it back
-# to the original; each entry is a difference that is intended, and anything left
-# over is drift. `only_in_*_steps` names whole steps that exist in one leg on
-# purpose, matched by their `- name:`.
-PAIRS = [
- {
- "workflow": ".github/workflows/scripts-ios.yml",
- "original": "build-ios-metal",
- "copy": "build-ios-metal-27",
- "subs": [
- ("runs-on: xcode-27", "runs-on: macos-15"),
- ("-metal27-${{ github.ref_name }}", "-metal-${{ github.ref_name }}"),
- ("ios-ui-tests-metal-27", "ios-ui-tests-metal"),
- ("screenshots-metal-27", "screenshots-metal"),
- ("CN1SS_IOS_METAL27_COMMENT", "CN1SS_IOS_METAL_COMMENT"),
- ("CN1SS_PREVIEW_SUBDIR: ios-metal-27", "CN1SS_PREVIEW_SUBDIR: ios-metal"),
- # A SUBSTITUTION, not an only_in_copy entry. Declared as "extra" it
- # matched a line the copy also still carried at ios-sim-debug, so the
- # guard saw no drift while the leg silently used the iOS 26 ratchet.
- ("CN1_WARNING_LEG: ios-sim-debug-xcode27", "CN1_WARNING_LEG: ios-sim-debug"),
- # Each leg's golden capture lands under its own artifact name.
- ("name: cn1ss-capture-ios-metal-27", "name: cn1ss-capture-ios-metal"),
- # A capture starts only the legs whose goldens are missing
- # (scripts-ios.yml's select job), so each leg has its own switch.
- ("needs.select.outputs.metal27 ==", "needs.select.outputs.metal =="),
- ],
- # Lines the COPY must contain, checked before any substitution. The
- # subs list cannot do this job: it describes differences that are
- # ALLOWED, so a copy that quietly reverts to the original's value shows
- # up as no difference at all. That is not hypothetical -- the iOS 27 leg
- # carried the iOS 26 warning ratchet for two full runs, compared a 27
- # build against a 26 baseline, failed the census before taking a single
- # screenshot, and this guard reported the legs identical throughout.
- "required_in_copy": [
- "CN1_WARNING_LEG: ios-sim-debug-xcode27",
- # The image carries three 27 releases; without the pin the selector
- # takes the newest and the 27.1 baselines score a 27.2 build.
- "CN1_XCODE_VERSION_PIN: '27.1'",
- "SCREENSHOT_REF_DIR: ${{ github.workspace }}/scripts/ios/screenshots-metal-27",
- # The simulator this leg captures on. Both lines, because each alone
- # is a silent fallback: no boot step and the destination names a
- # device that does not exist; no destination and run-ios-ui-tests.sh
- # asks for "iPhone 16" by name, finds none on the Xcode 27 image, and
- # captures on whatever it falls back to -- an iPad, the run that
- # exposed it. Declaring them as allowed extras only permitted them;
- # deleting both still read as "the legs match".
- "boot-ios-simulator.sh 'iOS-27[0-9-]*' 'iPhone 16'",
- "IOS_SIM_DESTINATION: 'platform=iOS Simulator,id=${{ steps.sim27.outputs.udid }}'",
- ],
- "only_in_copy": [
- "CN1_XCODE_MAJOR: '27'",
- "CN1_XCODE_VERSION_PIN: '27.1'",
- "IOS_DEPENDENCY_ARGS: '-Dcodename1.arg.ios.themeGeneration=27'",
- "IOS_SIM_DESTINATION: 'platform=iOS Simulator,id=${{ steps.sim27.outputs.udid }}'",
- ],
- # The published port report is keyed on the port id `ios-metal` and there
- # is one iOS port; a second upload under that id would publish whichever
- # leg finished last.
- "only_in_original_steps": ["Upload iOS Metal port status"],
- # The 26 leg finds its iPhone 16 already on the image; the 27 image has
- # none, so this leg creates one rather than accepting a fallback device.
- "only_in_copy_steps": ["Boot an iPhone 16 on iOS 27"],
- },
- {
- "workflow": ".github/workflows/scripts-fidelity.yml",
- "original": "fidelity-ios-metal",
- "copy": "fidelity-ios-metal-27",
- "subs": [
- ("runs-on: xcode-27", "runs-on: macos-15"),
- ("name: Fidelity (iOS Modern 27, Metal)", "name: Fidelity (iOS Modern, Metal)"),
- ("'iOS-27[0-9-]*' 'iPhone 16' iPhone16-fidelity27",
- "'iOS-26[0-9-]*' 'iPhone 16' iPhone16-fidelity"),
- ("name: ios-fidelity-27", "name: ios-fidelity"),
- ("ios-27-metal-fidelity-baseline.json", "ios-26-metal-fidelity-baseline.json"),
- ],
- "required_in_copy": [
- "CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'",
- ],
- "only_in_copy": [
- "CN1SS_FIDELITY_GOLDEN_SET: 'ios-27-metal'",
- "CN1_XCODE_MAJOR: '27'",
- ],
- "only_in_original_steps": [],
- "only_in_copy_steps": [],
- },
-]
-
-
-def job_lines(text, job, path):
- """The body of one job, without its leading comment block."""
- lines = text.split("\n")
- start = None
- for i, line in enumerate(lines):
- if line == f" {job}:":
- start = i
- break
- if start is None:
- sys.exit(f"check-duplicated-ci-legs: job '{job}' not found in {path}")
- body = []
- for line in lines[start + 1:]:
- # A new job starts at exactly two spaces of indent.
- if line and not line.startswith(" ") and not line.startswith("#") and line.strip():
- break
- body.append(line)
- return body
-
-
-def normalise(body, drop_exact, drop_steps):
- out = []
- skipping = False
- for line in body:
- stripped = line.strip()
- if stripped.startswith("- name:"):
- name = stripped[len("- name:"):].strip()
- skipping = name in drop_steps
- if skipping:
- # A dropped step ends where the next step begins.
- if stripped.startswith("- name:") and stripped[len("- name:"):].strip() not in drop_steps:
- skipping = False
- else:
- continue
- if not stripped or stripped.startswith("#"):
- continue # comments and blank lines are prose, not behaviour
- if stripped in drop_exact:
- continue
- out.append(re.sub(r"\s+", " ", stripped))
- return out
-
-
-def main():
- failures = 0
- for pair in PAIRS:
- path = ROOT / pair["workflow"]
- text = path.read_text(encoding="utf-8")
- orig = normalise(job_lines(text, pair["original"], path), set(),
- set(pair["only_in_original_steps"]))
- copy = normalise(job_lines(text, pair["copy"], path), set(pair["only_in_copy"]),
- set(pair["only_in_copy_steps"]))
- # Requirements are checked against the UNFILTERED copy: only_in_copy
- # removes exactly the generation-specific lines a requirement is most
- # likely to name, so checking the filtered list would always report them
- # missing.
- #
- # Declared-extra STEPS are kept here too. A required line may live inside
- # one -- the iOS 27 leg's simulator boot is exactly that -- and checking
- # a list those steps were already removed from would report it missing
- # even when present, or, worse, let a requirement on it be dropped as
- # "unfindable".
- copy_raw = normalise(job_lines(text, pair["copy"], path), set(), set())
- if not orig or not copy:
- sys.exit(f"check-duplicated-ci-legs: {pair['copy']} or {pair['original']} "
- f"parsed empty; the parser is wrong")
- missing = [r for r in pair.get("required_in_copy", [])
- if not any(r in line for line in copy_raw)]
- if missing:
- failures += 1
- print(f"check-duplicated-ci-legs: FAILED -- {pair['copy']} is missing "
- f"line(s) that make it a SEPARATE leg rather than a duplicate of "
- f"{pair['original']}:")
- for m in missing:
- print(f" {m}")
- print(" Without these the copy runs against the original's own "
- "baselines/identity and silently validates nothing.")
- continue
- rewritten = []
- for line in copy:
- for old, new in pair["subs"]:
- line = line.replace(old, new)
- rewritten.append(line)
- if rewritten == orig:
- print(f"check-duplicated-ci-legs: {pair['original']} and {pair['copy']} "
- f"match ({len(orig)} significant lines).")
- continue
- failures += 1
- import difflib
- print(f"check-duplicated-ci-legs: FAILED -- {pair['copy']} has drifted from "
- f"{pair['original']} in {pair['workflow']}.")
- print("If the difference is intended, add it to that pair's subs/only_in_* "
- "entry with a reason.")
- for line in difflib.unified_diff(orig, rewritten, lineterm="",
- fromfile=pair["original"], tofile=pair["copy"]):
- print(line)
- return 1 if failures else 0
-
-
-if __name__ == "__main__":
- sys.exit(main())
diff --git a/scripts/check-native-warnings.py b/scripts/check-native-warnings.py
index ccd5bfa5fd3..abe856fbb52 100755
--- a/scripts/check-native-warnings.py
+++ b/scripts/check-native-warnings.py
@@ -149,7 +149,7 @@
# Same sources, different COMPILER. The census is a per-toolchain ratchet --
# a new warning kind fails it -- and Xcode 27's clang does not emit the same
# set as Xcode 26's, so the iOS 27 leg cannot share ios-sim-debug's baseline.
- # It tried: build-ios-metal-27 inherited that leg, failed the census on the
+ # It tried: the iOS 27 Metal suite inherited that leg, failed the census on the
# difference, and stopped before running a single screenshot.
"ios-sim-debug-xcode27": ["Ports/iOSPort/nativeSources"],
"ios-device-release": ["Ports/iOSPort/nativeSources"],
diff --git a/scripts/ci/android-gesture-nav.sh b/scripts/ci/android-gesture-nav.sh
index b508e98a8b9..b0bdb81eefe 100755
--- a/scripts/ci/android-gesture-nav.sh
+++ b/scripts/ci/android-gesture-nav.sh
@@ -38,11 +38,26 @@ navbar_height() {
| sed -E 's/frame=\[-?[0-9]+,(-?[0-9]+)\]\[-?[0-9]+,(-?[0-9]+)\]/\1 \2/' \
| awk '$2 > $1 { print $2 - $1 }'
}
+# The screen density, or empty when it cannot be read.
+density="$(adb shell wm density 2>/dev/null | tr -d '\r' | grep -oE '[0-9]+' | tail -n 1)"
+# The 3-button bar is 48dp and the gestural one far less (a 24dp handle area at
+# most), whatever the density. Judging the inset in dp needs no "before"
+# reading: measured against one, a bar that was ALREADY gestural when first
+# read could never shrink below itself, and the check restarted SystemUI until
+# it gave up on a correct emulator (seen as "before the switch: 24px").
+is_gestural_height() {
+ [ -n "$1" ] || return 1
+ if [ -n "$density" ] && [ "$density" -gt 0 ]; then
+ [ $(( $1 * 160 / density )) -lt 40 ]
+ else
+ [ "$1" -lt "$buttons_height" ]
+ fi
+}
# The bar is laid out a moment after the mode changes; give it that moment.
navbar_shrank() {
for _ in $(seq 1 20); do
now="$(navbar_height)"
- if [ -n "$now" ] && [ "$now" -lt "$buttons_height" ]; then
+ if is_gestural_height "$now"; then
return 0
fi
sleep 1
@@ -50,6 +65,11 @@ navbar_shrank() {
return 1
}
buttons_height="$(navbar_height)"
+if [ -n "$buttons_height" ] && [ -n "$density" ] && is_gestural_height "$buttons_height" \
+ && [ "$(adb shell settings get secure navigation_mode 2>/dev/null | tr -d '\r')" = 2 ]; then
+ echo "Gesture navigation already active: inset ${buttons_height}px at density ${density}."
+ exit 0
+fi
# The suite re-applies this setup right before it starts (run-android-
# instrumentation-tests.sh), when the first run has already switched the bar.
# Measured then, the "before" height is the gestural one, nothing can shrink
diff --git a/scripts/ci/boot-ios-simulator.sh b/scripts/ci/boot-ios-simulator.sh
index 04e182825e3..4fbed380ac8 100755
--- a/scripts/ci/boot-ios-simulator.sh
+++ b/scripts/ci/boot-ios-simulator.sh
@@ -4,7 +4,7 @@ set -uo pipefail
# Boot a simulator for a CI job, with every simctl call on a deadline.
#
# Usage: scripts/ci/boot-ios-simulator.sh
-# e.g. scripts/ci/boot-ios-simulator.sh 'iOS-26[0-9-]*' 'iPhone 16' iPhone16-fidelity
+# e.g. scripts/ci/boot-ios-simulator.sh 'iOS-27[0-9-]*' 'iPhone 16' iPhone16-fidelity
#
# Writes the UDID to stdout (and to GITHUB_OUTPUT as udid=... when set); every
# log line goes to stderr, so `UDID="$(boot-ios-simulator.sh ...)"` is safe.
diff --git a/scripts/ci/check-ios-cn1lib.py b/scripts/ci/check-ios-cn1lib.py
index 9b232cf204c..0dfb720e7fc 100644
--- a/scripts/ci/check-ios-cn1lib.py
+++ b/scripts/ci/check-ios-cn1lib.py
@@ -40,7 +40,7 @@ def project_spec(ad):
base:
CLANG_ENABLE_MODULES: YES
CODE_SIGNING_ALLOWED: NO
-'''.replace('DEPLOYMENT', '15.0' if ad else '14.0') + header + ''' configs:
+'''.replace('DEPLOYMENT', '15.0') + header + ''' configs:
DebugMRR:
CLANG_ENABLE_OBJC_ARC: NO
DebugARC:
@@ -77,7 +77,15 @@ def check(lib, work):
(work / 'Podfile').write_text(
"platform :ios, '15.0'\n"
"project 'CN1Probe', 'DebugMRR' => :debug, 'DebugARC' => :debug\n"
- "target 'CN1Probe' do\n use_frameworks!\n pod '%s', '%s'\nend\n" % (name, version))
+ "target 'CN1Probe' do\n use_frameworks!\n pod '%s', '%s'\nend\n"
+ # A pod's own targets keep the podspec's deployment target (12.0 for
+ # the Google SDKs), which Xcode 27 refuses outright: its floor is 15.0.
+ # Raise every pod target to the probe's, as the AdMob link probe does.
+ "post_install do |installer|\n"
+ " installer.pods_project.targets.each do |t|\n"
+ " t.build_configurations.each do |c|\n"
+ " c.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'\n"
+ " end\n end\nend\n" % (name, version))
# The spec repo and the pod come from the CDN and GitHub; a 5xx there is
# an outage, not a broken cn1lib, so give it a few minutes to recover.
for attempt in range(1, 5):
diff --git a/scripts/ci/cn1ss-golden-plan.py b/scripts/ci/cn1ss-golden-plan.py
index 78f59f51ea1..6e3735be45c 100644
--- a/scripts/ci/cn1ss-golden-plan.py
+++ b/scripts/ci/cn1ss-golden-plan.py
@@ -30,8 +30,8 @@
// cn1ss-skip: macos, watchos
- using port_status.json's port ids (ios-metal covers both iOS Metal
- directories, ios-metal-27 the Xcode 27 one alone; windows-x64 and
+ using port_status.json's port ids (ios-metal and ios-metal-27 both
+ name the iOS Metal directory; windows-x64 and
windows-arm64 share one). A test whose chain
has a skip guard -- a "status=SKIPPED" line, a conditional
shouldTakeScreenshot(), or an `if (...) { done(); return true; }` early
@@ -58,7 +58,6 @@
# port ids whose runs it holds. Keep in step with the SCREENSHOT_REF_DIR / REF
# values in the screenshot workflows.
DIR_PORTS = {
- "scripts/ios/screenshots-metal": {"ios-metal"},
"scripts/ios/screenshots-metal-27": {"ios-metal-27"},
"scripts/ios/screenshots-tv": {"tvos"},
"scripts/ios/screenshots-watch": {"watchos"},
@@ -70,14 +69,13 @@
"scripts/macos/screenshots": {"macos"},
}
PORTS = set().union(*DIR_PORTS.values())
-# A declaration naming ios-metal means both iOS Metal legs; name ios-metal-27
-# alone for a test only the Xcode 27 leg skips.
-ALIASES = {"ios-metal": {"ios-metal", "ios-metal-27"}}
+# The iOS Metal leg runs on Xcode 27 and its golden directory is keyed
+# ios-metal-27; a declaration naming ios-metal (the published port id) means it.
+ALIASES = {"ios-metal": {"ios-metal-27"}}
# Not here on purpose: scripts/javase/screenshots belongs to the JavaSE
# simulator's own integration run (simulator chrome, not this suite), and
# scripts/wayline/screenshots to the Wayline sample.
GOLDEN_DIRS = [
- "scripts/ios/screenshots-metal",
"scripts/ios/screenshots-metal-27",
"scripts/ios/screenshots-tv",
"scripts/ios/screenshots-watch",
diff --git a/scripts/ci/golden-capture.sh b/scripts/ci/golden-capture.sh
index 109a835d398..4b71e0d8905 100755
--- a/scripts/ci/golden-capture.sh
+++ b/scripts/ci/golden-capture.sh
@@ -11,7 +11,7 @@
# Needs GH_TOKEN (actions: write), DISPATCH_TOKEN (CN1SS_GH_TOKEN) and
# GITHUB_REPOSITORY. Each dispatch is a run
# of its own, so the workflows' concurrency groups and fixed artifact names
-# (the Unity gallery, the port bundles) cannot collide as they would if they
+# (the port bundles) cannot collide as they would if they
# were called inside one run.
set -euo pipefail
@@ -21,9 +21,6 @@ WORKFLOWS=(
scripts-android.yml
scripts-javascript.yml
linux-build-run.yml
- parparvm-tests-windows.yml
- windows-cross-build-run.yml
- scripts-macos.yml
)
log() { echo "[golden-capture] $*" >&2; }
@@ -46,8 +43,9 @@ workflows() {
# golden whenever arm64 anti-aliased a glyph past its allowance, and
# held the capture on the scarcest runner. The other legs are compared
# against it by the normal run the harvest commit starts.
- scripts/windows/*) want+=" parparvm-tests-windows.yml" ;;
- scripts/macos/*) want+=" scripts-macos.yml" ;;
+ # linux-build-run.yml holds all three; a capture skips the other two.
+ scripts/windows/*) want+=" linux-build-run.yml" ;;
+ scripts/macos/*) want+=" scripts-ios.yml" ;;
*) want+=" ${WORKFLOWS[*]}" ;;
esac
done
diff --git a/scripts/ci/golden-harvest.sh b/scripts/ci/golden-harvest.sh
index 10aa0db2dc3..8a0a64d15a9 100755
--- a/scripts/ci/golden-harvest.sh
+++ b/scripts/ci/golden-harvest.sh
@@ -21,6 +21,10 @@ set -euo pipefail
HERE="$(cd "$(dirname "$0")" && pwd)"
# Read from golden-capture.sh so the two lists cannot drift.
mapfile -t WORKFLOWS < <(sed -n '/^WORKFLOWS=(/,/^)/{/^ /s/^ //p;}' "$HERE/golden-capture.sh")
+# A pull request's own runs of those workflows are reusable calls inside
+# ci.yml now, so its runs are where a normal PR run's capture artifacts are.
+# Listed here only: golden-capture.sh dispatches the members, never ci.yml.
+WORKFLOWS+=(ci.yml)
log() { echo "[golden-harvest] $*" >&2; }
diff --git a/scripts/ci/metal-screenshot-summary.py b/scripts/ci/metal-screenshot-summary.py
index eeb8fa74aa3..38b105e1784 100644
--- a/scripts/ci/metal-screenshot-summary.py
+++ b/scripts/ci/metal-screenshot-summary.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
"""Render the Metal screenshot-comparison summary for a GitHub Actions job.
-Called from .github/workflows/scripts-ios.yml's build-ios-metal job.
+Called from .github/workflows/scripts-ios.yml's apple job (iOS Metal and macOS suites).
Reads the screenshot-compare.json produced by scripts/run-ios-ui-tests.sh
and emits either:
diff --git a/scripts/ci/retry.sh b/scripts/ci/retry.sh
index df7822f1294..95ea07dcb26 100755
--- a/scripts/ci/retry.sh
+++ b/scripts/ci/retry.sh
@@ -31,7 +31,7 @@ set -uo pipefail
#
# The value `transient` selects the canonical set below instead of a hand-written
# regex. Every workflow that spelled this out meant the same thing, and they drifted
-# into three different versions: a parparvm-tests run failed for good on
+# into three different versions: a linux-build-run (ParparVM tests) run failed for good on
# "or one of its dependencies could not be resolved" -- a plain Central hiccup that
# two other workflows already knew to retry and that one had never been taught. One
# definition, so the next failure mode is added once.
diff --git a/scripts/ci/select-ci-members.py b/scripts/ci/select-ci-members.py
new file mode 100755
index 00000000000..539ad68c797
--- /dev/null
+++ b/scripts/ci/select-ci-members.py
@@ -0,0 +1,134 @@
+#!/usr/bin/env python3
+"""Decide which member workflows of ci.yml a pull request or push runs.
+
+The member workflows (scripts-ios.yml, linux-build-run.yml, pr.yml, ...) used to
+trigger on their own, each with its own `paths` filter, and so each started on
+every push without waiting for anything. They are now `workflow_call` workflows
+that ci.yml calls after its precheck. Their old filters live in
+.github/ci/ci-members.json, unchanged, and this answers them the way GitHub did:
+
+ * patterns are evaluated in order and the last one matching a file decides
+ (a leading `!` excludes);
+ * `*` matches within one path segment, `**` across segments, `?` one character;
+ * a change to ci.yml, ci-members.json or this script runs everything;
+ * an event a member does not list never runs it; an event with no `paths`
+ always runs it (blog-prose.yml, the branch-only push filters).
+
+Writes `=true|false` lines to $GITHUB_OUTPUT (or stdout) plus `any`.
+
+ scripts/ci/select-ci-members.py --event pull_request --base [--head HEAD]
+ scripts/ci/select-ci-members.py --event workflow_dispatch # everything
+ scripts/ci/select-ci-members.py --event push --files a b c # testing
+"""
+import argparse
+import json
+import os
+import re
+import subprocess
+import sys
+from pathlib import Path
+
+ROOT = Path(__file__).resolve().parent.parent.parent
+MEMBERS = ROOT / ".github" / "ci" / "ci-members.json"
+ZERO = "0" * 40
+
+
+def glob_regex(pattern):
+ out, i = [], 0
+ while i < len(pattern):
+ c = pattern[i]
+ if pattern.startswith("**/", i):
+ out.append("(?:.*/)?")
+ i += 3
+ continue
+ if pattern.startswith("**", i):
+ out.append(".*")
+ i += 2
+ continue
+ if c == "*":
+ out.append("[^/]*")
+ elif c == "?":
+ out.append("[^/]")
+ elif c == "[":
+ j = pattern.find("]", i)
+ if j < 0:
+ out.append(re.escape(c))
+ else:
+ out.append(pattern[i:j + 1])
+ i = j
+ else:
+ out.append(re.escape(c))
+ i += 1
+ return re.compile("^" + "".join(out) + "$")
+
+
+def matches(patterns, files):
+ compiled = [(p.startswith("!"), glob_regex(p.lstrip("!"))) for p in patterns]
+ for f in files:
+ included = False
+ for negated, rx in compiled:
+ if rx.match(f):
+ included = not negated
+ if included:
+ return True
+ return False
+
+
+# A change to the selection itself runs every member: a broken filter must not
+# be able to skip the very workflows that would show it.
+SELF = (".github/workflows/ci.yml", ".github/ci/ci-members.json", "scripts/ci/select-ci-members.py")
+
+
+def select(members, event, files):
+ """files None means 'unknown' (a dispatch, a new branch): run everything."""
+ if files is not None and any(f in SELF for f in files):
+ files = None
+ trigger = "pull_request" if event == "pull_request" else "push"
+ result = {}
+ for name, triggers in members.items():
+ if event == "workflow_dispatch" or files is None:
+ run = True
+ elif trigger not in triggers:
+ run = False
+ else:
+ paths = triggers[trigger].get("paths")
+ run = True if not paths else matches(paths, files)
+ result[name] = run
+ return result
+
+
+def changed_files(base, head):
+ if not base or base == ZERO:
+ return None
+ try:
+ out = subprocess.run(["git", "diff", "--name-only", base + "..." + head],
+ cwd=ROOT, check=True, capture_output=True, text=True).stdout
+ except subprocess.CalledProcessError as e:
+ print("::warning::cannot diff %s...%s (%s); running every member"
+ % (base, head, e.stderr.strip()), file=sys.stderr)
+ return None
+ return [l for l in out.splitlines() if l]
+
+
+def main():
+ ap = argparse.ArgumentParser()
+ ap.add_argument("--event", required=True)
+ ap.add_argument("--base")
+ ap.add_argument("--head", default="HEAD")
+ ap.add_argument("--files", nargs="*")
+ args = ap.parse_args()
+ members = json.loads(MEMBERS.read_text())
+ files = args.files if args.files is not None else (
+ None if args.event == "workflow_dispatch" else changed_files(args.base, args.head))
+ result = select(members, args.event, files)
+ lines = ["%s=%s" % (k, str(v).lower()) for k, v in sorted(result.items())]
+ lines.append("any=%s" % str(any(result.values())).lower())
+ target = os.environ.get("GITHUB_OUTPUT")
+ if target:
+ with open(target, "a") as fh:
+ fh.write("\n".join(lines) + "\n")
+ print("\n".join(lines))
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/ci/test_cn1ss_golden_plan.py b/scripts/ci/test_cn1ss_golden_plan.py
index 0cad07b52a7..e6ab27e7947 100644
--- a/scripts/ci/test_cn1ss_golden_plan.py
+++ b/scripts/ci/test_cn1ss_golden_plan.py
@@ -171,8 +171,8 @@ def test_golden_deleted_with_a_change_to_its_test_is_not_a_gap(self):
fh.write("\n// dropped the light variant\n")
self.assertEqual(f.plan(base=base), ([], []))
- def test_alias_declares_both_metal_directories(self):
- dirs = {"g/phone": {"ios-metal"}, "g/phone27": {"ios-metal-27"}}
+ def test_alias_ios_metal_declares_the_metal_27_directory(self):
+ dirs = {"g/phone27": {"ios-metal-27"}}
src = dict(BASE_SOURCES)
src["WatchSkipScreenshotTest.java"] = src["WatchSkipScreenshotTest.java"].replace(
"cn1ss-skip: watchos", "cn1ss-skip: ios-metal")
diff --git a/scripts/ci/test_select_apple_checks.py b/scripts/ci/test_select_apple_checks.py
index 61b8aa23adb..7e1f1164c38 100644
--- a/scripts/ci/test_select_apple_checks.py
+++ b/scripts/ci/test_select_apple_checks.py
@@ -11,7 +11,7 @@ class AppleSelectionTest(unittest.TestCase):
def test_packaging_only_does_not_expand_to_all_suites(self):
for event in ['push', 'pull_request']:
result = apple.select(['.github/workflows/ios-packaging.yml'], event)
- self.assertEqual({'ios':'false', 'native':'false', 'packaging':'true', 'any':'true'}, result)
+ self.assertEqual({'ios':'false', 'native':'false', 'packaging':'true', 'macos':'false', 'fidelity':'false', 'any':'true'}, result)
def test_no_native_runner_for_independent_cn1lib_or_core_unit_test(self):
for event in ['push', 'pull_request']:
@@ -36,16 +36,16 @@ def test_workflow_specific_changes_are_selected(self):
self.assertEqual('true', apple.select(['.github/workflows/' + name])[key])
def test_packaging_ignores_baselines_its_smoke_never_reads(self):
- # The packaging smoke compares against scripts/ios/screenshots-metal (the
+ # The packaging smoke compares against scripts/ios/screenshots-metal-27 (the
# default reference dir, whose size is also its count floor), so that one
- # still selects it. The 27, TV and watch baselines belong to other legs.
+ # still selects it. The TV and watch baselines belong to other legs.
for event in ['push', 'pull_request']:
- for path in ['scripts/ios/screenshots-metal-27/a.png', 'scripts/ios/screenshots-tv/a.png',
+ for path in ['scripts/ios/screenshots-tv/a.png',
'scripts/ios/screenshots-watch/a.png']:
result = apple.select([path], event)
self.assertEqual('false', result['packaging'], (path, event))
self.assertEqual('true', result['ios'], (path, event))
- self.assertEqual('true', apple.select(['scripts/ios/screenshots-metal/a.png'], event)['packaging'])
+ self.assertEqual('true', apple.select(['scripts/ios/screenshots-metal-27/a.png'], event)['packaging'])
self.assertEqual('true', apple.select(['scripts/ios/create-shared-scheme.py'], event)['packaging'])
def test_globs_match_github_path_semantics(self):
diff --git a/scripts/ci/test_select_ci_members.py b/scripts/ci/test_select_ci_members.py
new file mode 100644
index 00000000000..f5c5f1d286c
--- /dev/null
+++ b/scripts/ci/test_select_ci_members.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+"""Unit tests for select-ci-members.py (run by check-workflows.yml)."""
+import importlib.util
+import json
+import os
+import unittest
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+spec = importlib.util.spec_from_file_location("sel", os.path.join(HERE, "select-ci-members.py"))
+sel = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(sel)
+MEMBERS = json.loads(sel.MEMBERS.read_text())
+
+
+class SelectTest(unittest.TestCase):
+ def test_globs(self):
+ self.assertTrue(sel.matches(["CodenameOne/src/**"], ["CodenameOne/src/a/b.java"]))
+ self.assertFalse(sel.matches(["scripts/*.sh"], ["scripts/a/b.sh"]))
+ self.assertTrue(sel.matches(["scripts/*.sh"], ["scripts/b.sh"]))
+ self.assertTrue(sel.matches(["**/*.md"], ["README.md"]))
+
+ def test_last_match_wins(self):
+ pats = ["CodenameOne/src/**", "!CodenameOne/src/**/*.md"]
+ self.assertFalse(sel.matches(pats, ["CodenameOne/src/a/x.md"]))
+ self.assertTrue(sel.matches(pats, ["CodenameOne/src/a/x.md", "CodenameOne/src/a/x.java"]))
+
+ def test_member_filters(self):
+ r = sel.select(MEMBERS, "pull_request", ["Ports/iOSPort/src/a.java"])
+ self.assertTrue(r["scripts-ios"])
+ self.assertFalse(r["scripts-android"])
+ # No paths at all (blog-prose) runs on every pull request.
+ self.assertTrue(sel.select(MEMBERS, "pull_request", ["README.md"])["blog-prose"])
+ # developer-guide-docs never had a push trigger.
+ self.assertFalse(sel.select(MEMBERS, "push", ["docs/developer-guide/a.adoc"])["developer-guide-docs"])
+
+ def test_unknown_or_self_runs_everything(self):
+ for files in (None, [".github/workflows/ci.yml"], ["scripts/ci/select-ci-members.py"]):
+ self.assertTrue(all(sel.select(MEMBERS, "pull_request", files).values()), files)
+ self.assertTrue(all(sel.select(MEMBERS, "workflow_dispatch", ["README.md"]).values()))
+
+ def test_every_member_is_called_by_ci(self):
+ root = sel.ROOT
+ ci = (root / ".github/workflows/ci.yml").read_text()
+ for m in MEMBERS:
+ self.assertIn("uses: ./.github/workflows/%s.yml" % m, ci)
+ wf = (root / (".github/workflows/%s.yml" % m)).read_text()
+ self.assertIn("workflow_call:", wf, m)
+ self.assertNotIn("\n pull_request:", wf, m)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/scripts/dash/README.adoc b/scripts/dash/README.adoc
index 66a239b89f5..caaba791fc4 100644
--- a/scripts/dash/README.adoc
+++ b/scripts/dash/README.adoc
@@ -94,7 +94,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test # <2>
<4> Generates a project from the Initializr template, under another name and
package, and builds it.
-`.github/workflows/dash.yml` runs them, and builds the app for Android and
+`.github/workflows/samples.yml` runs them, and builds the app for Android and
iOS.
== The Initializr template
diff --git a/scripts/developer-guide/validate-guide-snippets.py b/scripts/developer-guide/validate-guide-snippets.py
index 89235e3b8f9..84c9e5d6d36 100755
--- a/scripts/developer-guide/validate-guide-snippets.py
+++ b/scripts/developer-guide/validate-guide-snippets.py
@@ -136,7 +136,7 @@ def validate_includes(includes):
java_snippets = []
for item in includes:
# The Wayline, Savor, Skirmish, Dash and Parley chapters show the sample applications themselves,
- # which are built and tested by wayline.yml, savor.yml, skirmish.yml, dash.yml and parley.yml, so they include its sources directly
+ # which are built and tested by samples.yml, so they include its sources directly
# rather than through copies under docs/demos that could drift from it.
if not item["target"].startswith(INCLUDE_ROOTS):
errors.append(
diff --git a/scripts/fidelity-app/README.md b/scripts/fidelity-app/README.md
index eb2f81206cc..0ef07f152d8 100644
--- a/scripts/fidelity-app/README.md
+++ b/scripts/fidelity-app/README.md
@@ -34,7 +34,7 @@ pinned to the OS **design generation** it was captured on:
- `goldens/ios-26-metal` (+ `-frames`, `-anim`) -- captured on an iOS 26
simulator runtime; the CI job asserts a matching runtime before running.
- `goldens/android-m3` -- captured on the same emulator profile the CI uses
- (API level + 160dpi; see `.github/workflows/scripts-fidelity.yml`).
+ (API level + 160dpi; see `.github/workflows/scripts-android.yml`).
Each set has its own ratchet baseline
(`baseline/-fidelity-baseline.json`). When a new design generation lands
@@ -131,7 +131,7 @@ xcodebuild -workspace -scheme FidelityApp \
To re-seed in a fresh environment:
`FIDELITY_UPDATE_GOLDENS=1 FIDELITY_UPDATE_BASELINE=1 ./scripts/run-...`.
-CI runs both platforms in `.github/workflows/scripts-fidelity.yml`, gating PRs
+CI runs Android in `.github/workflows/scripts-android.yml` and iOS in `.github/workflows/scripts-ios.yml` (the `apple` job), gating PRs
that change the iOS Modern or Android Material CSS theme sources. Other changes
can be tested deliberately with the workflow's manual dispatch.
diff --git a/scripts/fidelity-app/android-native-ref/app/src/main/java/com/codenameone/fidelity/nativeref/MainActivity.java b/scripts/fidelity-app/android-native-ref/app/src/main/java/com/codenameone/fidelity/nativeref/MainActivity.java
index e0f8777c1ef..f0b5821b4f8 100644
--- a/scripts/fidelity-app/android-native-ref/app/src/main/java/com/codenameone/fidelity/nativeref/MainActivity.java
+++ b/scripts/fidelity-app/android-native-ref/app/src/main/java/com/codenameone/fidelity/nativeref/MainActivity.java
@@ -50,7 +50,7 @@
* android-m3 golden set.
*
* The golden-set contract: capture on the SAME emulator profile the fidelity
- * CI uses (API level + 160dpi -- see scripts-fidelity.yml). Tile pixel sizes
+ * CI uses (API level + 160dpi -- see scripts-android.yml). Tile pixel sizes
* derive from mm exactly like the CN1 side (mm * dpi / 25.4), so at 160dpi a
* 60mm tile is the same 377px on both sides.
*/
diff --git a/scripts/fieldline/README.adoc b/scripts/fieldline/README.adoc
index d839d7111c1..f0c27a03d1c 100644
--- a/scripts/fieldline/README.adoc
+++ b/scripts/fieldline/README.adoc
@@ -189,7 +189,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
`npx playwright install chromium` in `scripts/`). Screenshots and logs go
to `target/web-e2e`.
-`.github/workflows/fieldline.yml` runs all five, and builds the application for
+`.github/workflows/samples.yml` runs all five, and builds the application for
Android and iOS through `scripts/build-android-app.sh` and
`scripts/build-ios-app.sh` with `CN1_APP_DIR=scripts/fieldline`.
diff --git a/scripts/hellocodenameone/common/pom.xml b/scripts/hellocodenameone/common/pom.xml
index e9912446810..99770e9c930 100644
--- a/scripts/hellocodenameone/common/pom.xml
+++ b/scripts/hellocodenameone/common/pom.xml
@@ -15,13 +15,6 @@
${project.basedir}/../../android-compat-samples/gallery/app/src/main
-
- ${project.basedir}/../../unity-compat-samples/gallery
@@ -31,11 +24,6 @@
codenameone-android-compat
-
- com.codenameone
- codenameone-unity-compat
-
-
com.codenameone
codenameone-core
@@ -520,18 +508,6 @@
prepare-desktop-sources
-
-
- compile-unity
- generate-sources
-
- compile-unity
-
-
- ${unity.gallery.dir}
-
-
generate-gui-sources
process-sources
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.java
index 48d1a1ba260..a3e58134c34 100644
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.java
+++ b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/Cn1ssDeviceRunner.java
@@ -46,14 +46,6 @@
import com.codenameone.examples.hellocodenameone.tests.androidcompat.AndroidCompatMaterialScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.androidcompat.AndroidCompatKotlinScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.androidcompat.AndroidCompatTallDialogScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatAnimatorScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatCanvasScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatCinemachineScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatParticlesScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatPhysicsScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatSpritesScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatTextMeshProScreenshotTest;
-import com.codenameone.examples.hellocodenameone.tests.unitycompat.UnityCompatTilemapScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.desktopcompat.DesktopCompatSwingControlsScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.desktopcompat.DesktopCompatSwingTablesScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.desktopcompat.DesktopCompatSwingTreesScreenshotTest;
@@ -139,6 +131,7 @@
import com.codenameone.examples.hellocodenameone.tests.charts.Chart2SankeyScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.charts.Chart2FunnelScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.charts.Chart2SparklinesScreenshotTest;
+import com.codenameone.examples.hellocodenameone.tests.charts.Chart2SharedTooltipScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.charts.Chart2BrushScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.charts.Chart2GrowInAnimationScreenshotTest;
import com.codenameone.examples.hellocodenameone.tests.charts.Chart2DataChangeAnimationScreenshotTest;
@@ -479,8 +472,7 @@ private static int testTimeoutMs(BaseTest testClass) {
new Chart2SankeyScreenshotTest(),
new Chart2FunnelScreenshotTest(),
new Chart2SparklinesScreenshotTest(),
- // Disabled: its capture raced the hover repaint and the goldens never showed the tooltip.
- // new Chart2SharedTooltipScreenshotTest(),
+ new Chart2SharedTooltipScreenshotTest(),
new Chart2BrushScreenshotTest(),
new Chart2FlameGraphScreenshotTest(),
new Chart2LineStylesScreenshotTest(),
@@ -811,21 +803,6 @@ private static int testTimeoutMs(BaseTest testClass) {
new AndroidCompatMaterialScreenshotTest(),
new AndroidCompatKotlinScreenshotTest(),
new AndroidCompatTallDialogScreenshotTest(),
- // The Unity compatibility gallery (scripts/unity-compat-samples/gallery),
- // compiled into this app from its unmodified Unity project: one capture per
- // scene, each loaded by itself, stepped a fixed number of fixed frames with
- // the view's clock held, and taken down again. Here for the reason the Android
- // gallery is: the runtime it installs cannot shift an existing baseline, and
- // DesktopMode stays the last ordinary capture. They draw through the GPU and
- // pass without a capture where there is none.
- new UnityCompatSpritesScreenshotTest(),
- new UnityCompatPhysicsScreenshotTest(),
- new UnityCompatCanvasScreenshotTest(),
- new UnityCompatTilemapScreenshotTest(),
- new UnityCompatAnimatorScreenshotTest(),
- new UnityCompatParticlesScreenshotTest(),
- new UnityCompatTextMeshProScreenshotTest(),
- new UnityCompatCinemachineScreenshotTest(),
// The desktop compatibility layers: Swing, SwingX and JavaFX screens that this
// app compiles from common/src/main/desktop in library mode (no entry point of
// their own) and embeds in forms of its own, plus one modal dialog of each
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatAnimatorScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatAnimatorScreenshotTest.java
deleted file mode 100644
index 9d7b3ff4796..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatAnimatorScreenshotTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-/// Animators part way through a clip, after a transition and after a trigger.
-public class UnityCompatAnimatorScreenshotTest extends UnityScreenshotTest {
- public UnityCompatAnimatorScreenshotTest() {
- super("Animator");
- }
-}
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatCanvasScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatCanvasScreenshotTest.java
deleted file mode 100644
index 0c66ce60d21..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatCanvasScreenshotTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-/// A UI canvas: anchored text, images, a slider and a button.
-public class UnityCompatCanvasScreenshotTest extends UnityScreenshotTest {
- public UnityCompatCanvasScreenshotTest() {
- super("Canvas");
- }
-}
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatCinemachineScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatCinemachineScreenshotTest.java
deleted file mode 100644
index 9857f490707..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatCinemachineScreenshotTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-/// A Cinemachine virtual camera that has followed its target away from the origin.
-public class UnityCompatCinemachineScreenshotTest extends UnityScreenshotTest {
- public UnityCompatCinemachineScreenshotTest() {
- super("Cinemachine");
- }
-}
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatPhysicsScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatPhysicsScreenshotTest.java
deleted file mode 100644
index e70bcd47ee7..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatPhysicsScreenshotTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-/// Physics2D: dynamic boxes and circles come to rest on static colliders.
-public class UnityCompatPhysicsScreenshotTest extends UnityScreenshotTest {
- public UnityCompatPhysicsScreenshotTest() {
- super("Physics");
- }
-}
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatSpritesScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatSpritesScreenshotTest.java
deleted file mode 100644
index 977369ead32..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatSpritesScreenshotTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-/// Sprites: tint, flip, scale, rotation, sorting order and a script that turns one.
-public class UnityCompatSpritesScreenshotTest extends UnityScreenshotTest {
- public UnityCompatSpritesScreenshotTest() {
- super("Sprites");
- }
-}
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatTextMeshProScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatTextMeshProScreenshotTest.java
deleted file mode 100644
index 87b97e08093..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatTextMeshProScreenshotTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-/// TextMesh Pro text, in the world and on a canvas.
-public class UnityCompatTextMeshProScreenshotTest extends UnityScreenshotTest {
- public UnityCompatTextMeshProScreenshotTest() {
- super("TextMeshPro");
- }
-}
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatTilemapScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatTilemapScreenshotTest.java
deleted file mode 100644
index dde7e936c72..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityCompatTilemapScreenshotTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-/// A tilemap with its collider, and bodies resting on it.
-public class UnityCompatTilemapScreenshotTest extends UnityScreenshotTest {
- public UnityCompatTilemapScreenshotTest() {
- super("Tilemap");
- }
-}
diff --git a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityScreenshotTest.java b/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityScreenshotTest.java
deleted file mode 100644
index aca3d34d578..00000000000
--- a/scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests/unitycompat/UnityScreenshotTest.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Codename One designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Codename One through http://www.codenameone.com/ if you
- * need additional information or have any questions.
- */
-package com.codenameone.examples.hellocodenameone.tests.unitycompat;
-
-import com.codename1.generated.unity.UnityAppImpl;
-import com.codename1.ui.CN;
-import com.codename1.ui.Display;
-import com.codename1.ui.Form;
-import com.codename1.ui.layouts.BorderLayout;
-import com.codename1.ui.util.UITimer;
-import com.codename1.unitycompat.unityengine.Random;
-import com.codename1.unitycompat.unityengine.UnityRuntime;
-import com.codename1.unitycompat.unityengine.ui.UnityGameView;
-import com.codenameone.examples.hellocodenameone.tests.BaseTest;
-
-/// One scene of the Unity compatibility gallery
-/// (scripts/unity-compat-samples/gallery), which this app compiles from its
-/// Unity project unmodified. The test loads the scene by itself into a game
-/// view whose clock is held, steps it a fixed number of frames of a fixed
-/// length -- so the picture does not depend on how fast the device draws --
-/// captures the form, and takes the runtime down again: no object, no clock
-/// and no view of this scene is left for the next test.
-///
-/// A scene is drawn by the GPU, as every Unity scene is. On a port without
-/// one the test passes without a capture, the way `Gpu3DCubeScreenshotTest`
-/// does.
-public abstract class UnityScreenshotTest extends BaseTest {
- // cn1ss-skip: macos, watchos -- captures nothing on these ports (the guard below);
- // scripts/ci/cn1ss-golden-plan.py expects a golden everywhere else.
- /// The frames every scene is stepped, and the length of each: a second
- /// and a half of a game running at sixty frames a second, which is long
- /// enough for a body to come to rest and for an animator to be well into
- /// its second clip.
- private static final int FRAMES = 90;
- private static final float FRAME_SECONDS = 1f / 60;
- /// How long the steps may take to be drawn before the test gives up.
- private static final int STEP_BUDGET_MILLIS = 20000;
- private static final int POLL_MILLIS = 50;
- /// After the last step was drawn: the peer presents a frame later than
- /// it renders it on some ports, and the view is still, so waiting costs
- /// nothing but time.
- private static final int PRESENT_MILLIS = 1000;
-
- private final String scene;
- private final String imageName;
- private UnityGameView view;
-
- /// `scene` is the name of the scene's file without `.unity`.
- protected UnityScreenshotTest(String scene) {
- this.scene = scene;
- this.imageName = "UnityCompat" + scene;
- }
-
- @Override
- public boolean shouldTakeScreenshot() {
- return CN.isGpuSupported();
- }
-
- /// The index of the scene in the gallery's build settings, or -1.
- private int sceneIndex() {
- String file = "/" + scene + ".unity";
- int n = UnityRuntime.$sceneCount();
- for (int i = 0; i < n; i++) {
- String path = "/" + UnityRuntime.$scenePath(i);
- if (path.endsWith(file)) {
- return i;
- }
- }
- return -1;
- }
-
- /// Stops the view and empties the runtime. Also what a rerun starts
- /// with, so an attempt that timed out leaves nothing running.
- private void tearDown() {
- if (view != null) {
- view.stop();
- view.remove();
- view = null;
- }
- UnityRuntime.reset();
- }
-
- @Override
- public boolean runTest() throws Exception {
- if (!CN.isGpuSupported()) {
- done();
- return true;
- }
- tearDown();
- // The same numbers on every run, for the scenes that ask for random
- // ones (the particle systems).
- Random.InitState(1);
- UnityAppImpl.install();
- int index = sceneIndex();
- if (index < 0) {
- UnityRuntime.reset();
- fail("the gallery has no scene named " + scene);
- return false;
- }
- final UnityGameView gameView = new UnityGameView();
- if (!gameView.isSupported()) {
- UnityRuntime.reset();
- done();
- return true;
- }
- view = gameView;
- gameView.installServices();
- Display display = Display.getInstance();
- UnityRuntime.resize(display.getDisplayWidth(), display.getDisplayHeight());
- UnityRuntime.begin(index);
- final Form form = new Form(new BorderLayout());
- form.getTitleArea().setHidden(true);
- if (form.getToolbar() != null) {
- form.getToolbar().setHidden(true);
- }
- form.setScrollable(false);
- form.getContentPane().getAllStyles().setPadding(0, 0, 0, 0);
- form.getContentPane().getAllStyles().setMargin(0, 0, 0, 0);
- form.add(BorderLayout.CENTER, gameView);
- // Held before it starts: the frames the display draws before the
- // steps below must not move anything.
- gameView.holdClock();
- gameView.start();
- final int before = gameView.framesAdvanced();
- gameView.advance(FRAMES, FRAME_SECONDS);
- form.show();
- awaitSteps(form, gameView, before, 0);
- return true;
- }
-
- /// Waits for the frame that runs the steps to have been drawn, then for
- /// it to be on screen, then captures.
- private void awaitSteps(final Form form, final UnityGameView gameView, final int before, final int waited) {
- if (view != gameView) {
- // Torn down by a rerun; this attempt is over.
- return;
- }
- if (gameView.framesAdvanced() - before >= FRAMES) {
- UITimer.timer(PRESENT_MILLIS, false, form, new Runnable() {
- @Override
- public void run() {
- if (view != gameView) {
- return;
- }
- captureWhenSettled(form, imageName, new Runnable() {
- @Override
- public void run() {
- tearDown();
- done();
- }
- });
- }
- });
- return;
- }
- if (waited >= STEP_BUDGET_MILLIS) {
- int ran = gameView.framesAdvanced() - before;
- tearDown();
- fail(scene + ": " + ran + " of " + FRAMES + " frames were drawn in " + waited + " ms");
- return;
- }
- UITimer.timer(POLL_MILLIS, false, form, new Runnable() {
- @Override
- public void run() {
- awaitSteps(form, gameView, before, waited + POLL_MILLIS);
- }
- });
- }
-}
diff --git a/scripts/hellocodenameone/conformance/test_ci_reporting.py b/scripts/hellocodenameone/conformance/test_ci_reporting.py
index 58d8223d67d..c9bebac5ce7 100644
--- a/scripts/hellocodenameone/conformance/test_ci_reporting.py
+++ b/scripts/hellocodenameone/conformance/test_ci_reporting.py
@@ -14,7 +14,7 @@
class ReportingTests(unittest.TestCase):
def test_native_x64_artifacts_cannot_replace_shipping_evidence(self):
- workflow = (ROOT / ".github/workflows/parparvm-tests-windows.yml").read_text()
+ workflow = (ROOT / ".github/workflows/linux-build-run.yml").read_text()
x64 = workflow.split(" windows-port-screenshot-comment-x64:", 1)[1].split(
" windows-port-screenshot-comment-arm64:", 1)[0]
artifacts = re.findall(r"uses: \./\.github/actions/upload-artifact-with-retry\s+with:\s+name: (\S+)", x64)
@@ -23,7 +23,7 @@ def test_native_x64_artifacts_cannot_replace_shipping_evidence(self):
self.assertNotIn("publish_port_status.sh", x64)
manifest = json.loads((ROOT / "docs/website/data/port_status.json").read_text())
port = next(port for port in manifest["ports"] if port["id"] == "windows-x64")
- self.assertEqual("windows-cross-build-run.yml", port["workflow"])
+ self.assertEqual("linux-build-run.yml", port["workflow"])
def run_gate(self, compare, artifacts, strict=True):
env = dict(os.environ, CN1SS_PORT_ID="windows-x64",
diff --git a/scripts/hellocodenameone/conformance/test_port_status.py b/scripts/hellocodenameone/conformance/test_port_status.py
index 5072cd3cc17..fe8c842f45a 100755
--- a/scripts/hellocodenameone/conformance/test_port_status.py
+++ b/scripts/hellocodenameone/conformance/test_port_status.py
@@ -1562,7 +1562,7 @@ def test_the_macos_port_is_registered(self):
)
by_id = {port["id"]: port for port in self.manifest["ports"]}
- self.assertEqual("scripts-macos.yml", by_id["macos"]["workflow"])
+ self.assertEqual("scripts-ios.yml", by_id["macos"]["workflow"])
self.assertIn(
"scripts/macos/screenshots", self.manifest["golden_directories"])
diff --git a/scripts/hellocodenameone/pom.xml b/scripts/hellocodenameone/pom.xml
index 8910a17c372..169f53f8391 100644
--- a/scripts/hellocodenameone/pom.xml
+++ b/scripts/hellocodenameone/pom.xml
@@ -79,11 +79,6 @@
codenameone-compose-compat
${cn1.version}
-
- com.codenameone
- codenameone-unity-compat
- ${cn1.version}
-
com.codenameone
codenameone-buildclient
diff --git a/scripts/initializr/common/src/main/resources/skill/tools/StoreAudit.java b/scripts/initializr/common/src/main/resources/skill/tools/StoreAudit.java
index ea3736ea523..54eafa41411 100644
--- a/scripts/initializr/common/src/main/resources/skill/tools/StoreAudit.java
+++ b/scripts/initializr/common/src/main/resources/skill/tools/StoreAudit.java
@@ -416,7 +416,10 @@ static void checkSecurity() {
static void checkAndroid() {
StringBuilder perms = new StringBuilder();
for (String k : hints.stringPropertyNames()) {
- if (k.startsWith("codename1.arg.android.")) {
+ // Every build hint, not just the android ones: only Android hints carry
+ // "android.permission." text, and naming the android prefix here reads to
+ // scripts/check-build-hint-catalog.py as a nonexistent "android.*" hint.
+ if (k.startsWith("codename1.arg.")) {
perms.append(hints.getProperty(k)).append('\n');
}
}
diff --git a/scripts/initializr/common/src/test/java/com/codename1/initializr/model/GeneratorModelMatrixTest.java b/scripts/initializr/common/src/test/java/com/codename1/initializr/model/GeneratorModelMatrixTest.java
index fc241a384ae..bd32254ca52 100644
--- a/scripts/initializr/common/src/test/java/com/codename1/initializr/model/GeneratorModelMatrixTest.java
+++ b/scripts/initializr/common/src/test/java/com/codename1/initializr/model/GeneratorModelMatrixTest.java
@@ -473,9 +473,9 @@ private void assertFullStackProject(Template template, Map entri
"package " + packageName + ";", label + "the server moves to the project's package");
assertNotNull(entries.get("backend/src/main/resources/db/migration/" + (game ? "V1__game.sql" : bank ? "V4__accounts.sql" : studio || booking ? "V2__accounts.sql" : "V1__accounts.sql")),
label + "the server keeps its migrations");
- assertNotNull(entries.get("backend/src/test/java/" + packagePath + (arena ? "/RunTest.java" : game ? "/GameSocketTest.java" : rides ? "/RideFlowTest.java" : chat ? "/MessagingTest.java" : bank ? "/LedgerTest.java" : video ? "/PlaybackTest.java" : studio ? "/StudioTest.java" : field ? "/FieldTest.java" : booking ? "/booking/BookingFlowTest.java" : "/OrderFlowTest.java")),
+ assertNotNull(entries.get("backend/src/test/java/" + packagePath + (arena ? "/RunTest.java" : game ? "/GameSocketTest.java" : rides ? "/RideFlowTest.java" : chat ? "/MessagingTest.java" : bank ? "/LedgerTest.java" : video ? "/PlaybackTest.java" : studio ? "/StudioTest.java" : field ? "/FieldTest.java" : shop ? "/AccountTest.java" : booking ? "/booking/BookingFlowTest.java" : "/OrderFlowTest.java")),
label + "the server keeps its tests");
- assertNotNull(entries.get("common/src/main/java/" + packagePath + (game ? "/ui/HomeForm.java" : rides ? "/rider/RiderForm.java" : chat ? "/ui/ChatForm.java" : bank ? "/ui/HomeForm.java" : video ? "/ui/WelcomeForm.java" : studio ? "/member/MemberForm.java" : field ? "/field/TodayForm.java" : booking ? "/client/ClientForm.java" : "/customer/CustomerForm.java")),
+ assertNotNull(entries.get("common/src/main/java/" + packagePath + (game ? "/ui/HomeForm.java" : rides ? "/rider/RiderForm.java" : chat ? "/ui/ChatForm.java" : bank ? "/ui/HomeForm.java" : video ? "/ui/WelcomeForm.java" : studio ? "/member/MemberForm.java" : field ? "/field/TodayForm.java" : shop ? "/shop/CheckoutForm.java" : booking ? "/client/ClientForm.java" : "/customer/CustomerForm.java")),
label + "the app's screens move to the project's package");
if (!game) {
assertNotNull(entries.get("common/src/main/l10n/Bundle.properties"), label + "the app keeps its bundle");
@@ -510,6 +510,15 @@ private void assertFullStackProject(Template template, Map entri
// for busy time and writes appointments into them.
assertContains(settings, "codename1.arg.ios.NSCalendarsFullAccessUsageDescription=",
label + "the template's iOS calendar prompt");
+ } else if (shop) {
+ // The shop asks for no location; the camera scans product codes.
+ assertContains(settings, "codename1.arg.ios.NSCameraUsageDescription=",
+ label + "the template's iOS camera prompt");
+ } else if (chat) {
+ // The messenger asks for no location; it records voice and video
+ // for chats and calls.
+ assertContains(settings, "codename1.arg.ios.NSMicrophoneUsageDescription=",
+ label + "the template's iOS microphone prompt");
} else if (!game) {
assertContains(settings, "codename1.arg.ios.NSLocationWhenInUseUsageDescription=",
label + "the template's iOS location prompt");
diff --git a/scripts/input-validation-app/drivers/run-ios.sh b/scripts/input-validation-app/drivers/run-ios.sh
index a11b857134e..7e28a1fe8de 100755
--- a/scripts/input-validation-app/drivers/run-ios.sh
+++ b/scripts/input-validation-app/drivers/run-ios.sh
@@ -107,6 +107,14 @@ if [ -z "$SIM_UDID" ]; then
iv_log "No exact device match -- picking the newest available iPhone"
while IFS=$'\t' read -r runtime name udid; do
case "$name" in
+ # Never the iPhone Duo. It sorts after every numbered iPhone, so on an
+ # Xcode 27 runner it was always the device picked, and XCUITest's typeKey
+ # never reaches the app on it: the WKWebView input and the CN1 TextField
+ # both had focus (focusin logged, software keyboard up) and no key
+ # arrived, so browserkeytype and keytype timed out while tap, drag and
+ # longpress passed. The same build passes both on an iPhone 17 Pro with
+ # the iOS 27.0 runtime.
+ *Duo*) ;;
iPhone*) SIM_UDID="$udid"; DEVICE_NAME="$name"; DEVICE_RUNTIME="$runtime" ;;
esac
done < <(read_devices)
diff --git a/scripts/ios/screenshots-metal-27/README.md b/scripts/ios/screenshots-metal-27/README.md
index 78e6591a349..278dafa8886 100644
--- a/scripts/ios/screenshots-metal-27/README.md
+++ b/scripts/ios/screenshots-metal-27/README.md
@@ -1,17 +1,14 @@
# iOS 27 screenshot baselines
-Reference images for the `build-ios-metal-27` job in
+Reference images for the the iOS Metal suite of the `apple` job job in
`.github/workflows/scripts-ios.yml`, which runs the same `scripts/hellocodenameone`
-suite as `build-ios-metal` on the Xcode 27 / iOS 27 image.
-
-Separate from `../screenshots-metal` on purpose: that set is the iOS 26 toolchain
-we actually pin (`CN1_XCODE_MAJOR`), and it keeps gating what applications are
-built with today. This set is what stops iOS 27 breaking us in the gap before
-that pin moves.
+suite on the Xcode 27 / iOS 27 image. It is the only iOS Metal golden set: the
+iOS 26 leg and its `screenshots-metal` directory were removed once Xcode 27
+became the default toolchain.
## Provenance
-Captured by `build-ios-metal-27` on the GitHub `xcode-27` image (macOS 27.0,
+Captured by the iOS Metal suite of the `apple` job on the GitHub `xcode-27` image (macOS 27.0,
Xcode 27.0), on an **iPhone 16 running iOS 27.0** created by the job itself --
that image pre-creates iPhone 17 / 17e / 18 Pro / 18 Pro Max / Air and no
iPhone 16, so the leg makes one rather than accepting a fallback device. Same
@@ -22,7 +19,7 @@ Reviewed before being accepted, against the iOS 26 set:
| check | result |
|---|---|
-| completeness | 155 images, exact name parity with `../screenshots-metal` |
+| completeness | 155 images, exact name parity with the iOS 26 set it replaced |
| divergence from iOS 26 | 154 of 155 differ (0.6% byte-identical) |
| the 40 modern-theme images | 40 of 40 differ |
@@ -36,11 +33,11 @@ The near-total divergence in the other 115 is expected and is not evidence of a
theme change: they render the legacy iOS 7 theme, and differ because the runtime
does (iOS 26.3 against 27.0 -- different SF font revision, different system
chrome). That is also why this is a full independent set rather than a sparse
-overlay on `../screenshots-metal`; there is essentially nothing to share.
+overlay on the iOS 26 set; there is essentially nothing to share.
## The .tolerance sidecars
-Copied from `../screenshots-metal`, one per test that is known not to render
+Copied from the iOS 26 set, one per test that is known not to render
byte-identically run to run -- vector and GPU-heavy screens with anti-aliasing
jitter, and the ones that draw live map or web content. They are the same 19
files and the same thresholds as the iOS 26 set, because the instability is a
@@ -60,6 +57,6 @@ whose own output jitters.
## Updating afterwards
-As for `../screenshots-metal`: run the job, pull the artifact, compare the
+Run the job, pull the artifact, compare the
"different" tests side by side with the previous baseline, accept only what is
intentional, and commit.
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatAnimator.png b/scripts/ios/screenshots-metal-27/UnityCompatAnimator.png
deleted file mode 100644
index a86197578bf..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatCanvas.png b/scripts/ios/screenshots-metal-27/UnityCompatCanvas.png
deleted file mode 100644
index b2dcb1e8ff6..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatCinemachine.png b/scripts/ios/screenshots-metal-27/UnityCompatCinemachine.png
deleted file mode 100644
index 91c4b71a8f4..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatParticles.png b/scripts/ios/screenshots-metal-27/UnityCompatParticles.png
deleted file mode 100644
index a76385394ce..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatPhysics.png b/scripts/ios/screenshots-metal-27/UnityCompatPhysics.png
deleted file mode 100644
index f24c013f43c..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatSprites.png b/scripts/ios/screenshots-metal-27/UnityCompatSprites.png
deleted file mode 100644
index 4d973b0c9f7..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatTextMeshPro.png b/scripts/ios/screenshots-metal-27/UnityCompatTextMeshPro.png
deleted file mode 100644
index dbd4b87ff5a..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/UnityCompatTilemap.png b/scripts/ios/screenshots-metal-27/UnityCompatTilemap.png
deleted file mode 100644
index fb7411c216d..00000000000
Binary files a/scripts/ios/screenshots-metal-27/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal-27/chart2-shared-tooltip.png b/scripts/ios/screenshots-metal-27/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..b84e22722f1
Binary files /dev/null and b/scripts/ios/screenshots-metal-27/chart2-shared-tooltip.png differ
diff --git a/scripts/ios/screenshots-metal/AdsScreen.png b/scripts/ios/screenshots-metal/AdsScreen.png
deleted file mode 100644
index 3ec529f8040..00000000000
Binary files a/scripts/ios/screenshots-metal/AdsScreen.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatAppCompat.png b/scripts/ios/screenshots-metal/AndroidCompatAppCompat.png
deleted file mode 100644
index 0eeef69d6ae..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatAppCompat.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatConstraint.png b/scripts/ios/screenshots-metal/AndroidCompatConstraint.png
deleted file mode 100644
index 736a8908432..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatConstraint.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatData.png b/scripts/ios/screenshots-metal/AndroidCompatData.png
deleted file mode 100644
index 281ecb55bc2..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatData.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatDetail.png b/scripts/ios/screenshots-metal/AndroidCompatDetail.png
deleted file mode 100644
index cd97ee60528..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatDetail.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatFragments.png b/scripts/ios/screenshots-metal/AndroidCompatFragments.png
deleted file mode 100644
index e8a385551a6..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatFragments.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatInputs.png b/scripts/ios/screenshots-metal/AndroidCompatInputs.png
deleted file mode 100644
index c5b0a494e2c..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatInputs.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatJetpack.png b/scripts/ios/screenshots-metal/AndroidCompatJetpack.png
deleted file mode 100644
index 57f4547541e..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatJetpack.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatKotlin.png b/scripts/ios/screenshots-metal/AndroidCompatKotlin.png
deleted file mode 100644
index 3e5e5f5b072..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatKotlin.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatList.png b/scripts/ios/screenshots-metal/AndroidCompatList.png
deleted file mode 100644
index 72f0a20faf3..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatList.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatMain.png b/scripts/ios/screenshots-metal/AndroidCompatMain.png
deleted file mode 100644
index ffd13bff363..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatMain.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatMaterial.png b/scripts/ios/screenshots-metal/AndroidCompatMaterial.png
deleted file mode 100644
index 11b596f133f..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatMaterial.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatRecycler.png b/scripts/ios/screenshots-metal/AndroidCompatRecycler.png
deleted file mode 100644
index eeb2dc2bb27..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatRecycler.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatTallDialog.png b/scripts/ios/screenshots-metal/AndroidCompatTallDialog.png
deleted file mode 100644
index fff5900bd67..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatTallDialog.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AndroidCompatWidgets.png b/scripts/ios/screenshots-metal/AndroidCompatWidgets.png
deleted file mode 100644
index 721a644b594..00000000000
Binary files a/scripts/ios/screenshots-metal/AndroidCompatWidgets.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AnimateHierarchyScreenshotTest.png b/scripts/ios/screenshots-metal/AnimateHierarchyScreenshotTest.png
deleted file mode 100644
index 41ed820c176..00000000000
Binary files a/scripts/ios/screenshots-metal/AnimateHierarchyScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AnimateLayoutScreenshotTest.png b/scripts/ios/screenshots-metal/AnimateLayoutScreenshotTest.png
deleted file mode 100644
index 5c80aadd5f0..00000000000
Binary files a/scripts/ios/screenshots-metal/AnimateLayoutScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AnimateUnlayoutScreenshotTest.png b/scripts/ios/screenshots-metal/AnimateUnlayoutScreenshotTest.png
deleted file mode 100644
index 5f06cfa4985..00000000000
Binary files a/scripts/ios/screenshots-metal/AnimateUnlayoutScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/AppReviewDialog.png b/scripts/ios/screenshots-metal/AppReviewDialog.png
deleted file mode 100644
index 101ba70ebd2..00000000000
Binary files a/scripts/ios/screenshots-metal/AppReviewDialog.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ArtEditor.tolerance b/scripts/ios/screenshots-metal/ArtEditor.tolerance
deleted file mode 100644
index f115180b40c..00000000000
--- a/scripts/ios/screenshots-metal/ArtEditor.tolerance
+++ /dev/null
@@ -1,6 +0,0 @@
-# Seeded from the screenshots-metal-27 capture: the Metal leg timed out at the
-# job limit. Measured against the Metal leg's own render of this test, 0.14% of
-# pixels differ, all anti-aliased edges (under 0.002% by more than 16 per
-# channel); this bound absorbs that and still fails on a layout change.
-maxChannelDelta=32
-maxMismatchPercent=1.0
diff --git a/scripts/ios/screenshots-metal/ArtEditor_dark.png b/scripts/ios/screenshots-metal/ArtEditor_dark.png
deleted file mode 100644
index 522e2df711c..00000000000
Binary files a/scripts/ios/screenshots-metal/ArtEditor_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ArtEditor_light.png b/scripts/ios/screenshots-metal/ArtEditor_light.png
deleted file mode 100644
index db31dc7faa7..00000000000
Binary files a/scripts/ios/screenshots-metal/ArtEditor_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/BrowserComponent.png b/scripts/ios/screenshots-metal/BrowserComponent.png
deleted file mode 100644
index ebd13fb07c7..00000000000
Binary files a/scripts/ios/screenshots-metal/BrowserComponent.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ButtonTheme_dark.png b/scripts/ios/screenshots-metal/ButtonTheme_dark.png
deleted file mode 100644
index 111e1f728f3..00000000000
Binary files a/scripts/ios/screenshots-metal/ButtonTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ButtonTheme_light.png b/scripts/ios/screenshots-metal/ButtonTheme_light.png
deleted file mode 100644
index d8efd4e6196..00000000000
Binary files a/scripts/ios/screenshots-metal/ButtonTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CenteredDialogTitle_dark.png b/scripts/ios/screenshots-metal/CenteredDialogTitle_dark.png
deleted file mode 100644
index 548c90403bb..00000000000
Binary files a/scripts/ios/screenshots-metal/CenteredDialogTitle_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CenteredDialogTitle_light.png b/scripts/ios/screenshots-metal/CenteredDialogTitle_light.png
deleted file mode 100644
index b7c9e452af8..00000000000
Binary files a/scripts/ios/screenshots-metal/CenteredDialogTitle_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CenteredInteractionDialogTitle_dark.png b/scripts/ios/screenshots-metal/CenteredInteractionDialogTitle_dark.png
deleted file mode 100644
index 86ea37cd3ea..00000000000
Binary files a/scripts/ios/screenshots-metal/CenteredInteractionDialogTitle_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CenteredInteractionDialogTitle_light.png b/scripts/ios/screenshots-metal/CenteredInteractionDialogTitle_light.png
deleted file mode 100644
index 27f10edb452..00000000000
Binary files a/scripts/ios/screenshots-metal/CenteredInteractionDialogTitle_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2BarsGrowInAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2BarsGrowInAnimationScreenshotTest.png
deleted file mode 100644
index 28171077a87..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2BarsGrowInAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2DataChangeAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2DataChangeAnimationScreenshotTest.png
deleted file mode 100644
index 91dd92c3053..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2DataChangeAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2FinancialGrowInAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2FinancialGrowInAnimationScreenshotTest.png
deleted file mode 100644
index e8765363e6e..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2FinancialGrowInAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2GrowInAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2GrowInAnimationScreenshotTest.png
deleted file mode 100644
index f53e4ae13d9..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2GrowInAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2HierarchyGrowInAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2HierarchyGrowInAnimationScreenshotTest.png
deleted file mode 100644
index f67a27faaad..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2HierarchyGrowInAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2LegendToggleAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2LegendToggleAnimationScreenshotTest.png
deleted file mode 100644
index e7e35220ec0..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2LegendToggleAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2LinesGrowInAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2LinesGrowInAnimationScreenshotTest.png
deleted file mode 100644
index e1d4f7ca7e2..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2LinesGrowInAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2PartsDataChangeAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2PartsDataChangeAnimationScreenshotTest.png
deleted file mode 100644
index 12c41acb4f0..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2PartsDataChangeAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2PartsGrowInAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2PartsGrowInAnimationScreenshotTest.png
deleted file mode 100644
index 39a92d823e4..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2PartsGrowInAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2PointsGrowInAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2PointsGrowInAnimationScreenshotTest.png
deleted file mode 100644
index 631197681d1..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2PointsGrowInAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Chart2ZoomAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/Chart2ZoomAnimationScreenshotTest.png
deleted file mode 100644
index 8da74193bb4..00000000000
Binary files a/scripts/ios/screenshots-metal/Chart2ZoomAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ChatInput_dark.png b/scripts/ios/screenshots-metal/ChatInput_dark.png
deleted file mode 100644
index bd7cffc89f0..00000000000
Binary files a/scripts/ios/screenshots-metal/ChatInput_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ChatInput_light.png b/scripts/ios/screenshots-metal/ChatInput_light.png
deleted file mode 100644
index 8429735a2fb..00000000000
Binary files a/scripts/ios/screenshots-metal/ChatInput_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ChatView_dark.png b/scripts/ios/screenshots-metal/ChatView_dark.png
deleted file mode 100644
index a317dd9cdff..00000000000
Binary files a/scripts/ios/screenshots-metal/ChatView_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ChatView_light.png b/scripts/ios/screenshots-metal/ChatView_light.png
deleted file mode 100644
index 763b6d987fa..00000000000
Binary files a/scripts/ios/screenshots-metal/ChatView_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CheckBoxRadioTheme_dark.png b/scripts/ios/screenshots-metal/CheckBoxRadioTheme_dark.png
deleted file mode 100644
index 037a4db409b..00000000000
Binary files a/scripts/ios/screenshots-metal/CheckBoxRadioTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CheckBoxRadioTheme_light.png b/scripts/ios/screenshots-metal/CheckBoxRadioTheme_light.png
deleted file mode 100644
index 0f391c73a0e..00000000000
Binary files a/scripts/ios/screenshots-metal/CheckBoxRadioTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CoachMarks_dark.png b/scripts/ios/screenshots-metal/CoachMarks_dark.png
deleted file mode 100644
index 7bac7b7ba78..00000000000
Binary files a/scripts/ios/screenshots-metal/CoachMarks_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CoachMarks_light.png b/scripts/ios/screenshots-metal/CoachMarks_light.png
deleted file mode 100644
index 68434695625..00000000000
Binary files a/scripts/ios/screenshots-metal/CoachMarks_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CodeEditor.png b/scripts/ios/screenshots-metal/CodeEditor.png
deleted file mode 100644
index 11a7927a635..00000000000
Binary files a/scripts/ios/screenshots-metal/CodeEditor.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CodeEditor.tolerance b/scripts/ios/screenshots-metal/CodeEditor.tolerance
deleted file mode 100644
index e435316ce73..00000000000
--- a/scripts/ios/screenshots-metal/CodeEditor.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Pure Codename One text editor render; absorb minor glyph anti-aliasing
-# variance between CI runs / GPU backends.
-maxChannelDelta=16
-maxMismatchPercent=2.0
diff --git a/scripts/ios/screenshots-metal/ComponentReplaceFadeScreenshotTest.png b/scripts/ios/screenshots-metal/ComponentReplaceFadeScreenshotTest.png
deleted file mode 100644
index f2f71dd6745..00000000000
Binary files a/scripts/ios/screenshots-metal/ComponentReplaceFadeScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ComponentReplaceFlipScreenshotTest.png b/scripts/ios/screenshots-metal/ComponentReplaceFlipScreenshotTest.png
deleted file mode 100644
index ad909a311c8..00000000000
Binary files a/scripts/ios/screenshots-metal/ComponentReplaceFlipScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ComponentReplaceSlideScreenshotTest.png b/scripts/ios/screenshots-metal/ComponentReplaceSlideScreenshotTest.png
deleted file mode 100644
index 6f8062f4ca5..00000000000
Binary files a/scripts/ios/screenshots-metal/ComponentReplaceSlideScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/CoverHorizontalTransitionTest.png b/scripts/ios/screenshots-metal/CoverHorizontalTransitionTest.png
deleted file mode 100644
index 656eb56aa83..00000000000
Binary files a/scripts/ios/screenshots-metal/CoverHorizontalTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DataGridTheme_dark.png b/scripts/ios/screenshots-metal/DataGridTheme_dark.png
deleted file mode 100644
index 66a40a3abb9..00000000000
Binary files a/scripts/ios/screenshots-metal/DataGridTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DataGridTheme_light.png b/scripts/ios/screenshots-metal/DataGridTheme_light.png
deleted file mode 100644
index fe53c8e08cf..00000000000
Binary files a/scripts/ios/screenshots-metal/DataGridTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopChromeTheme_dark.png b/scripts/ios/screenshots-metal/DesktopChromeTheme_dark.png
deleted file mode 100644
index f388e82e3cb..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopChromeTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopChromeTheme_light.png b/scripts/ios/screenshots-metal/DesktopChromeTheme_light.png
deleted file mode 100644
index 7ddea2c7408..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopChromeTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatFxAlert.png b/scripts/ios/screenshots-metal/DesktopCompatFxAlert.png
deleted file mode 100644
index faf15d4e958..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatFxAlert.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatFxControls.png b/scripts/ios/screenshots-metal/DesktopCompatFxControls.png
deleted file mode 100644
index df2b20b4a1d..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatFxControls.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatFxData.png b/scripts/ios/screenshots-metal/DesktopCompatFxData.png
deleted file mode 100644
index d39332cab5a..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatFxData.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatFxFxml.png b/scripts/ios/screenshots-metal/DesktopCompatFxFxml.png
deleted file mode 100644
index ed5b25bf738..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatFxFxml.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatFxPanes.png b/scripts/ios/screenshots-metal/DesktopCompatFxPanes.png
deleted file mode 100644
index ba9efacf0b5..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatFxPanes.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatFxShapes.png b/scripts/ios/screenshots-metal/DesktopCompatFxShapes.png
deleted file mode 100644
index 4ed48a0d071..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatFxShapes.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatSwingContainers.png b/scripts/ios/screenshots-metal/DesktopCompatSwingContainers.png
deleted file mode 100644
index 893e27f7fb4..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatSwingContainers.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatSwingControls.png b/scripts/ios/screenshots-metal/DesktopCompatSwingControls.png
deleted file mode 100644
index b17b9d94bf5..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatSwingControls.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatSwingOptionPane.png b/scripts/ios/screenshots-metal/DesktopCompatSwingOptionPane.png
deleted file mode 100644
index a6b38d5cf98..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatSwingOptionPane.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatSwingPainting.png b/scripts/ios/screenshots-metal/DesktopCompatSwingPainting.png
deleted file mode 100644
index cb99bafe3bb..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatSwingPainting.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatSwingTables.png b/scripts/ios/screenshots-metal/DesktopCompatSwingTables.png
deleted file mode 100644
index f1bc125e38d..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatSwingTables.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatSwingTrees.png b/scripts/ios/screenshots-metal/DesktopCompatSwingTrees.png
deleted file mode 100644
index e6cafa3ade8..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatSwingTrees.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopCompatSwingX.png b/scripts/ios/screenshots-metal/DesktopCompatSwingX.png
deleted file mode 100644
index bee39c80176..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopCompatSwingX.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopMode.png b/scripts/ios/screenshots-metal/DesktopMode.png
deleted file mode 100644
index f4089fd4c35..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopMode.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopScrollbarTheme_dark.png b/scripts/ios/screenshots-metal/DesktopScrollbarTheme_dark.png
deleted file mode 100644
index 032861cb06d..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopScrollbarTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopScrollbarTheme_light.png b/scripts/ios/screenshots-metal/DesktopScrollbarTheme_light.png
deleted file mode 100644
index 144a73e0fa9..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopScrollbarTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopWidgetsTheme_dark.png b/scripts/ios/screenshots-metal/DesktopWidgetsTheme_dark.png
deleted file mode 100644
index ee9e4980471..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopWidgetsTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DesktopWidgetsTheme_light.png b/scripts/ios/screenshots-metal/DesktopWidgetsTheme_light.png
deleted file mode 100644
index e0f5aa7e4d6..00000000000
Binary files a/scripts/ios/screenshots-metal/DesktopWidgetsTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DialogTheme_dark.png b/scripts/ios/screenshots-metal/DialogTheme_dark.png
deleted file mode 100644
index c1647b32f48..00000000000
Binary files a/scripts/ios/screenshots-metal/DialogTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DialogTheme_light.png b/scripts/ios/screenshots-metal/DialogTheme_light.png
deleted file mode 100644
index d67b641ac69..00000000000
Binary files a/scripts/ios/screenshots-metal/DialogTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentFormats_dark.png b/scripts/ios/screenshots-metal/DocumentFormats_dark.png
deleted file mode 100644
index 44601ef912d..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentFormats_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentFormats_light.png b/scripts/ios/screenshots-metal/DocumentFormats_light.png
deleted file mode 100644
index 91d467d7a10..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentFormats_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentLayout_dark.png b/scripts/ios/screenshots-metal/DocumentLayout_dark.png
deleted file mode 100644
index c7c3d6e93ed..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentLayout_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentLayout_light.png b/scripts/ios/screenshots-metal/DocumentLayout_light.png
deleted file mode 100644
index 91e5d3da0a2..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentLayout_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentPages_dark.png b/scripts/ios/screenshots-metal/DocumentPages_dark.png
deleted file mode 100644
index c22f6ade899..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentPages_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentPages_light.png b/scripts/ios/screenshots-metal/DocumentPages_light.png
deleted file mode 100644
index d982076d769..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentPages_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentReview_dark.png b/scripts/ios/screenshots-metal/DocumentReview_dark.png
deleted file mode 100644
index 2983ee889c8..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentReview_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/DocumentReview_light.png b/scripts/ios/screenshots-metal/DocumentReview_light.png
deleted file mode 100644
index d91375caf14..00000000000
Binary files a/scripts/ios/screenshots-metal/DocumentReview_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/EmojiAndMention_dark.png b/scripts/ios/screenshots-metal/EmojiAndMention_dark.png
deleted file mode 100644
index 639044614a9..00000000000
Binary files a/scripts/ios/screenshots-metal/EmojiAndMention_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/EmojiAndMention_dark.tolerance b/scripts/ios/screenshots-metal/EmojiAndMention_dark.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/EmojiAndMention_dark.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/EmojiAndMention_light.png b/scripts/ios/screenshots-metal/EmojiAndMention_light.png
deleted file mode 100644
index 9dcb56ae799..00000000000
Binary files a/scripts/ios/screenshots-metal/EmojiAndMention_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/EmojiAndMention_light.tolerance b/scripts/ios/screenshots-metal/EmojiAndMention_light.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/EmojiAndMention_light.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/FadeTransitionTest.png b/scripts/ios/screenshots-metal/FadeTransitionTest.png
deleted file mode 100644
index 69d5e98dd27..00000000000
Binary files a/scripts/ios/screenshots-metal/FadeTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/FlipTransitionTest.png b/scripts/ios/screenshots-metal/FlipTransitionTest.png
deleted file mode 100644
index e82191411a8..00000000000
Binary files a/scripts/ios/screenshots-metal/FlipTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/FloatingActionButtonTheme_dark.png b/scripts/ios/screenshots-metal/FloatingActionButtonTheme_dark.png
deleted file mode 100644
index f392de391cc..00000000000
Binary files a/scripts/ios/screenshots-metal/FloatingActionButtonTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/FloatingActionButtonTheme_light.png b/scripts/ios/screenshots-metal/FloatingActionButtonTheme_light.png
deleted file mode 100644
index 729ec00cba1..00000000000
Binary files a/scripts/ios/screenshots-metal/FloatingActionButtonTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/FlowChartShapes_dark.png b/scripts/ios/screenshots-metal/FlowChartShapes_dark.png
deleted file mode 100644
index dcb73ae162c..00000000000
Binary files a/scripts/ios/screenshots-metal/FlowChartShapes_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/FlowChartShapes_light.png b/scripts/ios/screenshots-metal/FlowChartShapes_light.png
deleted file mode 100644
index 574add763aa..00000000000
Binary files a/scripts/ios/screenshots-metal/FlowChartShapes_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/FlowChartTheme_dark.png b/scripts/ios/screenshots-metal/FlowChartTheme_dark.png
deleted file mode 100644
index 1c7d6475cd0..00000000000
Binary files a/scripts/ios/screenshots-metal/FlowChartTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/FlowChartTheme_light.png b/scripts/ios/screenshots-metal/FlowChartTheme_light.png
deleted file mode 100644
index e4b6ab57699..00000000000
Binary files a/scripts/ios/screenshots-metal/FlowChartTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GanttTheme_dark.png b/scripts/ios/screenshots-metal/GanttTheme_dark.png
deleted file mode 100644
index e6deb023fbf..00000000000
Binary files a/scripts/ios/screenshots-metal/GanttTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GanttTheme_light.png b/scripts/ios/screenshots-metal/GanttTheme_light.png
deleted file mode 100644
index df023cf9b95..00000000000
Binary files a/scripts/ios/screenshots-metal/GanttTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GoogleWebMap.png b/scripts/ios/screenshots-metal/GoogleWebMap.png
deleted file mode 100644
index 5f98de6bf6f..00000000000
Binary files a/scripts/ios/screenshots-metal/GoogleWebMap.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GoogleWebMap.tolerance b/scripts/ios/screenshots-metal/GoogleWebMap.tolerance
deleted file mode 100644
index be05b159627..00000000000
--- a/scripts/ios/screenshots-metal/GoogleWebMap.tolerance
+++ /dev/null
@@ -1,7 +0,0 @@
-# Live Google Maps via the web provider (BrowserComponent + Maps JS): tiles,
-# labels and road data load from Google and shift run-to-run, and the JS API
-# re-lays labels more freely than a native map, so the tolerance is wide. It
-# still fails loudly on a blank / blocked map or a failed key (which differs
-# across essentially the whole frame) -- the regression this test guards.
-maxChannelDelta=40
-maxMismatchPercent=35.0
diff --git a/scripts/ios/screenshots-metal/Gpu3DAnimation.png b/scripts/ios/screenshots-metal/Gpu3DAnimation.png
deleted file mode 100644
index 96abc2f8442..00000000000
Binary files a/scripts/ios/screenshots-metal/Gpu3DAnimation.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Gpu3DAnimation.tolerance b/scripts/ios/screenshots-metal/Gpu3DAnimation.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/Gpu3DAnimation.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/Gpu3DCube.png b/scripts/ios/screenshots-metal/Gpu3DCube.png
deleted file mode 100644
index 4489d0088a7..00000000000
Binary files a/scripts/ios/screenshots-metal/Gpu3DCube.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Gpu3DCube.tolerance b/scripts/ios/screenshots-metal/Gpu3DCube.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/Gpu3DCube.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/Gpu3DModel.png b/scripts/ios/screenshots-metal/Gpu3DModel.png
deleted file mode 100644
index e2295e3002c..00000000000
Binary files a/scripts/ios/screenshots-metal/Gpu3DModel.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Gpu3DModel.tolerance b/scripts/ios/screenshots-metal/Gpu3DModel.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/Gpu3DModel.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/Gpu3DTexturedCube.png b/scripts/ios/screenshots-metal/Gpu3DTexturedCube.png
deleted file mode 100644
index f82e6c772cd..00000000000
Binary files a/scripts/ios/screenshots-metal/Gpu3DTexturedCube.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Gpu3DTexturedCube.tolerance b/scripts/ios/screenshots-metal/Gpu3DTexturedCube.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/Gpu3DTexturedCube.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/GpuPostDepth.png b/scripts/ios/screenshots-metal/GpuPostDepth.png
deleted file mode 100644
index 4a661e83def..00000000000
Binary files a/scripts/ios/screenshots-metal/GpuPostDepth.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GpuPostDepth.tolerance b/scripts/ios/screenshots-metal/GpuPostDepth.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/GpuPostDepth.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/GpuPostPass.png b/scripts/ios/screenshots-metal/GpuPostPass.png
deleted file mode 100644
index 836cc4d9f2f..00000000000
Binary files a/scripts/ios/screenshots-metal/GpuPostPass.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GpuPostPass.tolerance b/scripts/ios/screenshots-metal/GpuPostPass.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/GpuPostPass.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/GpuRenderTarget.png b/scripts/ios/screenshots-metal/GpuRenderTarget.png
deleted file mode 100644
index f13d78500b7..00000000000
Binary files a/scripts/ios/screenshots-metal/GpuRenderTarget.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GpuRenderTarget.tolerance b/scripts/ios/screenshots-metal/GpuRenderTarget.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/GpuRenderTarget.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/GpuShaderGallery.png b/scripts/ios/screenshots-metal/GpuShaderGallery.png
deleted file mode 100644
index 6a7aa24d19c..00000000000
Binary files a/scripts/ios/screenshots-metal/GpuShaderGallery.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GpuShaderGallery.tolerance b/scripts/ios/screenshots-metal/GpuShaderGallery.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/GpuShaderGallery.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/GpuShaderHarbour.png b/scripts/ios/screenshots-metal/GpuShaderHarbour.png
deleted file mode 100644
index d317ebe5db6..00000000000
Binary files a/scripts/ios/screenshots-metal/GpuShaderHarbour.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GpuShaderHarbour.tolerance b/scripts/ios/screenshots-metal/GpuShaderHarbour.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/GpuShaderHarbour.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/GpuSkinning.png b/scripts/ios/screenshots-metal/GpuSkinning.png
deleted file mode 100644
index f492f9cfd2d..00000000000
Binary files a/scripts/ios/screenshots-metal/GpuSkinning.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/GpuSkinning.tolerance b/scripts/ios/screenshots-metal/GpuSkinning.tolerance
deleted file mode 100644
index f6729f751b9..00000000000
--- a/scripts/ios/screenshots-metal/GpuSkinning.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# GPU 3D render: software/sim rasterizers vary ~1% between CI runners;
-# widen tolerance so noise does not fail the build.
-maxChannelDelta=8
-maxMismatchPercent=3.0
diff --git a/scripts/ios/screenshots-metal/ImageViewerNavigationModes.png b/scripts/ios/screenshots-metal/ImageViewerNavigationModes.png
deleted file mode 100644
index e8988b0d039..00000000000
Binary files a/scripts/ios/screenshots-metal/ImageViewerNavigationModes.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KanbanBoardTheme_dark.png b/scripts/ios/screenshots-metal/KanbanBoardTheme_dark.png
deleted file mode 100644
index 3661016adf9..00000000000
Binary files a/scripts/ios/screenshots-metal/KanbanBoardTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KanbanBoardTheme_light.png b/scripts/ios/screenshots-metal/KanbanBoardTheme_light.png
deleted file mode 100644
index 0c8088a1eee..00000000000
Binary files a/scripts/ios/screenshots-metal/KanbanBoardTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KanbanCardsTheme_dark.png b/scripts/ios/screenshots-metal/KanbanCardsTheme_dark.png
deleted file mode 100644
index 28fe4ae9557..00000000000
Binary files a/scripts/ios/screenshots-metal/KanbanCardsTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KanbanCardsTheme_light.png b/scripts/ios/screenshots-metal/KanbanCardsTheme_light.png
deleted file mode 100644
index c5d08f3b02a..00000000000
Binary files a/scripts/ios/screenshots-metal/KanbanCardsTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KmpCompatLayout.png b/scripts/ios/screenshots-metal/KmpCompatLayout.png
deleted file mode 100644
index 71b620c001e..00000000000
Binary files a/scripts/ios/screenshots-metal/KmpCompatLayout.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KmpCompatList.png b/scripts/ios/screenshots-metal/KmpCompatList.png
deleted file mode 100644
index ea2eab61d1a..00000000000
Binary files a/scripts/ios/screenshots-metal/KmpCompatList.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KmpCompatState.png b/scripts/ios/screenshots-metal/KmpCompatState.png
deleted file mode 100644
index fe98a7b176f..00000000000
Binary files a/scripts/ios/screenshots-metal/KmpCompatState.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/KmpCompatTypography.png b/scripts/ios/screenshots-metal/KmpCompatTypography.png
deleted file mode 100644
index 1c447208a3d..00000000000
Binary files a/scripts/ios/screenshots-metal/KmpCompatTypography.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/LightweightPickerButtons.png b/scripts/ios/screenshots-metal/LightweightPickerButtons.png
deleted file mode 100644
index 9a7ef78f0a0..00000000000
Binary files a/scripts/ios/screenshots-metal/LightweightPickerButtons.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/LightweightPickerButtons_above_center.png b/scripts/ios/screenshots-metal/LightweightPickerButtons_above_center.png
deleted file mode 100644
index c146b1568ed..00000000000
Binary files a/scripts/ios/screenshots-metal/LightweightPickerButtons_above_center.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/LightweightPickerButtons_below_right.png b/scripts/ios/screenshots-metal/LightweightPickerButtons_below_right.png
deleted file mode 100644
index f2779b69dfa..00000000000
Binary files a/scripts/ios/screenshots-metal/LightweightPickerButtons_below_right.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/LightweightPickerButtons_between_mixed.png b/scripts/ios/screenshots-metal/LightweightPickerButtons_between_mixed.png
deleted file mode 100644
index d33bb9e04a6..00000000000
Binary files a/scripts/ios/screenshots-metal/LightweightPickerButtons_between_mixed.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ListTheme_dark.png b/scripts/ios/screenshots-metal/ListTheme_dark.png
deleted file mode 100644
index d628f940f22..00000000000
Binary files a/scripts/ios/screenshots-metal/ListTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ListTheme_light.png b/scripts/ios/screenshots-metal/ListTheme_light.png
deleted file mode 100644
index 4f1ffd31481..00000000000
Binary files a/scripts/ios/screenshots-metal/ListTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/LoadingPlaceholders_dark.png b/scripts/ios/screenshots-metal/LoadingPlaceholders_dark.png
deleted file mode 100644
index 33a12540c20..00000000000
Binary files a/scripts/ios/screenshots-metal/LoadingPlaceholders_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/LoadingPlaceholders_light.png b/scripts/ios/screenshots-metal/LoadingPlaceholders_light.png
deleted file mode 100644
index 2c0103e2892..00000000000
Binary files a/scripts/ios/screenshots-metal/LoadingPlaceholders_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/LottieAnimatedScreenshotTest.png b/scripts/ios/screenshots-metal/LottieAnimatedScreenshotTest.png
deleted file mode 100644
index 093bb369440..00000000000
Binary files a/scripts/ios/screenshots-metal/LottieAnimatedScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MainActivity.png b/scripts/ios/screenshots-metal/MainActivity.png
deleted file mode 100644
index dbae84bf0f0..00000000000
Binary files a/scripts/ios/screenshots-metal/MainActivity.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MasonryGrid_dark.png b/scripts/ios/screenshots-metal/MasonryGrid_dark.png
deleted file mode 100644
index dca5c033fbc..00000000000
Binary files a/scripts/ios/screenshots-metal/MasonryGrid_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MasonryGrid_dark.tolerance b/scripts/ios/screenshots-metal/MasonryGrid_dark.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/MasonryGrid_dark.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/MasonryGrid_light.png b/scripts/ios/screenshots-metal/MasonryGrid_light.png
deleted file mode 100644
index a0ed2828fc8..00000000000
Binary files a/scripts/ios/screenshots-metal/MasonryGrid_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MasonryGrid_light.tolerance b/scripts/ios/screenshots-metal/MasonryGrid_light.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/MasonryGrid_light.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/MaterialDatePickerTheme_dark.png b/scripts/ios/screenshots-metal/MaterialDatePickerTheme_dark.png
deleted file mode 100644
index c3472a8bf6f..00000000000
Binary files a/scripts/ios/screenshots-metal/MaterialDatePickerTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MaterialDatePickerTheme_light.png b/scripts/ios/screenshots-metal/MaterialDatePickerTheme_light.png
deleted file mode 100644
index 4e54044a0da..00000000000
Binary files a/scripts/ios/screenshots-metal/MaterialDatePickerTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MaterialTimePickerTheme_dark.png b/scripts/ios/screenshots-metal/MaterialTimePickerTheme_dark.png
deleted file mode 100644
index 091871b08f7..00000000000
Binary files a/scripts/ios/screenshots-metal/MaterialTimePickerTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MaterialTimePickerTheme_light.png b/scripts/ios/screenshots-metal/MaterialTimePickerTheme_light.png
deleted file mode 100644
index 652086fff96..00000000000
Binary files a/scripts/ios/screenshots-metal/MaterialTimePickerTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Media360Panorama.png b/scripts/ios/screenshots-metal/Media360Panorama.png
deleted file mode 100644
index b4b1a2762f8..00000000000
Binary files a/scripts/ios/screenshots-metal/Media360Panorama.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Media360Panorama.tolerance b/scripts/ios/screenshots-metal/Media360Panorama.tolerance
deleted file mode 100644
index 3ab147657c0..00000000000
--- a/scripts/ios/screenshots-metal/Media360Panorama.tolerance
+++ /dev/null
@@ -1,7 +0,0 @@
-# The iOS Metal backends (iOS Metal + tvOS) render the smooth 360 sky/ground
-# gradient with more per-pixel variance run-to-run than the default delta=8
-# GPU tolerance (measured: ~20% of pixels shift by 8-16, <0.2% beyond 16).
-# Widen the per-pixel threshold so that gradient noise does not fail the build;
-# a real regression still trips the mismatch percent.
-maxChannelDelta=28
-maxMismatchPercent=5.0
diff --git a/scripts/ios/screenshots-metal/MediaPlayback.png b/scripts/ios/screenshots-metal/MediaPlayback.png
deleted file mode 100644
index 4f3bac6951e..00000000000
Binary files a/scripts/ios/screenshots-metal/MediaPlayback.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MorphElementMorphScreenshotTest.png b/scripts/ios/screenshots-metal/MorphElementMorphScreenshotTest.png
deleted file mode 100644
index 871b31dbbab..00000000000
Binary files a/scripts/ios/screenshots-metal/MorphElementMorphScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MorphTransitionScrolledSourceTest.png b/scripts/ios/screenshots-metal/MorphTransitionScrolledSourceTest.png
deleted file mode 100644
index f353af1bc6c..00000000000
Binary files a/scripts/ios/screenshots-metal/MorphTransitionScrolledSourceTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MorphTransitionScrubScreenshotTest.png b/scripts/ios/screenshots-metal/MorphTransitionScrubScreenshotTest.png
deleted file mode 100644
index 1286eefb0af..00000000000
Binary files a/scripts/ios/screenshots-metal/MorphTransitionScrubScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MorphTransitionSnapshotTest.png b/scripts/ios/screenshots-metal/MorphTransitionSnapshotTest.png
deleted file mode 100644
index d97b4c8edad..00000000000
Binary files a/scripts/ios/screenshots-metal/MorphTransitionSnapshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MorphTransitionTest.png b/scripts/ios/screenshots-metal/MorphTransitionTest.png
deleted file mode 100644
index 2fe6bdfd205..00000000000
Binary files a/scripts/ios/screenshots-metal/MorphTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MotionShowcaseScreenshotTest.png b/scripts/ios/screenshots-metal/MotionShowcaseScreenshotTest.png
deleted file mode 100644
index b8dd720309e..00000000000
Binary files a/scripts/ios/screenshots-metal/MotionShowcaseScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MultiButtonTheme_dark.png b/scripts/ios/screenshots-metal/MultiButtonTheme_dark.png
deleted file mode 100644
index 18b94a3a43e..00000000000
Binary files a/scripts/ios/screenshots-metal/MultiButtonTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/MultiButtonTheme_light.png b/scripts/ios/screenshots-metal/MultiButtonTheme_light.png
deleted file mode 100644
index 400f2afcf78..00000000000
Binary files a/scripts/ios/screenshots-metal/MultiButtonTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/NodeEditorTheme_dark.png b/scripts/ios/screenshots-metal/NodeEditorTheme_dark.png
deleted file mode 100644
index 805f30f3c81..00000000000
Binary files a/scripts/ios/screenshots-metal/NodeEditorTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/NodeEditorTheme_light.png b/scripts/ios/screenshots-metal/NodeEditorTheme_light.png
deleted file mode 100644
index 36832438683..00000000000
Binary files a/scripts/ios/screenshots-metal/NodeEditorTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/NodeGraphTheme_dark.png b/scripts/ios/screenshots-metal/NodeGraphTheme_dark.png
deleted file mode 100644
index 4235eb2314e..00000000000
Binary files a/scripts/ios/screenshots-metal/NodeGraphTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/NodeGraphTheme_light.png b/scripts/ios/screenshots-metal/NodeGraphTheme_light.png
deleted file mode 100644
index 363b3d3c46b..00000000000
Binary files a/scripts/ios/screenshots-metal/NodeGraphTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PaletteOverrideTheme_dark.png b/scripts/ios/screenshots-metal/PaletteOverrideTheme_dark.png
deleted file mode 100644
index 550509d88c0..00000000000
Binary files a/scripts/ios/screenshots-metal/PaletteOverrideTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PaletteOverrideTheme_light.png b/scripts/ios/screenshots-metal/PaletteOverrideTheme_light.png
deleted file mode 100644
index 1ed64641534..00000000000
Binary files a/scripts/ios/screenshots-metal/PaletteOverrideTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PdfViewer_dark.png b/scripts/ios/screenshots-metal/PdfViewer_dark.png
deleted file mode 100644
index 6bbe0240d44..00000000000
Binary files a/scripts/ios/screenshots-metal/PdfViewer_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PdfViewer_light.png b/scripts/ios/screenshots-metal/PdfViewer_light.png
deleted file mode 100644
index 2b48cd086ba..00000000000
Binary files a/scripts/ios/screenshots-metal/PdfViewer_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PickerTheme_dark.png b/scripts/ios/screenshots-metal/PickerTheme_dark.png
deleted file mode 100644
index d3c127290ff..00000000000
Binary files a/scripts/ios/screenshots-metal/PickerTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PickerTheme_light.png b/scripts/ios/screenshots-metal/PickerTheme_light.png
deleted file mode 100644
index 3dd79b343af..00000000000
Binary files a/scripts/ios/screenshots-metal/PickerTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PickersAndInputs_dark.png b/scripts/ios/screenshots-metal/PickersAndInputs_dark.png
deleted file mode 100644
index 693aad39e55..00000000000
Binary files a/scripts/ios/screenshots-metal/PickersAndInputs_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PickersAndInputs_dark.tolerance b/scripts/ios/screenshots-metal/PickersAndInputs_dark.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/PickersAndInputs_dark.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/PickersAndInputs_light.png b/scripts/ios/screenshots-metal/PickersAndInputs_light.png
deleted file mode 100644
index 2c82ce57a9f..00000000000
Binary files a/scripts/ios/screenshots-metal/PickersAndInputs_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PickersAndInputs_light.tolerance b/scripts/ios/screenshots-metal/PickersAndInputs_light.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/PickersAndInputs_light.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/ProgressAndMedia_dark.png b/scripts/ios/screenshots-metal/ProgressAndMedia_dark.png
deleted file mode 100644
index b589553caec..00000000000
Binary files a/scripts/ios/screenshots-metal/ProgressAndMedia_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ProgressAndMedia_dark.tolerance b/scripts/ios/screenshots-metal/ProgressAndMedia_dark.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/ProgressAndMedia_dark.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/ProgressAndMedia_light.png b/scripts/ios/screenshots-metal/ProgressAndMedia_light.png
deleted file mode 100644
index 9546cb9e725..00000000000
Binary files a/scripts/ios/screenshots-metal/ProgressAndMedia_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ProgressAndMedia_light.tolerance b/scripts/ios/screenshots-metal/ProgressAndMedia_light.tolerance
deleted file mode 100644
index b79e16bc508..00000000000
--- a/scripts/ios/screenshots-metal/ProgressAndMedia_light.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Seeded from the iOS 27 Metal capture (the Metal leg timed out before
-# capturing); absorbs iOS 26 vs 27 system rendering differences.
-maxChannelDelta=64
-maxMismatchPercent=4.0
diff --git a/scripts/ios/screenshots-metal/PullToRefreshSpinnerScreenshotTest.png b/scripts/ios/screenshots-metal/PullToRefreshSpinnerScreenshotTest.png
deleted file mode 100644
index 95a820f15fa..00000000000
Binary files a/scripts/ios/screenshots-metal/PullToRefreshSpinnerScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PureEditors.png b/scripts/ios/screenshots-metal/PureEditors.png
deleted file mode 100644
index 68b2f1bd305..00000000000
Binary files a/scripts/ios/screenshots-metal/PureEditors.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/PureEditors.tolerance b/scripts/ios/screenshots-metal/PureEditors.tolerance
deleted file mode 100644
index e435316ce73..00000000000
--- a/scripts/ios/screenshots-metal/PureEditors.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Pure Codename One text editor render; absorb minor glyph anti-aliasing
-# variance between CI runs / GPU backends.
-maxChannelDelta=16
-maxMismatchPercent=2.0
diff --git a/scripts/ios/screenshots-metal/README.md b/scripts/ios/screenshots-metal/README.md
deleted file mode 100644
index 3227a19b3ca..00000000000
--- a/scripts/ios/screenshots-metal/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# iOS screenshot baselines
-
-Reference images for the iOS simulator. The `build-ios-metal` job in `.github/workflows/scripts-ios.yml` compares `scripts/hellocodenameone` simulator output against these PNGs via `run-ios-ui-tests.sh`, which also defaults to this directory when `SCREENSHOT_REF_DIR` is unset.
-
-## Scope
-
-Metal is the only iOS rendering backend; the OpenGL ES 2 pipeline and its separate baseline set are gone. These images are the iOS baseline, full stop.
-
-The directory keeps its `-metal` suffix because the port id (`ios-metal`), the published port-status report and its history are all keyed on that name.
-
-## Updating
-
-When a change is expected to modify a screenshot:
-
-1. Run the CI `build-ios-metal` job (or `scripts/run-ios-ui-tests.sh` locally).
-2. Download the `ios-ui-tests-metal` artifact and pull the `*.png` files for the tests that are now "different".
-3. Inspect them side-by-side with the previous baseline. Accept only what's intentional.
-4. Copy the accepted PNGs into this directory and commit them, naming them after the test IDs.
diff --git a/scripts/ios/screenshots-metal/RealOsmVector.png b/scripts/ios/screenshots-metal/RealOsmVector.png
deleted file mode 100644
index 9790e238647..00000000000
Binary files a/scripts/ios/screenshots-metal/RealOsmVector.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/RealOsmVector.tolerance b/scripts/ios/screenshots-metal/RealOsmVector.tolerance
deleted file mode 100644
index 9797569a5fb..00000000000
--- a/scripts/ios/screenshots-metal/RealOsmVector.tolerance
+++ /dev/null
@@ -1,3 +0,0 @@
-# Deterministic vector tiles; tolerance covers backend AA/font variance.
-maxChannelDelta=40
-maxMismatchPercent=10.0
diff --git a/scripts/ios/screenshots-metal/RichTextArea.png b/scripts/ios/screenshots-metal/RichTextArea.png
deleted file mode 100644
index 6131630150e..00000000000
Binary files a/scripts/ios/screenshots-metal/RichTextArea.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/RichTextArea.tolerance b/scripts/ios/screenshots-metal/RichTextArea.tolerance
deleted file mode 100644
index e435316ce73..00000000000
--- a/scripts/ios/screenshots-metal/RichTextArea.tolerance
+++ /dev/null
@@ -1,4 +0,0 @@
-# Pure Codename One text editor render; absorb minor glyph anti-aliasing
-# variance between CI runs / GPU backends.
-maxChannelDelta=16
-maxMismatchPercent=2.0
diff --git a/scripts/ios/screenshots-metal/RiveAnimatedScreenshotTest.png b/scripts/ios/screenshots-metal/RiveAnimatedScreenshotTest.png
deleted file mode 100644
index cf2016e4356..00000000000
Binary files a/scripts/ios/screenshots-metal/RiveAnimatedScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/RiveFeatures.png b/scripts/ios/screenshots-metal/RiveFeatures.png
deleted file mode 100644
index 2907f073f43..00000000000
Binary files a/scripts/ios/screenshots-metal/RiveFeatures.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/RiveGpu.png b/scripts/ios/screenshots-metal/RiveGpu.png
deleted file mode 100644
index b7ec8496d14..00000000000
Binary files a/scripts/ios/screenshots-metal/RiveGpu.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SVGAnimatedScreenshotTest.png b/scripts/ios/screenshots-metal/SVGAnimatedScreenshotTest.png
deleted file mode 100644
index 72db55c1159..00000000000
Binary files a/scripts/ios/screenshots-metal/SVGAnimatedScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SVGStatic.png b/scripts/ios/screenshots-metal/SVGStatic.png
deleted file mode 100644
index 70d51ee9157..00000000000
Binary files a/scripts/ios/screenshots-metal/SVGStatic.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SVGStatic.tolerance b/scripts/ios/screenshots-metal/SVGStatic.tolerance
deleted file mode 100644
index 4168691e79e..00000000000
--- a/scripts/ios/screenshots-metal/SVGStatic.tolerance
+++ /dev/null
@@ -1,7 +0,0 @@
-# Vector-heavy render with run-to-run anti-aliasing jitter that straddles the
-# tightened 0.05% pipeline gate (re-flagged with fresh pixels immediately
-# after its golden was refreshed, the nondeterminism signature). Keep the
-# pre-tightening gate for this screen only; a real regression still moves far
-# more than 0.30% of the frame.
-maxChannelDelta=4
-maxMismatchPercent=0.30
diff --git a/scripts/ios/screenshots-metal/SchedulerMonthTheme_dark.png b/scripts/ios/screenshots-metal/SchedulerMonthTheme_dark.png
deleted file mode 100644
index 1d99b6fbd3c..00000000000
Binary files a/scripts/ios/screenshots-metal/SchedulerMonthTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SchedulerMonthTheme_light.png b/scripts/ios/screenshots-metal/SchedulerMonthTheme_light.png
deleted file mode 100644
index 7573a427daf..00000000000
Binary files a/scripts/ios/screenshots-metal/SchedulerMonthTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SchedulerResourceTheme_dark.png b/scripts/ios/screenshots-metal/SchedulerResourceTheme_dark.png
deleted file mode 100644
index 497318bfb57..00000000000
Binary files a/scripts/ios/screenshots-metal/SchedulerResourceTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SchedulerResourceTheme_light.png b/scripts/ios/screenshots-metal/SchedulerResourceTheme_light.png
deleted file mode 100644
index 7742fc47c69..00000000000
Binary files a/scripts/ios/screenshots-metal/SchedulerResourceTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SchedulerTheme_dark.png b/scripts/ios/screenshots-metal/SchedulerTheme_dark.png
deleted file mode 100644
index 28032adaea7..00000000000
Binary files a/scripts/ios/screenshots-metal/SchedulerTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SchedulerTheme_light.png b/scripts/ios/screenshots-metal/SchedulerTheme_light.png
deleted file mode 100644
index 9c34adbdb74..00000000000
Binary files a/scripts/ios/screenshots-metal/SchedulerTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/Sheet.png b/scripts/ios/screenshots-metal/Sheet.png
deleted file mode 100644
index 6b4de345150..00000000000
Binary files a/scripts/ios/screenshots-metal/Sheet.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SheetSlideUpAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/SheetSlideUpAnimationScreenshotTest.png
deleted file mode 100644
index afe4128cddd..00000000000
Binary files a/scripts/ios/screenshots-metal/SheetSlideUpAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ShowcaseTheme_dark.png b/scripts/ios/screenshots-metal/ShowcaseTheme_dark.png
deleted file mode 100644
index 15d74ad54b9..00000000000
Binary files a/scripts/ios/screenshots-metal/ShowcaseTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ShowcaseTheme_light.png b/scripts/ios/screenshots-metal/ShowcaseTheme_light.png
deleted file mode 100644
index bfb31ce3cf1..00000000000
Binary files a/scripts/ios/screenshots-metal/ShowcaseTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideBuildAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/SlideBuildAnimationScreenshotTest.png
deleted file mode 100644
index 2301178de29..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideBuildAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideCapabilities_dark.png b/scripts/ios/screenshots-metal/SlideCapabilities_dark.png
deleted file mode 100644
index af1211854f4..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideCapabilities_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideCapabilities_light.png b/scripts/ios/screenshots-metal/SlideCapabilities_light.png
deleted file mode 100644
index 17171361d30..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideCapabilities_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideEditor_dark.png b/scripts/ios/screenshots-metal/SlideEditor_dark.png
deleted file mode 100644
index c9e0a436913..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideEditor_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideEditor_light.png b/scripts/ios/screenshots-metal/SlideEditor_light.png
deleted file mode 100644
index 8ad59d3b5ef..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideEditor_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideFadeTitleTransitionTest.png b/scripts/ios/screenshots-metal/SlideFadeTitleTransitionTest.png
deleted file mode 100644
index 761f8877759..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideFadeTitleTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideHorizontalBackTransitionTest.png b/scripts/ios/screenshots-metal/SlideHorizontalBackTransitionTest.png
deleted file mode 100644
index 8586b3c4bda..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideHorizontalBackTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideHorizontalTransitionTest.png b/scripts/ios/screenshots-metal/SlideHorizontalTransitionTest.png
deleted file mode 100644
index a6c9c3f94c2..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideHorizontalTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideTransitionAnimationScreenshotTest.png b/scripts/ios/screenshots-metal/SlideTransitionAnimationScreenshotTest.png
deleted file mode 100644
index 6ed596539f1..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideTransitionAnimationScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SlideVerticalTransitionTest.png b/scripts/ios/screenshots-metal/SlideVerticalTransitionTest.png
deleted file mode 100644
index a49cc725333..00000000000
Binary files a/scripts/ios/screenshots-metal/SlideVerticalTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SmoothScrollScreenshotTest.png b/scripts/ios/screenshots-metal/SmoothScrollScreenshotTest.png
deleted file mode 100644
index 3ea172e4539..00000000000
Binary files a/scripts/ios/screenshots-metal/SmoothScrollScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SpanLabelTheme_dark.png b/scripts/ios/screenshots-metal/SpanLabelTheme_dark.png
deleted file mode 100644
index f99454e6d9d..00000000000
Binary files a/scripts/ios/screenshots-metal/SpanLabelTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SpanLabelTheme_light.png b/scripts/ios/screenshots-metal/SpanLabelTheme_light.png
deleted file mode 100644
index 52a2ec2eb37..00000000000
Binary files a/scripts/ios/screenshots-metal/SpanLabelTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/StatusBarTapDiagnosticScreenshotTest.png b/scripts/ios/screenshots-metal/StatusBarTapDiagnosticScreenshotTest.png
deleted file mode 100644
index ec02e416838..00000000000
Binary files a/scripts/ios/screenshots-metal/StatusBarTapDiagnosticScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/StickyHeaderFadeTransitionScreenshotTest.png b/scripts/ios/screenshots-metal/StickyHeaderFadeTransitionScreenshotTest.png
deleted file mode 100644
index 8a850000024..00000000000
Binary files a/scripts/ios/screenshots-metal/StickyHeaderFadeTransitionScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/StickyHeaderScreenshotTest.png b/scripts/ios/screenshots-metal/StickyHeaderScreenshotTest.png
deleted file mode 100644
index 1faa0dd2ae8..00000000000
Binary files a/scripts/ios/screenshots-metal/StickyHeaderScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/StickyHeaderSlideTransitionScreenshotTest.png b/scripts/ios/screenshots-metal/StickyHeaderSlideTransitionScreenshotTest.png
deleted file mode 100644
index 7eae4b67743..00000000000
Binary files a/scripts/ios/screenshots-metal/StickyHeaderSlideTransitionScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SurfacesRasterizer.png b/scripts/ios/screenshots-metal/SurfacesRasterizer.png
deleted file mode 100644
index dc0d57ab49c..00000000000
Binary files a/scripts/ios/screenshots-metal/SurfacesRasterizer.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SwitchTheme_dark.png b/scripts/ios/screenshots-metal/SwitchTheme_dark.png
deleted file mode 100644
index 29cb9bb3c0c..00000000000
Binary files a/scripts/ios/screenshots-metal/SwitchTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/SwitchTheme_light.png b/scripts/ios/screenshots-metal/SwitchTheme_light.png
deleted file mode 100644
index 176e2df10ab..00000000000
Binary files a/scripts/ios/screenshots-metal/SwitchTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TabsAnimatedIndicatorScreenshotTest.png b/scripts/ios/screenshots-metal/TabsAnimatedIndicatorScreenshotTest.png
deleted file mode 100644
index bae53c607c4..00000000000
Binary files a/scripts/ios/screenshots-metal/TabsAnimatedIndicatorScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TabsBehavior.png b/scripts/ios/screenshots-metal/TabsBehavior.png
deleted file mode 100644
index ce2048cc423..00000000000
Binary files a/scripts/ios/screenshots-metal/TabsBehavior.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TabsTheme_dark.png b/scripts/ios/screenshots-metal/TabsTheme_dark.png
deleted file mode 100644
index 5c3ccafb8b4..00000000000
Binary files a/scripts/ios/screenshots-metal/TabsTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TabsTheme_light.png b/scripts/ios/screenshots-metal/TabsTheme_light.png
deleted file mode 100644
index 33dc796950b..00000000000
Binary files a/scripts/ios/screenshots-metal/TabsTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TensileBounceScreenshotTest.png b/scripts/ios/screenshots-metal/TensileBounceScreenshotTest.png
deleted file mode 100644
index 969fc93affc..00000000000
Binary files a/scripts/ios/screenshots-metal/TensileBounceScreenshotTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TextAreaAlignmentStates.png b/scripts/ios/screenshots-metal/TextAreaAlignmentStates.png
deleted file mode 100644
index 8cce8d509f5..00000000000
Binary files a/scripts/ios/screenshots-metal/TextAreaAlignmentStates.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TextFieldTheme_dark.png b/scripts/ios/screenshots-metal/TextFieldTheme_dark.png
deleted file mode 100644
index e6cb2383931..00000000000
Binary files a/scripts/ios/screenshots-metal/TextFieldTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TextFieldTheme_light.png b/scripts/ios/screenshots-metal/TextFieldTheme_light.png
deleted file mode 100644
index 5eae56ac7ae..00000000000
Binary files a/scripts/ios/screenshots-metal/TextFieldTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ToastBarTopPosition.png b/scripts/ios/screenshots-metal/ToastBarTopPosition.png
deleted file mode 100644
index 561954a99ac..00000000000
Binary files a/scripts/ios/screenshots-metal/ToastBarTopPosition.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ToastBarTopPosition.tolerance b/scripts/ios/screenshots-metal/ToastBarTopPosition.tolerance
deleted file mode 100644
index 9eb8569bb3e..00000000000
--- a/scripts/ios/screenshots-metal/ToastBarTopPosition.tolerance
+++ /dev/null
@@ -1,8 +0,0 @@
-# The toast's bottom edge lands a few device pixels off run-to-run: its height
-# derives from the message font/icon metrics and the layout rounds differently
-# depending on load order (observed: 10 full-width boundary rows at 3x = 0.39%
-# of pixels; the watch leg shows the same class at 2 rows). Allow a small
-# mismatch share; a real failure -- toast absent or mispositioned -- flips >5%
-# of pixels and still fails these bounds.
-maxChannelDelta=32
-maxMismatchPercent=1.5
diff --git a/scripts/ios/screenshots-metal/ToolbarTheme_dark.png b/scripts/ios/screenshots-metal/ToolbarTheme_dark.png
deleted file mode 100644
index 5fd3f37e4f4..00000000000
Binary files a/scripts/ios/screenshots-metal/ToolbarTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/ToolbarTheme_light.png b/scripts/ios/screenshots-metal/ToolbarTheme_light.png
deleted file mode 100644
index 6c3760a31c8..00000000000
Binary files a/scripts/ios/screenshots-metal/ToolbarTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TreeGridTheme_dark.png b/scripts/ios/screenshots-metal/TreeGridTheme_dark.png
deleted file mode 100644
index 3c388309b63..00000000000
Binary files a/scripts/ios/screenshots-metal/TreeGridTheme_dark.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/TreeGridTheme_light.png b/scripts/ios/screenshots-metal/TreeGridTheme_light.png
deleted file mode 100644
index 387e49386b8..00000000000
Binary files a/scripts/ios/screenshots-metal/TreeGridTheme_light.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UncoverHorizontalTransitionTest.png b/scripts/ios/screenshots-metal/UncoverHorizontalTransitionTest.png
deleted file mode 100644
index 4cd00865b7b..00000000000
Binary files a/scripts/ios/screenshots-metal/UncoverHorizontalTransitionTest.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatAnimator.png b/scripts/ios/screenshots-metal/UnityCompatAnimator.png
deleted file mode 100644
index a86197578bf..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatCanvas.png b/scripts/ios/screenshots-metal/UnityCompatCanvas.png
deleted file mode 100644
index a5b39531495..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatCinemachine.png b/scripts/ios/screenshots-metal/UnityCompatCinemachine.png
deleted file mode 100644
index 91c4b71a8f4..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatParticles.png b/scripts/ios/screenshots-metal/UnityCompatParticles.png
deleted file mode 100644
index a76385394ce..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatPhysics.png b/scripts/ios/screenshots-metal/UnityCompatPhysics.png
deleted file mode 100644
index f24c013f43c..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatSprites.png b/scripts/ios/screenshots-metal/UnityCompatSprites.png
deleted file mode 100644
index 4d973b0c9f7..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatTextMeshPro.png b/scripts/ios/screenshots-metal/UnityCompatTextMeshPro.png
deleted file mode 100644
index ab48bff975d..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/UnityCompatTilemap.png b/scripts/ios/screenshots-metal/UnityCompatTilemap.png
deleted file mode 100644
index fb7411c216d..00000000000
Binary files a/scripts/ios/screenshots-metal/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/VRStereoScene.png b/scripts/ios/screenshots-metal/VRStereoScene.png
deleted file mode 100644
index 1b999eec262..00000000000
Binary files a/scripts/ios/screenshots-metal/VRStereoScene.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/VRStereoScene.tolerance b/scripts/ios/screenshots-metal/VRStereoScene.tolerance
deleted file mode 100644
index 67cfcc6747c..00000000000
--- a/scripts/ios/screenshots-metal/VRStereoScene.tolerance
+++ /dev/null
@@ -1,6 +0,0 @@
-# The iOS Metal backend renders the scene (floor gradient + cubes) with more
-# per-pixel variance run-to-run than the default delta=8 GPU tolerance.
-# Widen the per-pixel threshold so gradient noise does not fail the build
-# while a real regression still trips the mismatch percent.
-maxChannelDelta=28
-maxMismatchPercent=5.0
diff --git a/scripts/ios/screenshots-metal/ValidatorLightweightPicker.png b/scripts/ios/screenshots-metal/ValidatorLightweightPicker.png
deleted file mode 100644
index 00d2d8d6cd9..00000000000
Binary files a/scripts/ios/screenshots-metal/ValidatorLightweightPicker.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/VectorMapDarkStyle.png b/scripts/ios/screenshots-metal/VectorMapDarkStyle.png
deleted file mode 100644
index 6bb46a1dd3f..00000000000
Binary files a/scripts/ios/screenshots-metal/VectorMapDarkStyle.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/VectorMapDarkStyle.tolerance b/scripts/ios/screenshots-metal/VectorMapDarkStyle.tolerance
deleted file mode 100644
index 9797569a5fb..00000000000
--- a/scripts/ios/screenshots-metal/VectorMapDarkStyle.tolerance
+++ /dev/null
@@ -1,3 +0,0 @@
-# Deterministic vector tiles; tolerance covers backend AA/font variance.
-maxChannelDelta=40
-maxMismatchPercent=10.0
diff --git a/scripts/ios/screenshots-metal/VectorMapMarkers.png b/scripts/ios/screenshots-metal/VectorMapMarkers.png
deleted file mode 100644
index 22a93e87ecf..00000000000
Binary files a/scripts/ios/screenshots-metal/VectorMapMarkers.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/VectorMapMarkers.tolerance b/scripts/ios/screenshots-metal/VectorMapMarkers.tolerance
deleted file mode 100644
index 9797569a5fb..00000000000
--- a/scripts/ios/screenshots-metal/VectorMapMarkers.tolerance
+++ /dev/null
@@ -1,3 +0,0 @@
-# Deterministic vector tiles; tolerance covers backend AA/font variance.
-maxChannelDelta=40
-maxMismatchPercent=10.0
diff --git a/scripts/ios/screenshots-metal/VectorMapShapes.png b/scripts/ios/screenshots-metal/VectorMapShapes.png
deleted file mode 100644
index 3404e28a9df..00000000000
Binary files a/scripts/ios/screenshots-metal/VectorMapShapes.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/VectorMapShapes.tolerance b/scripts/ios/screenshots-metal/VectorMapShapes.tolerance
deleted file mode 100644
index 9c798a73988..00000000000
--- a/scripts/ios/screenshots-metal/VectorMapShapes.tolerance
+++ /dev/null
@@ -1,5 +0,0 @@
-# Vector tiles plus translucent polyline/polygon/circle overlays, whose alpha
-# blending varies run-to-run on some GPU backends (notably the Android emulator);
-# wider tolerance. Still fails loudly on a blank/margined/wrong map.
-maxChannelDelta=48
-maxMismatchPercent=25.0
diff --git a/scripts/ios/screenshots-metal/VideoIODecodedFrames.png b/scripts/ios/screenshots-metal/VideoIODecodedFrames.png
deleted file mode 100644
index befb340b6b1..00000000000
Binary files a/scripts/ios/screenshots-metal/VideoIODecodedFrames.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-bar-stacked.png b/scripts/ios/screenshots-metal/chart-bar-stacked.png
deleted file mode 100644
index 8d555370b80..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-bar-stacked.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-bar.png b/scripts/ios/screenshots-metal/chart-bar.png
deleted file mode 100644
index f08f90290fe..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-bar.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-bubble.png b/scripts/ios/screenshots-metal/chart-bubble.png
deleted file mode 100644
index e845bdbcea2..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-bubble.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-combined-xy.png b/scripts/ios/screenshots-metal/chart-combined-xy.png
deleted file mode 100644
index 6e8f556c002..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-combined-xy.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-cubic-line.png b/scripts/ios/screenshots-metal/chart-cubic-line.png
deleted file mode 100644
index 3503f6d8a3c..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-cubic-line.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-doughnut.png b/scripts/ios/screenshots-metal/chart-doughnut.png
deleted file mode 100644
index 441d8dfb472..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-doughnut.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-line.png b/scripts/ios/screenshots-metal/chart-line.png
deleted file mode 100644
index 74ad9e378d8..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-line.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-pie.png b/scripts/ios/screenshots-metal/chart-pie.png
deleted file mode 100644
index a20fe39e9fd..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-pie.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-radar.png b/scripts/ios/screenshots-metal/chart-radar.png
deleted file mode 100644
index 19fdb0feddc..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-radar.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-range-bar.png b/scripts/ios/screenshots-metal/chart-range-bar.png
deleted file mode 100644
index 0c7d75c9cef..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-range-bar.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-rotated-pie.png b/scripts/ios/screenshots-metal/chart-rotated-pie.png
deleted file mode 100644
index b78114b0660..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-rotated-pie.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-rotated-pie.tolerance b/scripts/ios/screenshots-metal/chart-rotated-pie.tolerance
deleted file mode 100644
index 4168691e79e..00000000000
--- a/scripts/ios/screenshots-metal/chart-rotated-pie.tolerance
+++ /dev/null
@@ -1,7 +0,0 @@
-# Vector-heavy render with run-to-run anti-aliasing jitter that straddles the
-# tightened 0.05% pipeline gate (re-flagged with fresh pixels immediately
-# after its golden was refreshed, the nondeterminism signature). Keep the
-# pre-tightening gate for this screen only; a real regression still moves far
-# more than 0.30% of the frame.
-maxChannelDelta=4
-maxMismatchPercent=0.30
diff --git a/scripts/ios/screenshots-metal/chart-scatter.png b/scripts/ios/screenshots-metal/chart-scatter.png
deleted file mode 100644
index 3ec2731e630..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-scatter.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-time.png b/scripts/ios/screenshots-metal/chart-time.png
deleted file mode 100644
index d4fa21afd71..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-time.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-transform.png b/scripts/ios/screenshots-metal/chart-transform.png
deleted file mode 100644
index 8dfb537e5a6..00000000000
Binary files a/scripts/ios/screenshots-metal/chart-transform.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart-transform.tolerance b/scripts/ios/screenshots-metal/chart-transform.tolerance
deleted file mode 100644
index 9d925b15820..00000000000
--- a/scripts/ios/screenshots-metal/chart-transform.tolerance
+++ /dev/null
@@ -1,7 +0,0 @@
-# 3D-transformed chart with run-to-run anti-aliasing jitter that straddles
-# the tightened 0.05% pipeline gate (flapped on a rerun with fresh pixels
-# while every other screen matched, the nondeterminism signature -- same
-# family as chart-rotated-pie). Keep the pre-tightening gate for this screen
-# only; a real regression still moves far more than 0.30% of the frame.
-maxChannelDelta=4
-maxMismatchPercent=0.30
diff --git a/scripts/ios/screenshots-metal/chart2-bar-styles.png b/scripts/ios/screenshots-metal/chart2-bar-styles.png
deleted file mode 100644
index a17533a4a4f..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-bar-styles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-boxplot.png b/scripts/ios/screenshots-metal/chart2-boxplot.png
deleted file mode 100644
index 2cbc6b17203..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-boxplot.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-brush.png b/scripts/ios/screenshots-metal/chart2-brush.png
deleted file mode 100644
index 2b9c6cf443f..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-brush.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-candles.png b/scripts/ios/screenshots-metal/chart2-candles.png
deleted file mode 100644
index db3d74d5a12..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-candles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-dense-labels.png b/scripts/ios/screenshots-metal/chart2-dense-labels.png
deleted file mode 100644
index 498a58465d0..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-dense-labels.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-doughnut.png b/scripts/ios/screenshots-metal/chart2-doughnut.png
deleted file mode 100644
index 497120130d8..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-doughnut.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-financial-styles.png b/scripts/ios/screenshots-metal/chart2-financial-styles.png
deleted file mode 100644
index 423ff7d4fdd..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-financial-styles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-flame-graph.png b/scripts/ios/screenshots-metal/chart2-flame-graph.png
deleted file mode 100644
index fa7e9280628..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-flame-graph.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-funnel.png b/scripts/ios/screenshots-metal/chart2-funnel.png
deleted file mode 100644
index f48f77ba29f..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-funnel.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-gauge.png b/scripts/ios/screenshots-metal/chart2-gauge.png
deleted file mode 100644
index ac4f41fd966..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-gauge.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-heatmap.png b/scripts/ios/screenshots-metal/chart2-heatmap.png
deleted file mode 100644
index edd30b2ae80..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-heatmap.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-line-styles.png b/scripts/ios/screenshots-metal/chart2-line-styles.png
deleted file mode 100644
index b42d314c72b..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-line-styles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-mixed.png b/scripts/ios/screenshots-metal/chart2-mixed.png
deleted file mode 100644
index 9793b798461..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-mixed.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-pie.png b/scripts/ios/screenshots-metal/chart2-pie.png
deleted file mode 100644
index 5dfdc16d923..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-pie.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-point-styles.png b/scripts/ios/screenshots-metal/chart2-point-styles.png
deleted file mode 100644
index a9fbc4f4f0c..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-point-styles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-radar.png b/scripts/ios/screenshots-metal/chart2-radar.png
deleted file mode 100644
index 8a6b1e1094c..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-radar.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-sankey.png b/scripts/ios/screenshots-metal/chart2-sankey.png
deleted file mode 100644
index ee6b1b6bc53..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-sankey.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-sparklines.png b/scripts/ios/screenshots-metal/chart2-sparklines.png
deleted file mode 100644
index 47eec1ee233..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-sparklines.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-sunburst.png b/scripts/ios/screenshots-metal/chart2-sunburst.png
deleted file mode 100644
index a9990942dad..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-sunburst.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-treemap.png b/scripts/ios/screenshots-metal/chart2-treemap.png
deleted file mode 100644
index be4c98bb786..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-treemap.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/chart2-waterfall.png b/scripts/ios/screenshots-metal/chart2-waterfall.png
deleted file mode 100644
index 6bf6dff5263..00000000000
Binary files a/scripts/ios/screenshots-metal/chart2-waterfall.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/css-gradients.png b/scripts/ios/screenshots-metal/css-gradients.png
deleted file mode 100644
index 10ff97ef54a..00000000000
Binary files a/scripts/ios/screenshots-metal/css-gradients.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-affine-scale.png b/scripts/ios/screenshots-metal/graphics-affine-scale.png
deleted file mode 100644
index 05a3dfbe42e..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-affine-scale.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-clip-under-rotation.png b/scripts/ios/screenshots-metal/graphics-clip-under-rotation.png
deleted file mode 100644
index 5d9efa1a87c..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-clip-under-rotation.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-clip.png b/scripts/ios/screenshots-metal/graphics-clip.png
deleted file mode 100644
index 27e4d9face5..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-clip.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-arc.png b/scripts/ios/screenshots-metal/graphics-draw-arc.png
deleted file mode 100644
index 97bc5f1923d..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-arc.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-gradient-stops.png b/scripts/ios/screenshots-metal/graphics-draw-gradient-stops.png
deleted file mode 100644
index aaa304a0ac4..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-gradient-stops.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-gradient.png b/scripts/ios/screenshots-metal/graphics-draw-gradient.png
deleted file mode 100644
index c56aee56177..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-gradient.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-image-rect.png b/scripts/ios/screenshots-metal/graphics-draw-image-rect.png
deleted file mode 100644
index 05c67699d9f..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-image-rect.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-line.png b/scripts/ios/screenshots-metal/graphics-draw-line.png
deleted file mode 100644
index 73c31380012..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-line.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-rect.png b/scripts/ios/screenshots-metal/graphics-draw-rect.png
deleted file mode 100644
index 7f4385936b9..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-rect.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-round-rect.png b/scripts/ios/screenshots-metal/graphics-draw-round-rect.png
deleted file mode 100644
index ad019d183ec..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-round-rect.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-shape.png b/scripts/ios/screenshots-metal/graphics-draw-shape.png
deleted file mode 100644
index bae0a508e17..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-shape.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-string-decorated.png b/scripts/ios/screenshots-metal/graphics-draw-string-decorated.png
deleted file mode 100644
index a5a517c963e..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-string-decorated.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-draw-string.png b/scripts/ios/screenshots-metal/graphics-draw-string.png
deleted file mode 100644
index 219e5bf0fdf..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-draw-string.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-empty-clip.png b/scripts/ios/screenshots-metal/graphics-empty-clip.png
deleted file mode 100644
index 7d281bfab63..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-empty-clip.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-fill-arc.png b/scripts/ios/screenshots-metal/graphics-fill-arc.png
deleted file mode 100644
index fbd87e29718..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-fill-arc.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-fill-polygon.png b/scripts/ios/screenshots-metal/graphics-fill-polygon.png
deleted file mode 100644
index e9511e29da2..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-fill-polygon.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-fill-rect.png b/scripts/ios/screenshots-metal/graphics-fill-rect.png
deleted file mode 100644
index bd05fe33aea..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-fill-rect.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-fill-round-rect.png b/scripts/ios/screenshots-metal/graphics-fill-round-rect.png
deleted file mode 100644
index 96d19c60e80..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-fill-round-rect.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-fill-shape.png b/scripts/ios/screenshots-metal/graphics-fill-shape.png
deleted file mode 100644
index 4ee142e7480..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-fill-shape.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-fill-triangle.png b/scripts/ios/screenshots-metal/graphics-fill-triangle.png
deleted file mode 100644
index 427b604f1c1..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-fill-triangle.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-gaussian-blur.png b/scripts/ios/screenshots-metal/graphics-gaussian-blur.png
deleted file mode 100644
index a4c5f2a548c..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-gaussian-blur.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-inscribed-triangle-grid.png b/scripts/ios/screenshots-metal/graphics-inscribed-triangle-grid.png
deleted file mode 100644
index e8e4c18f748..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-inscribed-triangle-grid.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-inscribed-triangle-grid.tolerance b/scripts/ios/screenshots-metal/graphics-inscribed-triangle-grid.tolerance
deleted file mode 100644
index 4286e36c995..00000000000
--- a/scripts/ios/screenshots-metal/graphics-inscribed-triangle-grid.tolerance
+++ /dev/null
@@ -1,7 +0,0 @@
-# Dense vector triangle grid with run-to-run anti-aliasing jitter that
-# straddles the tightened 0.05% pipeline gate (flapped with fresh pixels on
-# a rerun while every other screen matched -- same family as
-# chart-rotated-pie and chart-transform). Keep the pre-tightening gate for
-# this screen only; a real regression still moves far more than 0.30%.
-maxChannelDelta=4
-maxMismatchPercent=0.30
diff --git a/scripts/ios/screenshots-metal/graphics-large-stroke-dirty-clip.png b/scripts/ios/screenshots-metal/graphics-large-stroke-dirty-clip.png
deleted file mode 100644
index 2d61261cec7..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-large-stroke-dirty-clip.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-partial-flush-clip-escape.png b/scripts/ios/screenshots-metal/graphics-partial-flush-clip-escape.png
deleted file mode 100644
index 286eb9ceed3..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-partial-flush-clip-escape.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-rotate.png b/scripts/ios/screenshots-metal/graphics-rotate.png
deleted file mode 100644
index db64cfe2afd..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-rotate.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-scale.png b/scripts/ios/screenshots-metal/graphics-scale.png
deleted file mode 100644
index 25f475ee80c..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-scale.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-stroke-test.png b/scripts/ios/screenshots-metal/graphics-stroke-test.png
deleted file mode 100644
index 0d6823bca61..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-stroke-test.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-tile-image.png b/scripts/ios/screenshots-metal/graphics-tile-image.png
deleted file mode 100644
index 64bcf4298be..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-tile-image.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-transform-camera.png b/scripts/ios/screenshots-metal/graphics-transform-camera.png
deleted file mode 100644
index 4f89c32cfd4..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-transform-camera.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-transform-perspective.png b/scripts/ios/screenshots-metal/graphics-transform-perspective.png
deleted file mode 100644
index d4c6c744e02..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-transform-perspective.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-transform-rotation.png b/scripts/ios/screenshots-metal/graphics-transform-rotation.png
deleted file mode 100644
index 7f55c106a98..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-transform-rotation.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/graphics-transform-translation.png b/scripts/ios/screenshots-metal/graphics-transform-translation.png
deleted file mode 100644
index c123ef9089b..00000000000
Binary files a/scripts/ios/screenshots-metal/graphics-transform-translation.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/kotlin.png b/scripts/ios/screenshots-metal/kotlin.png
deleted file mode 100644
index 788bd4159e7..00000000000
Binary files a/scripts/ios/screenshots-metal/kotlin.png and /dev/null differ
diff --git a/scripts/ios/screenshots-metal/landscape.png b/scripts/ios/screenshots-metal/landscape.png
deleted file mode 100644
index 3c727404e56..00000000000
Binary files a/scripts/ios/screenshots-metal/landscape.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/README.md b/scripts/ios/screenshots-tv/README.md
index bad39bd4fda..bead53b686c 100644
--- a/scripts/ios/screenshots-tv/README.md
+++ b/scripts/ios/screenshots-tv/README.md
@@ -1,10 +1,10 @@
# Apple TV (tvOS) screenshot goldens
-Reference PNGs for the `build-ios-tv` CI job (`scripts/run-tv-ui-tests.sh`),
+Reference PNGs for the the tvOS suite of the `apple` job CI job (`scripts/run-tv-ui-tests.sh`),
captured from the `hellocodenameone` `cn1ss` suite running on the tvOS simulator
(1920x1080) and streamed to the test server in `scripts/hellocodenameone/backend`.
This set is seeded once the tvOS native slice compiles end-to-end (see
`Ports/iOSPort/nativeSources/TVOS_PORT.md`), the same way the watch goldens in
-`../screenshots-watch` were bootstrapped in CI. Until then the `build-ios-tv`
+`../screenshots-watch` were bootstrapped in CI. Until then the the tvOS suite of the `apple` job
job runs non-blocking.
diff --git a/scripts/ios/screenshots-tv/UnityCompatAnimator.png b/scripts/ios/screenshots-tv/UnityCompatAnimator.png
deleted file mode 100644
index e04b05b825e..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/UnityCompatCanvas.png b/scripts/ios/screenshots-tv/UnityCompatCanvas.png
deleted file mode 100644
index 06b82aa6e04..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/UnityCompatCinemachine.png b/scripts/ios/screenshots-tv/UnityCompatCinemachine.png
deleted file mode 100644
index ada7a453d27..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/UnityCompatParticles.png b/scripts/ios/screenshots-tv/UnityCompatParticles.png
deleted file mode 100644
index 8d50ca26d46..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/UnityCompatPhysics.png b/scripts/ios/screenshots-tv/UnityCompatPhysics.png
deleted file mode 100644
index 423d12cd86f..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/UnityCompatSprites.png b/scripts/ios/screenshots-tv/UnityCompatSprites.png
deleted file mode 100644
index dd565f7b54d..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/UnityCompatTextMeshPro.png b/scripts/ios/screenshots-tv/UnityCompatTextMeshPro.png
deleted file mode 100644
index 62ab1d2c83f..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/UnityCompatTilemap.png b/scripts/ios/screenshots-tv/UnityCompatTilemap.png
deleted file mode 100644
index 6c541d425bb..00000000000
Binary files a/scripts/ios/screenshots-tv/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/ios/screenshots-tv/chart2-shared-tooltip.png b/scripts/ios/screenshots-tv/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..704fe8172a0
Binary files /dev/null and b/scripts/ios/screenshots-tv/chart2-shared-tooltip.png differ
diff --git a/scripts/ios/screenshots-watch/chart2-shared-tooltip.png b/scripts/ios/screenshots-watch/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..d3d17a9c40c
Binary files /dev/null and b/scripts/ios/screenshots-watch/chart2-shared-tooltip.png differ
diff --git a/scripts/javascript/screenshots/UnityCompatAnimator.png b/scripts/javascript/screenshots/UnityCompatAnimator.png
deleted file mode 100644
index ebc71a81d8d..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/UnityCompatCanvas.png b/scripts/javascript/screenshots/UnityCompatCanvas.png
deleted file mode 100644
index 804ab7f7f10..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/UnityCompatCinemachine.png b/scripts/javascript/screenshots/UnityCompatCinemachine.png
deleted file mode 100644
index 1749fec94a5..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/UnityCompatParticles.png b/scripts/javascript/screenshots/UnityCompatParticles.png
deleted file mode 100644
index 2019f400d5e..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/UnityCompatPhysics.png b/scripts/javascript/screenshots/UnityCompatPhysics.png
deleted file mode 100644
index f67e614ab78..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/UnityCompatSprites.png b/scripts/javascript/screenshots/UnityCompatSprites.png
deleted file mode 100644
index 810e31af75b..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/UnityCompatTextMeshPro.png b/scripts/javascript/screenshots/UnityCompatTextMeshPro.png
deleted file mode 100644
index 15c6c3578ec..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/UnityCompatTilemap.png b/scripts/javascript/screenshots/UnityCompatTilemap.png
deleted file mode 100644
index cae89f96425..00000000000
Binary files a/scripts/javascript/screenshots/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/javascript/screenshots/chart2-shared-tooltip.png b/scripts/javascript/screenshots/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..cf959adf8c4
Binary files /dev/null and b/scripts/javascript/screenshots/chart2-shared-tooltip.png differ
diff --git a/scripts/lib/xcode.sh b/scripts/lib/xcode.sh
index f6365137a1a..57bc925d147 100644
--- a/scripts/lib/xcode.sh
+++ b/scripts/lib/xcode.sh
@@ -37,7 +37,7 @@
# The Xcode major the tree is validated against. Raising this is the one edit a
# toolchain move needs; every script and workflow reads it from here.
-: "${CN1_XCODE_MAJOR:=26}"
+: "${CN1_XCODE_MAJOR:=27}"
# Optional exact release within that major (e.g. 27.1). Unset, the newest
# install of the major wins. Set it where an image carries several releases of
# one major and the leg's baselines were measured on a particular one: the
diff --git a/scripts/linux/screenshots-arm/UnityCompatAnimator.png b/scripts/linux/screenshots-arm/UnityCompatAnimator.png
deleted file mode 100644
index 872811341c0..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/UnityCompatCanvas.png b/scripts/linux/screenshots-arm/UnityCompatCanvas.png
deleted file mode 100644
index a9e9be920dd..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/UnityCompatCinemachine.png b/scripts/linux/screenshots-arm/UnityCompatCinemachine.png
deleted file mode 100644
index cbc35b85fa3..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/UnityCompatParticles.png b/scripts/linux/screenshots-arm/UnityCompatParticles.png
deleted file mode 100644
index a8b0003f12c..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/UnityCompatPhysics.png b/scripts/linux/screenshots-arm/UnityCompatPhysics.png
deleted file mode 100644
index fc98a494118..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/UnityCompatSprites.png b/scripts/linux/screenshots-arm/UnityCompatSprites.png
deleted file mode 100644
index d8f36d9200d..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/UnityCompatTextMeshPro.png b/scripts/linux/screenshots-arm/UnityCompatTextMeshPro.png
deleted file mode 100644
index 7ac20511c7a..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/UnityCompatTilemap.png b/scripts/linux/screenshots-arm/UnityCompatTilemap.png
deleted file mode 100644
index 073e3f16101..00000000000
Binary files a/scripts/linux/screenshots-arm/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/linux/screenshots-arm/chart2-shared-tooltip.png b/scripts/linux/screenshots-arm/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..38a32bcb54d
Binary files /dev/null and b/scripts/linux/screenshots-arm/chart2-shared-tooltip.png differ
diff --git a/scripts/linux/screenshots/UnityCompatAnimator.png b/scripts/linux/screenshots/UnityCompatAnimator.png
deleted file mode 100644
index c771c6bd1c0..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/linux/screenshots/UnityCompatCanvas.png b/scripts/linux/screenshots/UnityCompatCanvas.png
deleted file mode 100644
index 1baa713a30c..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/linux/screenshots/UnityCompatCinemachine.png b/scripts/linux/screenshots/UnityCompatCinemachine.png
deleted file mode 100644
index 8ae52992d54..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/linux/screenshots/UnityCompatParticles.png b/scripts/linux/screenshots/UnityCompatParticles.png
deleted file mode 100644
index f13ecd1cbb4..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/linux/screenshots/UnityCompatPhysics.png b/scripts/linux/screenshots/UnityCompatPhysics.png
deleted file mode 100644
index e0f7cb33669..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/linux/screenshots/UnityCompatSprites.png b/scripts/linux/screenshots/UnityCompatSprites.png
deleted file mode 100644
index 0c0f2d9fb0e..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/linux/screenshots/UnityCompatTextMeshPro.png b/scripts/linux/screenshots/UnityCompatTextMeshPro.png
deleted file mode 100644
index 7ac20511c7a..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/linux/screenshots/UnityCompatTilemap.png b/scripts/linux/screenshots/UnityCompatTilemap.png
deleted file mode 100644
index b8722c514f6..00000000000
Binary files a/scripts/linux/screenshots/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/linux/screenshots/chart2-shared-tooltip.png b/scripts/linux/screenshots/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..38a32bcb54d
Binary files /dev/null and b/scripts/linux/screenshots/chart2-shared-tooltip.png differ
diff --git a/scripts/macos/screenshots/README.md b/scripts/macos/screenshots/README.md
index 75f0129e864..6a8de9089b8 100644
--- a/scripts/macos/screenshots/README.md
+++ b/scripts/macos/screenshots/README.md
@@ -1,14 +1,14 @@
# macOS screenshot baselines
Reference images for the native macOS (AppKit) build, target `mac-os-x-native`.
-The `build-macos` job in
-[`.github/workflows/scripts-macos.yml`](../../../.github/workflows/scripts-macos.yml)
+The macOS suite of the `apple` job in
+[`.github/workflows/scripts-ios.yml`](../../../.github/workflows/scripts-ios.yml)
compares `scripts/hellocodenameone` output against these PNGs via
[`scripts/run-macos-ui-tests.sh`](../../run-macos-ui-tests.sh).
## Adopting the first baseline
-1. Run the `build-macos` job and download the `macos-ui-tests` artifact.
+1. Run the `apple` job and download the `macos-ui-tests` artifact.
2. Review every capture against the rules below.
3. Commit the accepted PNGs in one commit that names the run that produced them.
4. Run the suite a second time. It must be strict-green with zero differences.
@@ -17,7 +17,7 @@ compares `scripts/hellocodenameone` output against these PNGs via
## Review rules
-Open each new golden beside its counterpart in `../../ios/screenshots-metal/`
+Open each new golden beside its counterpart in `../../ios/screenshots-metal-27/`
as a **review aid, never as a source**. Then:
- **Layout differences are bugs.** A widget that is shifted, clipped, wrapped
diff --git a/scripts/macos/screenshots/chart2-shared-tooltip.png b/scripts/macos/screenshots/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..9adbeadfe7b
Binary files /dev/null and b/scripts/macos/screenshots/chart2-shared-tooltip.png differ
diff --git a/scripts/papercut/README.adoc b/scripts/papercut/README.adoc
index 8edc742b24d..0405f318b56 100644
--- a/scripts/papercut/README.adoc
+++ b/scripts/papercut/README.adoc
@@ -93,7 +93,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test # <1>
<3> Generates a project from the Initializr template, under another name and
package, and builds it.
-`.github/workflows/papercut.yml` runs them, and builds the app for Android and
+`.github/workflows/samples.yml` runs them, and builds the app for Android and
iOS.
== The Initializr template
diff --git a/scripts/parley/README.adoc b/scripts/parley/README.adoc
index edca57862d8..b31fbb95dbb 100644
--- a/scripts/parley/README.adoc
+++ b/scripts/parley/README.adoc
@@ -226,7 +226,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
`npx playwright install chromium` in `scripts/`). Screenshots and logs go
to `target/web-e2e`.
-`.github/workflows/parley.yml` runs all five, and builds the application for
+`.github/workflows/samples.yml` runs all five, and builds the application for
Android and iOS through `scripts/build-android-app.sh` and
`scripts/build-ios-app.sh` with `CN1_APP_DIR=scripts/parley`.
diff --git a/scripts/pulse/README.adoc b/scripts/pulse/README.adoc
index c5baf976ee2..b0685473366 100644
--- a/scripts/pulse/README.adoc
+++ b/scripts/pulse/README.adoc
@@ -181,7 +181,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
it, and drives it in a headless browser. Needs Node with Playwright and its
Chromium (`npm ci` and `npx playwright install chromium` in `scripts/`).
-`.github/workflows/pulse.yml` runs them, and builds the application for Android
+`.github/workflows/samples.yml` runs them, and builds the application for Android
and iOS through `scripts/build-android-app.sh` and `scripts/build-ios-app.sh`
with `CN1_APP_DIR=scripts/pulse`.
diff --git a/scripts/reel/README.adoc b/scripts/reel/README.adoc
index c7fff8d284f..88d5dc982f8 100644
--- a/scripts/reel/README.adoc
+++ b/scripts/reel/README.adoc
@@ -166,7 +166,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
`npx playwright install chromium` in `scripts/`). Screenshots and logs go
to `target/web-e2e`.
-`.github/workflows/reel.yml` runs all five, and builds the application for
+`.github/workflows/samples.yml` runs all five, and builds the application for
Android and iOS through `scripts/build-android-app.sh` and
`scripts/build-ios-app.sh` with `CN1_APP_DIR=scripts/reel`.
diff --git a/scripts/run-android-fidelity-tests.sh b/scripts/run-android-fidelity-tests.sh
index 1b5f65f6082..a13172c27ea 100755
--- a/scripts/run-android-fidelity-tests.sh
+++ b/scripts/run-android-fidelity-tests.sh
@@ -168,7 +168,7 @@ PYEOF
if [ -n "$SIZE_MISMATCHES" ]; then
rf_log "FATAL: CN1 tile canvas differs from the committed golden -- the render"
rf_log "environment violates the golden contract (480x800 @ 160dpi; see the"
- rf_log "wm size/density override in scripts-fidelity.yml):"
+ rf_log "wm size/density override in scripts-android.yml):"
printf '%s\n' "$SIZE_MISMATCHES" | while IFS= read -r line; do rf_log " $line"; done
exit 13
fi
diff --git a/scripts/run-ios-ui-tests.sh b/scripts/run-ios-ui-tests.sh
index 038fcea7a0d..b82153a14f6 100755
--- a/scripts/run-ios-ui-tests.sh
+++ b/scripts/run-ios-ui-tests.sh
@@ -182,7 +182,7 @@ if [[ "$WORKSPACE_PATH" == *.xcworkspace ]] && [[ "$SCHEME" != *" ("* ]]; then
fi
ri_log "Using scheme $SCHEME"
-# The golden-image directory defaults to scripts/ios/screenshots-metal, the
+# The golden-image directory defaults to scripts/ios/screenshots-metal-27, the
# baseline for the iOS simulator. Callers can override via SCREENSHOT_REF_DIR
# (absolute or relative to the repo root) so a variant suite can ship its own
# golden set.
@@ -196,7 +196,7 @@ if [ -n "${SCREENSHOT_REF_DIR:-}" ]; then
SCREENSHOT_REF_DIR="$(cd "$SCREENSHOT_REF_DIR" && pwd)"
ri_log "Using screenshot reference dir from SCREENSHOT_REF_DIR: $SCREENSHOT_REF_DIR"
else
- SCREENSHOT_REF_DIR="$SCRIPT_DIR/ios/screenshots-metal"
+ SCREENSHOT_REF_DIR="$SCRIPT_DIR/ios/screenshots-metal-27"
fi
SCREENSHOT_TMP_DIR="$(mktemp -d "${TMPDIR}/cn1-ios-tests-XXXXXX" 2>/dev/null || echo "${TMPDIR}/cn1-ios-tests")"
SCREENSHOT_RAW_DIR="$SCREENSHOT_TMP_DIR/raw"
diff --git a/scripts/run-tv-ui-tests.sh b/scripts/run-tv-ui-tests.sh
index 7b7a395e589..c9e68b36173 100755
--- a/scripts/run-tv-ui-tests.sh
+++ b/scripts/run-tv-ui-tests.sh
@@ -144,6 +144,19 @@ cn1ss_start_ws_server "$WS_RAW_DIR" || { rt_log "Failed to start the test server
rt_log "WS sink on port ${CN1SS_WS_PORT:-8765} -> $WS_RAW_DIR"
xcrun simctl terminate "$TV_UDID" "$BUNDLE_ID" 2>/dev/null || true
+# The simulator booted before the build can be Shutdown by the time the build
+# ends: on the xcode-27 image it was, and install then failed with
+# "Unable to lookup in current state: Shutdown". Boot it again here, and fail
+# with the reason instead of on the install.
+for attempt in 1 2 3; do
+ if xcrun simctl list devices 2>/dev/null | grep "$TV_UDID" | grep -q "(Booted)"; then break; fi
+ rt_log "Simulator $TV_UDID is not booted (attempt $attempt); booting"
+ xcrun simctl boot "$TV_UDID" || true
+ xcrun simctl bootstatus "$TV_UDID" -b || true
+done
+if ! xcrun simctl list devices 2>/dev/null | grep "$TV_UDID" | grep -q "(Booted)"; then
+ rt_log "Simulator $TV_UDID would not boot"; xcrun simctl list devices | grep "$TV_UDID" >&2 || true; exit 7
+fi
xcrun simctl install "$TV_UDID" "$APP_PATH"
# Capture the app's stdout/stderr (the CN1SS:* suite markers and any native
# exception / crash) so a no-screenshot run is diagnosable instead of silent.
diff --git a/scripts/run-watch-ui-tests.sh b/scripts/run-watch-ui-tests.sh
index 32d57fd3a4b..b790702f208 100755
--- a/scripts/run-watch-ui-tests.sh
+++ b/scripts/run-watch-ui-tests.sh
@@ -163,6 +163,19 @@ cn1ss_start_ws_server "$WS_RAW_DIR" || { rw_log "Failed to start the test server
rw_log "WS sink on port ${CN1SS_WS_PORT:-8765} -> $WS_RAW_DIR"
xcrun simctl terminate "$WATCH_UDID" "$BUNDLE_ID" 2>/dev/null || true
+# The simulator booted before the build can be Shutdown by the time the build
+# ends: on the xcode-27 image it was, and install then failed with
+# "Unable to lookup in current state: Shutdown". Boot it again here, and fail
+# with the reason instead of on the install.
+for attempt in 1 2 3; do
+ if xcrun simctl list devices 2>/dev/null | grep "$WATCH_UDID" | grep -q "(Booted)"; then break; fi
+ rw_log "Simulator $WATCH_UDID is not booted (attempt $attempt); booting"
+ xcrun simctl boot "$WATCH_UDID" || true
+ xcrun simctl bootstatus "$WATCH_UDID" -b || true
+done
+if ! xcrun simctl list devices 2>/dev/null | grep "$WATCH_UDID" | grep -q "(Booted)"; then
+ rw_log "Simulator $WATCH_UDID would not boot"; xcrun simctl list devices | grep "$WATCH_UDID" >&2 || true; exit 7
+fi
WATCH_LOG_START="$(/bin/date -u '+%Y-%m-%d %H:%M:%S %z')"
xcrun simctl install "$WATCH_UDID" "$APP_PATH"
# Stream the app's os_log/NSLog output into the artifacts so suite-side failures
diff --git a/scripts/savor/README.adoc b/scripts/savor/README.adoc
index f045c49355c..e5f720b061e 100644
--- a/scripts/savor/README.adoc
+++ b/scripts/savor/README.adoc
@@ -223,7 +223,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
`npx playwright install chromium` in `scripts/`). Screenshots and logs go
to `target/web-e2e`.
-`.github/workflows/savor.yml` runs all five, and builds the application for
+`.github/workflows/samples.yml` runs all five, and builds the application for
Android and iOS through `scripts/build-android-app.sh` and
`scripts/build-ios-app.sh` with `CN1_APP_DIR=scripts/savor`.
diff --git a/scripts/setup-workspace.sh b/scripts/setup-workspace.sh
index 5407d1fd781..e7b4832531b 100755
--- a/scripts/setup-workspace.sh
+++ b/scripts/setup-workspace.sh
@@ -345,7 +345,18 @@ mvn_retry() {
return 0
fi
else
- if "$MAVEN_HOME/bin/mvn" -U "$@"; then
+ # A retry also drops -T. "Could not acquire lock(s)" under -T 1C is the
+ # reactor's own threads contending for the in-JVM named locks, not another
+ # process: car-android failed all four parallel attempts that way, 300s lock
+ # wait included, on a run whose code had nothing to do with it. Serially there
+ # is nobody to contend with; it is slower, and only paid after a failure.
+ local args=() skip=0 a
+ for a in "$@"; do
+ if [ "$skip" = 1 ]; then skip=0; continue; fi
+ if [ "$a" = "-T" ]; then skip=1; continue; fi
+ args+=("$a")
+ done
+ if "$MAVEN_HOME/bin/mvn" -U "${args[@]}"; then
return 0
fi
fi
diff --git a/scripts/skirmish/README.adoc b/scripts/skirmish/README.adoc
index d945d025bcc..ee53796ce10 100644
--- a/scripts/skirmish/README.adoc
+++ b/scripts/skirmish/README.adoc
@@ -88,7 +88,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test # <2>
<4> Generates a project from the Initializr template, under another name and
package, and builds it.
-`.github/workflows/skirmish.yml` runs them, and builds the app for Android and
+`.github/workflows/samples.yml` runs them, and builds the app for Android and
iOS.
== The Initializr template
diff --git a/scripts/slate/README.adoc b/scripts/slate/README.adoc
index 89d538008df..68dba2bbf28 100644
--- a/scripts/slate/README.adoc
+++ b/scripts/slate/README.adoc
@@ -196,7 +196,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
it, and drives it in a headless browser. Needs Node with Playwright and its
Chromium (`npm ci` and `npx playwright install chromium` in `scripts/`).
-`.github/workflows/slate.yml` runs them, and builds the application for Android
+`.github/workflows/samples.yml` runs them, and builds the application for Android
and iOS through `scripts/build-android-app.sh` and `scripts/build-ios-app.sh`
with `CN1_APP_DIR=scripts/slate`.
diff --git a/scripts/splat/README.adoc b/scripts/splat/README.adoc
index f160a769df3..4aa32018206 100644
--- a/scripts/splat/README.adoc
+++ b/scripts/splat/README.adoc
@@ -93,7 +93,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test # <2>
<4> Generates a project from the Initializr template, under another name and
package, and builds it.
-`.github/workflows/splat.yml` runs them, and builds the app for Android and
+`.github/workflows/samples.yml` runs them, and builds the app for Android and
iOS.
== The Initializr template
diff --git a/scripts/tests/generate-initializr-fixtures.py b/scripts/tests/generate-initializr-fixtures.py
index d6548132ca6..de175a7a9c0 100644
--- a/scripts/tests/generate-initializr-fixtures.py
+++ b/scripts/tests/generate-initializr-fixtures.py
@@ -118,7 +118,7 @@ def check_maven_layout_fixture(archive, z):
'DASH': None,
'SPLAT': None,
'PAPERCUT': None,
- 'PARLEY': 'codename1.arg.ios.NSLocationWhenInUseUsageDescription=',
+ 'PARLEY': 'codename1.arg.ios.NSMicrophoneUsageDescription=',
'BASTION': 'codename1.arg.ios.detectJailbreak=true',
'REEL': None,
'PULSE': 'codename1.arg.ios.NSHealthShareUsageDescription=',
diff --git a/scripts/unity-gallery-prebuilt.sh b/scripts/unity-gallery-prebuilt.sh
deleted file mode 100755
index 7a04903f9bf..00000000000
--- a/scripts/unity-gallery-prebuilt.sh
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Codename One designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Codename One through http://www.codenameone.com/ if you
-# need additional information or have any questions.
-#
-# Carries the compiled Unity gallery of scripts/hellocodenameone from the one
-# machine that has the .NET SDK to the ones that build the application
-# without it.
-#
-# scripts/unity-gallery-prebuilt.sh pack
-# scripts/unity-gallery-prebuilt.sh unpack
-#
-# scripts/hellocodenameone/common compiles scripts/unity-compat-samples/gallery
-# with the compile-unity goal. That goal compiles C# -- which needs the .NET
-# SDK, and the two Maven modules behind the unity-compat profile, which need
-# it to build -- only when what it finds under common/target/unity was not made
-# from the same project with the same runtime. It decides that by content
-# alone, never by a path or a time, so the output of one build is good on
-# another machine, another operating system and another checkout of the same
-# commit.
-#
-# `pack` runs after a build of the application's common module on a machine
-# with the SDK. The archive holds:
-#
-# repo/ the Maven artifacts the goal resolves, in repository layout:
-# codenameone-unity-compat (jar, references jar, pom),
-# codenameone-cil-translator (jar, pom) and the jars the
-# translator runs with, each with its pom and its parents'
-# target/ common/target/unity/{state.txt,installed.txt,app,resources,runtime}
-# and common/target/generated-sources/unity
-#
-# `unpack` puts both where a build reads them: the artifacts in the local
-# Maven repository and the output under scripts/hellocodenameone/common/target.
-# Run it after the checkout and before the first Maven command that builds the
-# application; every later build of that checkout finds it.
-#
-# Two things undo it, and both end in the goal asking for the .NET SDK:
-#
-# - removing common/target (`mvn clean` on the application, a fresh clone).
-# Removing common/target/classes alone is harmless; the goal refills it.
-# - other jars than the archive's. The check covers every class of the
-# runtime, the references and the translator, so a codenameone-unity-compat
-# or codenameone-cil-translator built anywhere else -- or an archive of
-# another commit -- is a different project as far as the goal can tell.
-# `unpack` therefore replaces those two artifacts in the repository; it
-# adds the third-party ones only where they are missing.
-#
-# The local repository is MAVEN_REPO_LOCAL when that is set and
-# ~/.m2/repository when not.
-set -euo pipefail
-
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
-APP="${UNITY_GALLERY_APP_DIR:-$ROOT/scripts/hellocodenameone}"
-COMMON="$APP/common"
-REPO="${MAVEN_REPO_LOCAL:-$HOME/.m2/repository}"
-GROUP_PATH="com/codenameone"
-RUNTIME="codenameone-unity-compat"
-TOOL="codenameone-cil-translator"
-
-log() { echo "[unity-gallery-prebuilt] $1"; }
-die() { echo "[unity-gallery-prebuilt] $1" >&2; exit 1; }
-
-usage() {
- die "usage: $0 pack | unpack "
-}
-
-# The first value of a pom's own coordinates or of its block.
-pom_parent_field() {
- sed -n '//,/<\/parent>/p' "$1" | sed -n "s:.*<$2>\\(.*\\)$2>.*:\\1:p" | head -n 1
-}
-
-# Adds a pom and every parent it names to the staged repository.
-stage_pom_chain() {
- local rel="$1" stage="$2" pom group artifact version
- while [ -n "$rel" ]; do
- pom="$REPO/$rel"
- [ -f "$pom" ] || die "$pom is missing; build the application's common module first"
- mkdir -p "$stage/$(dirname "$rel")"
- cp "$pom" "$stage/$rel"
- group="$(pom_parent_field "$pom" groupId)"
- artifact="$(pom_parent_field "$pom" artifactId)"
- version="$(pom_parent_field "$pom" version)"
- if [ -z "$group" ] || [ -z "$artifact" ] || [ -z "$version" ]; then
- break
- fi
- rel="$(echo "$group" | tr . /)/$artifact/$version/$artifact-$version.pom"
- # The framework's own parent is whatever the consumer built; it is
- # never taken from an archive.
- case "$rel" in "$GROUP_PATH"/*) break ;; esac
- done
-}
-
-pack() {
- local out="$1" version stage work tool_cp entry rel
- [ -f "$COMMON/target/unity/state.txt" ] || die "$COMMON/target/unity/state.txt is missing: build the common module of $APP first, on a machine with the .NET SDK"
- [ -d "$COMMON/target/unity/app" ] || die "$COMMON/target/unity/app is missing"
- [ -d "$COMMON/target/generated-sources/unity" ] || die "$COMMON/target/generated-sources/unity is missing"
- version="$(sed -n 's:.*\(.*\).*:\1:p' "$APP/pom.xml" | head -n 1)"
- [ -n "$version" ] || die "no cn1.version in $APP/pom.xml"
-
- work="$(mktemp -d "${TMPDIR:-/tmp}/unity-gallery-pack.XXXXXX")"
- # shellcheck disable=SC2064
- trap "rm -rf '$work'" EXIT
- stage="$work/stage"
- mkdir -p "$stage/repo/$GROUP_PATH/$RUNTIME/$version" "$stage/repo/$GROUP_PATH/$TOOL/$version" \
- "$stage/target/unity" "$stage/target/generated-sources"
-
- for entry in "$RUNTIME/$version/$RUNTIME-$version.jar" "$RUNTIME/$version/$RUNTIME-$version-references.jar" \
- "$RUNTIME/$version/$RUNTIME-$version.pom" "$TOOL/$version/$TOOL-$version.jar" \
- "$TOOL/$version/$TOOL-$version.pom"; do
- [ -f "$REPO/$GROUP_PATH/$entry" ] || die "$REPO/$GROUP_PATH/$entry is missing: install both Unity modules (-Dunity-compat) into this repository first"
- cp "$REPO/$GROUP_PATH/$entry" "$stage/repo/$GROUP_PATH/$entry"
- done
-
- # What the translator runs with, as Maven resolves it from the installed pom
- # -- the same resolution the goal performs.
- tool_cp="$work/tool-classpath.txt"
- mvn -B -q -Dmaven.repo.local="$REPO" -f "$REPO/$GROUP_PATH/$TOOL/$version/$TOOL-$version.pom" \
- dependency:build-classpath -DincludeScope=runtime -Dmdep.pathSeparator=: \
- -Dmdep.outputFile="$tool_cp" >"$work/classpath.log" 2>&1 \
- || { cat "$work/classpath.log" >&2; die "could not resolve the class path of $TOOL"; }
- # The file ends without a newline, which `read` reports as a failure
- # while still giving the line.
- tr ':' '\n' <"$tool_cp" | while IFS= read -r entry || [ -n "$entry" ]; do
- [ -n "$entry" ] || continue
- case "$entry" in
- "$REPO"/*) rel="${entry#"$REPO"/}" ;;
- *) die "$entry is not in $REPO" ;;
- esac
- mkdir -p "$stage/repo/$(dirname "$rel")"
- cp "$entry" "$stage/repo/$rel"
- stage_pom_chain "${rel%.jar}.pom" "$stage/repo"
- done
-
- for entry in state.txt installed.txt app resources runtime; do
- [ -e "$COMMON/target/unity/$entry" ] || die "$COMMON/target/unity/$entry is missing"
- cp -R "$COMMON/target/unity/$entry" "$stage/target/unity/$entry"
- done
- cp -R "$COMMON/target/generated-sources/unity" "$stage/target/generated-sources/unity"
- {
- echo "cn1.version=$version"
- # The digest is the first line; under it the file lists what it is of.
- echo "state=$(head -n 1 "$COMMON/target/unity/state.txt")"
- } >"$stage/pack-info.txt"
-
- mkdir -p "$(dirname "$out")"
- # Through a redirection, here and in `unpack`: GNU tar reads a colon in
- # the name of its archive as "host:path", and the temporary directory of a
- # Windows runner is D:\a\_temp.
- tar -czf - -C "$stage" pack-info.txt repo target >"$out"
- log "packed $(cd "$stage" && find repo -type f | wc -l | tr -d ' ') repository files and $(cd "$stage" && find target -type f | wc -l | tr -d ' ') output files into $out"
- (cd "$stage" && find repo -type f | sort) | while IFS= read -r entry; do log " $entry"; done
-}
-
-unpack() {
- local in="$1" work rel
- [ -f "$in" ] || die "$in does not exist"
- [ -d "$COMMON" ] || die "$COMMON does not exist"
- work="$(mktemp -d "${TMPDIR:-/tmp}/unity-gallery-unpack.XXXXXX")"
- # shellcheck disable=SC2064
- trap "rm -rf '$work'" EXIT
- tar -xzf - -C "$work" <"$in"
- [ -f "$work/target/unity/state.txt" ] || die "$in is not an archive this script packed"
-
- (cd "$work/repo" && find . -type f | sed 's:^\./::' | sort) | while IFS= read -r rel; do
- case "$rel" in
- "$GROUP_PATH/$RUNTIME"/*|"$GROUP_PATH/$TOOL"/*) ;;
- *) [ -f "$REPO/$rel" ] && continue ;;
- esac
- mkdir -p "$REPO/$(dirname "$rel")"
- cp "$work/repo/$rel" "$REPO/$rel"
- done
- # Maven records where it downloaded a file from, and refuses one whose
- # record names a repository this build does not have. These were copied.
- rm -f "$REPO/$GROUP_PATH/$RUNTIME"/*/_remote.repositories "$REPO/$GROUP_PATH/$TOOL"/*/_remote.repositories
-
- rm -rf "$COMMON/target/unity" "$COMMON/target/generated-sources/unity"
- mkdir -p "$COMMON/target/generated-sources"
- cp -R "$work/target/unity" "$COMMON/target/unity"
- cp -R "$work/target/generated-sources/unity" "$COMMON/target/generated-sources/unity"
- log "unpacked $in ($(tr '\n' ' ' <"$work/pack-info.txt")) into $REPO and $COMMON/target"
-}
-
-[ $# -eq 2 ] || usage
-case "$1" in
- pack) pack "$2" ;;
- unpack) unpack "$2" ;;
- *) usage ;;
-esac
diff --git a/scripts/wayline/README.adoc b/scripts/wayline/README.adoc
index 98bc4d45958..70960ab1b62 100644
--- a/scripts/wayline/README.adoc
+++ b/scripts/wayline/README.adoc
@@ -204,7 +204,7 @@ mvn -pl shared,backend -Dcodename1.platform=backend test -Dcn1.backend.compiledT
`npx playwright install chromium` in `scripts/`). Screenshots and logs go
to `target/web-e2e`.
-`.github/workflows/wayline.yml` runs all five, and builds the application for
+`.github/workflows/samples.yml` runs all five, and builds the application for
Android and iOS through `scripts/build-android-app.sh` and
`scripts/build-ios-app.sh` with `CN1_APP_DIR=scripts/wayline`.
diff --git a/scripts/windows/screenshots/UnityCompatAnimator.png b/scripts/windows/screenshots/UnityCompatAnimator.png
deleted file mode 100644
index 914da5911ef..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatAnimator.png and /dev/null differ
diff --git a/scripts/windows/screenshots/UnityCompatCanvas.png b/scripts/windows/screenshots/UnityCompatCanvas.png
deleted file mode 100644
index e433cd96827..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatCanvas.png and /dev/null differ
diff --git a/scripts/windows/screenshots/UnityCompatCinemachine.png b/scripts/windows/screenshots/UnityCompatCinemachine.png
deleted file mode 100644
index 14f4934c039..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatCinemachine.png and /dev/null differ
diff --git a/scripts/windows/screenshots/UnityCompatParticles.png b/scripts/windows/screenshots/UnityCompatParticles.png
deleted file mode 100644
index 0bc68424677..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatParticles.png and /dev/null differ
diff --git a/scripts/windows/screenshots/UnityCompatPhysics.png b/scripts/windows/screenshots/UnityCompatPhysics.png
deleted file mode 100644
index 64fdc738792..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatPhysics.png and /dev/null differ
diff --git a/scripts/windows/screenshots/UnityCompatSprites.png b/scripts/windows/screenshots/UnityCompatSprites.png
deleted file mode 100644
index 7ae14471b7b..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatSprites.png and /dev/null differ
diff --git a/scripts/windows/screenshots/UnityCompatTextMeshPro.png b/scripts/windows/screenshots/UnityCompatTextMeshPro.png
deleted file mode 100644
index 618a52e1d9c..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatTextMeshPro.png and /dev/null differ
diff --git a/scripts/windows/screenshots/UnityCompatTilemap.png b/scripts/windows/screenshots/UnityCompatTilemap.png
deleted file mode 100644
index 9ef32097c14..00000000000
Binary files a/scripts/windows/screenshots/UnityCompatTilemap.png and /dev/null differ
diff --git a/scripts/windows/screenshots/chart2-shared-tooltip.png b/scripts/windows/screenshots/chart2-shared-tooltip.png
new file mode 100644
index 00000000000..997198ab259
Binary files /dev/null and b/scripts/windows/screenshots/chart2-shared-tooltip.png differ
diff --git a/skills/blog-release-series/SKILL.md b/skills/blog-release-series/SKILL.md
index 33becdf807f..594701ee80d 100644
--- a/skills/blog-release-series/SKILL.md
+++ b/skills/blog-release-series/SKILL.md
@@ -134,7 +134,7 @@ Per-post assets (screenshots, diagrams, animated GIFs) live in `docs/website/sta
Real screenshots beat ASCII mockups. Always. Before asking the user to take a screenshot, look for an existing test fixture:
```
-scripts/ios/screenshots-metal/.png # iOS
+scripts/ios/screenshots-metal-27/.png # iOS
scripts/android/screenshots/.png # Android
scripts/javase/screenshots/.png # JavaSE simulator
```
@@ -149,7 +149,7 @@ Example (from the 2026-05-31 platform-APIs post):
```python
from PIL import Image
-src = Image.open('scripts/ios/screenshots-metal/ChatView_light.png')
+src = Image.open('scripts/ios/screenshots-metal-27/ChatView_light.png')
W, H = src.size
out = src.crop((0, 360, W, H)) # drop caption
target_w = 480
@@ -257,7 +257,7 @@ Before requesting review on a batch PR:
```python
from PIL import Image, ImageDraw
-src = Image.open('scripts/ios/screenshots-metal/LottieAnimatedScreenshotTest.png')
+src = Image.open('scripts/ios/screenshots-metal-27/LottieAnimatedScreenshotTest.png')
W, H = src.size
cw, ch = 589, 852 # cells in a 2x3 grid
order = [(0,0),(1,0),(0,1),(1,1),(0,2),(1,2)]
diff --git a/vm/backend/src/com/codename1/backend/HttpServer.java b/vm/backend/src/com/codename1/backend/HttpServer.java
index 7c29f322f36..60651020b17 100644
--- a/vm/backend/src/com/codename1/backend/HttpServer.java
+++ b/vm/backend/src/com/codename1/backend/HttpServer.java
@@ -3181,9 +3181,9 @@ public void stop(int drainMillis) {
// may be sitting inside SSL_read or nghttp2 on this very connection, and
// freeing the session under it is a native use-after-free -- a crash during
// shutdown, which is exactly when the remaining work is least recoverable.
- // Closing the socket instead unblocks that worker: its next read fails, and
- // it takes its own connection down through drop(), which frees the session on
- // the thread that was using it.
+ // Shutting the socket down instead unblocks that worker: its next read fails,
+ // and it takes its own connection down through drop(), which frees the
+ // session and closes the descriptor on the thread that was using it.
retireWebSocketsForShutdown();
java.util.Iterator live = new ArrayList(liveConnections.keySet()).iterator();
while (live.hasNext()) {
@@ -3202,7 +3202,19 @@ public void stop(int drainMillis) {
// closes it when the writer leaves.
continue;
}
- ServerSocket.closeFd(fd);
+ // shutdown(2), never close(2). The number stays in liveConnections, so
+ // whoever ends this connection -- the worker this wakes, through drop(),
+ // or releaseStranded(), also through drop() -- closes it.
+ // A close here made that a SECOND close of a number the kernel may
+ // already have handed to an unrelated socket: an accept, a curl
+ // connection, another server's listener. The late worker could also
+ // read the stranger's request off that number and write its own
+ // server's answer into it (an outbound Web call to a peer answering
+ // "pong" came back "ok", the body of a server stopped checks earlier).
+ // shutdown breaks the connection in both directions, so a worker blocked
+ // on it wakes exactly as before, but frees no number; drop() is the only
+ // place a connection's descriptor is closed, and it closes it once.
+ ServerSocket.shutdown(fd);
}
// Then give those workers a moment to notice and unwind. Freeing a session
// while one is still inside it is the thing being avoided, so the sweep below
@@ -3230,8 +3242,53 @@ public void stop(int drainMillis) {
fullyStopped = true;
stopped.notifyAll();
}
+ // The sweep above only SHUT the connections down; their descriptors
+ // are closed by drop(), once. A connection with a worker drops itself
+ // when that worker wakes, but an idle one in reactor mode has nobody:
+ // the poll loop is gone. Returned here with nothing more, those stayed
+ // open and registered for the life of the process, one set per
+ // stop/start cycle. So the release this path skips still happens,
+ // later, on a thread of its own, once the last handler has left --
+ // the point at which it is safe, for the reason given above.
+ Thread reaper = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ long giveUpAt = System.currentTimeMillis() + STRANDED_RELEASE_WAIT_MILLIS;
+ while (workOutstanding()) {
+ if (System.currentTimeMillis() > giveUpAt) {
+ // A handler that never returns keeps its sessions in
+ // use; freeing them under it is the crash this path
+ // exists to avoid, so they are left, as before.
+ return;
+ }
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException err) {
+ return;
+ }
+ }
+ releaseStranded();
+ }
+ });
+ reaper.setDaemon(true);
+ reaper.start();
return;
}
+ releaseStranded();
+ releaseVirtualThreadSlot();
+ synchronized (stopped) {
+ fullyStopped = true;
+ stopped.notifyAll();
+ }
+ }
+
+ /// How long a stop() that returned with handlers still running keeps waiting,
+ /// on its own thread, to release the connections and sessions it left.
+ private static final long STRANDED_RELEASE_WAIT_MILLIS = 600000L;
+
+ /// Releases what no worker will: idle connections, parked virtual threads, the
+ /// sessions and pollers. Only once nothing is inside a request.
+ private void releaseStranded() {
// Anything still registered had no worker to take it down -- an idle
// connection in reactor mode, where nothing runs for it once its descriptor
// is gone. With no request in flight there is no one left to race, so these
@@ -3292,11 +3349,6 @@ public void stop(int drainMillis) {
if (pollLoopsEnded(POLL_LOOP_JOIN_MILLIS)) {
closePollers();
}
- releaseVirtualThreadSlot();
- synchronized (stopped) {
- fullyStopped = true;
- stopped.notifyAll();
- }
}
// Whether any worker is queued, running, or inside a request or an h2 turn.
diff --git a/vm/tests/src/test/java/com/codename1/tools/translator/CleanTargetIntegrationTest.java b/vm/tests/src/test/java/com/codename1/tools/translator/CleanTargetIntegrationTest.java
index 87f524e9ca2..3ad7eaf9a36 100644
--- a/vm/tests/src/test/java/com/codename1/tools/translator/CleanTargetIntegrationTest.java
+++ b/vm/tests/src/test/java/com/codename1/tools/translator/CleanTargetIntegrationTest.java
@@ -1193,7 +1193,7 @@ static Path buildHelloCodenameOneExe() throws Exception {
/**
* The classes of every library the hellocodenameone application depends on and
- * ships -- the mock ad provider, the Unity compatibility runtime -- as its common
+ * ships -- the mock ad provider -- as its common
* module unpacks them ({@code stage-translation-libs} in its pom). None of them is
* compiled into {@code common/target/classes}, so the directory is a translator
* source root of its own: without it the translator cannot emit a class the
@@ -1212,10 +1212,9 @@ static Path helloSuiteLibraryClasses() {
+ " (scripts/hellocodenameone/common/target/translation-libs)");
// Built is not enough: an archive of the application's classes that left this
// directory out unpacks to the same failure this method exists to prevent, far
- // from its cause. Both are libraries the suite cannot run without.
+ // from its cause. The suite cannot run without it.
for (String required : new String[] {
- "com/codename1/ads/mock/MockAdProvider.class",
- "com/codename1/unitycompat/unityengine/UnityRuntime.class" }) {
+ "com/codename1/ads/mock/MockAdProvider.class" }) {
assertTrue(Files.exists(libraryClasses.resolve(required)),
"the application's libraries are incomplete: " + libraryClasses + " has no " + required);
}