Repository navigation
Native menu bars: submenus, separators, check/radio items, icons, enabled state #7632
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Archetype simulator smoke | |
| # Smoke-tests that an archetype-generated project can run `cn1:css` (the | |
| # CN1CSSCLI subprocess, which runs headless) with `cn1.autoDefaultResourceBundle` | |
| # forced on. This reproduces the user-side preference state that masked | |
| # issue #4850 in CI for six months: the bug was deterministic on the user | |
| # code path but invisible to CI runners with the default-false preference. | |
| # | |
| # Path-gated to the modules whose changes can break this code path so we | |
| # don't run the heavy archetype-generate-and-build for unrelated edits. | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| paths: | |
| - 'scripts/ci/apt-get-install.sh' | |
| - 'Ports/JavaSE/**' | |
| - 'CodenameOneDesigner/**' | |
| - 'CodenameOne/src/com/codename1/ui/plaf/UIManager.java' | |
| - 'maven/codenameone-maven-plugin/**' | |
| - 'maven/css-compiler/**' | |
| - 'maven/css-cli/**' | |
| - 'maven/build-engine/**' | |
| - 'maven/project-model/**' | |
| - 'maven/cn1app-archetype/**' | |
| - 'maven/cn1lib-archetype/**' | |
| - 'maven/backend/**' | |
| - 'maven/integration-tests/cn1app-archetype-test.sh' | |
| - 'maven/integration-tests/cn1app-staged-jar-test.sh' | |
| - 'maven/integration-tests/cn1app-minimal-layout-test.sh' | |
| - 'scripts/initializr/common/src/main/resources/common-hosted-platform-profiles.xml' | |
| - 'scripts/initializr/common/src/main/resources/backend-only-pom.xml' | |
| # What a generated project stages for upload also depends on the | |
| # dependency versions and aggregators the archetype pulls in. | |
| - 'maven/pom.xml' | |
| - 'maven/cn1-binaries/**' | |
| - 'maven/javase/**' | |
| - 'maven/integration-tests/inc/**' | |
| - '.github/workflows/archetype-smoke.yml' | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - 'scripts/ci/apt-get-install.sh' | |
| - 'Ports/JavaSE/**' | |
| - 'CodenameOneDesigner/**' | |
| - 'CodenameOne/src/com/codename1/ui/plaf/UIManager.java' | |
| - 'maven/codenameone-maven-plugin/**' | |
| - 'maven/css-compiler/**' | |
| - 'maven/css-cli/**' | |
| - 'maven/build-engine/**' | |
| - 'maven/project-model/**' | |
| - 'maven/cn1app-archetype/**' | |
| - 'maven/cn1lib-archetype/**' | |
| - 'maven/backend/**' | |
| - 'maven/integration-tests/cn1app-archetype-test.sh' | |
| - 'maven/integration-tests/cn1app-staged-jar-test.sh' | |
| - 'maven/integration-tests/cn1app-minimal-layout-test.sh' | |
| - 'scripts/initializr/common/src/main/resources/common-hosted-platform-profiles.xml' | |
| - 'scripts/initializr/common/src/main/resources/backend-only-pom.xml' | |
| # What a generated project stages for upload also depends on the | |
| # dependency versions and aggregators the archetype pulls in. | |
| - 'maven/pom.xml' | |
| - 'maven/cn1-binaries/**' | |
| - 'maven/javase/**' | |
| - 'maven/integration-tests/inc/**' | |
| - '.github/workflows/archetype-smoke.yml' | |
| 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: | |
| archetype-smoke: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # A JDK that is NOT 8, for the `cn1:backend-package` check at the end of the | |
| # test. Installed FIRST so the JDK 8 below is the one JAVA_HOME names -- the | |
| # framework build needs 8, and only that one check wants a modern JDK. | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - run: echo "CN1_BACKEND_PACKAGE_JDK=$JAVA_HOME" >> $GITHUB_ENV | |
| - name: Set up JDK 8 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '8' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| # clang compiles the C the translator emits. Required rather than optional | |
| # here: the packaging check skips without it, and a skip reads like a pass. | |
| # | |
| # clang alone is not enough. The generated backend links -lcurl -lssl | |
| # -lcrypto -lnghttp2 -- outbound TLS is libcurl's, the auth primitives are | |
| # 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. | |
| # | |
| # 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. | |
| # Compiling a project's CSS needs no display: the framework build and | |
| # the staged-jar step run without one, and the latter is the guard. | |
| - name: Install xvfb and the native backend toolchain | |
| run: | | |
| bash scripts/ci/apt-get-install.sh xvfb clang \ | |
| libcurl4-openssl-dev libssl-dev libnghttp2-dev | |
| - name: Build Codename One Maven artifacts (includes archetypes) | |
| # Through the retry wrapper, narrowed to resolution failures: this died with | |
| # "Plugin maven-install-plugin:2.5.2 or one of its dependencies could not be resolved" | |
| # before it had installed anything, one of several jobs Maven Central refused on this | |
| # branch in a day. A build failure in our own code still fails on the first attempt. | |
| env: | |
| RETRY_ONLY_MATCHING: transient | |
| RETRY_ATTEMPTS: '5' | |
| RETRY_DELAY_SECONDS: '60' | |
| run: | | |
| # The cn1{app,lib}-archetype modules are inlined into the maven/ | |
| # reactor since the migration, so this single install also stages | |
| # the archetypes into the local repo for `archetype:generate`. | |
| # -Darchetype.test.skip=true keeps the smoke fast — the per-tag | |
| # ITs already run in the release workflow. | |
| cd maven | |
| bash ../scripts/ci/retry.sh mvn install -Plocal-dev-javase -DskipTests -Darchetype.test.skip=true -Dmaven.javadoc.skip=true | |
| - name: Refresh archetype catalog | |
| run: | | |
| cd maven | |
| mvn archetype:update-local-catalog -Plocal-dev-javase | |
| mvn archetype:crawl -Plocal-dev-javase | |
| - name: Run archetype simulator smoke (auto-bundle pref forced on) | |
| env: | |
| # The packaging check must not be skipped on a runner that has clang. | |
| CN1_BACKEND_PACKAGE_REQUIRED: '1' | |
| run: | | |
| cd maven/integration-tests | |
| xvfb-run -a bash cn1app-archetype-test.sh | |
| # The jar cn1:build would upload, for every target the generated build.sh | |
| # offers. #5380 put ~300 MB of ffmpeg natives into every desktop upload and | |
| # the build client refused them; nothing looked at this jar for two months. | |
| - name: Check the staged upload jar of every build target | |
| run: | | |
| cd maven/integration-tests | |
| # DISPLAY and WAYLAND_DISPLAY are cleared on purpose, and this must | |
| # never be wrapped in xvfb-run: the script generates a project and | |
| # builds every target, which compiles the project's theme.css each | |
| # time, so passing here proves the CSS compile needs no display. A | |
| # compiler change that reaches for a window fails this step instead | |
| # of the first developer who builds over ssh or in a container. | |
| env -u DISPLAY -u WAYLAND_DISPLAY bash cn1app-staged-jar-test.sh | |
| # The archetype's default layouts: an app with no platform modules, whose | |
| # common module builds, tests and stages every platform, and a backend-only | |
| # project. Nothing is submitted and the simulator is never launched. | |
| - name: Build the minimal and backend-only layouts | |
| env: | |
| CN1_BACKEND_PACKAGE_REQUIRED: '1' | |
| run: | | |
| cd maven/integration-tests | |
| xvfb-run -a bash cn1app-minimal-layout-test.sh |