-
Notifications
You must be signed in to change notification settings - Fork 2
Add CI support for native simulators #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CI support for native simulators #10
Conversation
- Added `scripts/ci/build-thirdparty-app.sh` to build Codename One apps from Maven Central artifacts. - Added `scripts/ci/start-android-emulator.sh` to provision and boot Android emulators. - Added `scripts/ci/run-ios-simulator.sh` to boot iOS simulators and launch app bundles. - Added `scripts/ci/README.md` with usage instructions. - Updated `.github/workflows/maven.yml` to include `android` and `ios` jobs for validating the toolchain.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
- Fixed `android-actions/setup-android` failure by flattening the packages list in `.github/workflows/maven.yml`. - Updated iOS runner to `macos-15` to resolve environment issues. - Added a bundled minimal Codename One Maven project at `scripts/hellocodenameone` to serve as a reliable fallback for CI validation, avoiding external repo cloning issues. - Removed `APP_REPO` env var from the iOS workflow job to trigger usage of the bundled app. - Created `scripts/ci/build-thirdparty-app.sh` to build Codename One apps from Maven Central artifacts. - Created `scripts/ci/start-android-emulator.sh` to provision and boot Android emulators. - Created `scripts/ci/run-ios-simulator.sh` to boot iOS simulators and launch app bundles. - Added `scripts/ci/README.md` with usage instructions.
- Modified `scripts/ci/build-thirdparty-app.sh` to target the `BTDemo` project directly and respect POM versions. - Updated `.github/workflows/maven.yml`: - Default to JDK 11 for all builds. - Install JDK 17 as a secondary JDK (`JAVA17_HOME`) for Android emulator tasks. - Fixed `android-actions/setup-android` package list format. - Updated iOS job to use `macos-15` runner. - Removed bundled sample project (`hellocodenameone`). - Removed obsolete `scripts/ci/README.md`.
- Updated `.github/workflows/maven.yml`: - Android job now installs JDK 17, then JDK 11. - JDK 17 is saved to `JAVA17_HOME` and explicitly used for Android SDK tools (`sdkmanager`, `avdmanager`) and the native build step to satisfy requirements. - JDK 11 remains the default for `mvn install` and other build tasks. - Updated `scripts/ci/run-ios-simulator.sh`: - Added auto-detection logic to find the latest available iOS runtime if the specific requested version is missing, resolving failures on `macos-15` runners. - Updated `scripts/ci/build-thirdparty-app.sh`: - Removed `hellocodenameone` fallback logic; strictly targets `APP_DIR`. - Removed implicit `LATEST` version overriding to fix Maven validation errors.
…ssues. Here are the details of the updates: - **Updated `scripts/ci/run-ios-simulator.sh`**: - Fixed logging to use stderr to avoid corrupting UDID capture. - Replaced brittle regex parsing with a safer fixed-string matching approach for device parsing. - Added robust runtime auto-detection using `$NF`. - **Updated `scripts/ci/start-android-emulator.sh`**: - Added explicit update of `cmdline-tools;latest` before installing system images to resolve XML parsing errors. - **Updated `.github/workflows/maven.yml`**: - Configured Android job to use JDK 17 for SDK tools and native builds, while keeping JDK 11 as default. - Reordered Android setup steps to ensure correct JDK environment. - **Updated `scripts/ci/build-thirdparty-app.sh`**: - Removed sample project fallback code. - Removed `LATEST` version override for Maven plugin.
- Updated `scripts/ci/run-ios-simulator.sh`: - Replaced `simctl bootstatus` with a manual polling loop to support older simctl versions and avoid "illegal option" errors. - Logging is directed to stderr. - Updated `scripts/ci/start-android-emulator.sh`: - Explicitly create the log directory before redirection. - Fixed `pgrep` usage to avoid script failure if no process is found. - Improved `sdkmanager` invocation robustness against broken pipes. - Added timeout logic to boot wait loop. - Updated `.github/workflows/maven.yml`: - Added `timeout-minutes` to Android (20m) and iOS (20m) jobs to prevent long hangs.
- Updated `scripts/ci/run-ios-simulator.sh`: - Added existence check for `APP_BUNDLE` with debug listing if missing. - Replaced `xcrun simctl bootstatus` with a manual polling loop to bypass runner tool limitations. - Updated `scripts/ci/start-android-emulator.sh`: - Added `-no-snapshot-save` to ensure clean state and avoid potential save hangs. - Improved `wait_for_boot` loop with better logging and a 5-minute timeout. - Updated `.github/workflows/maven.yml`: - Added a debug step to recursively list the contents of `BTDemo/target` to the iOS job to help verify build artifacts.
- Updated `.github/workflows/maven.yml`: - Replaced manual Android emulator script with `reactivecircus/android-emulator-runner@v2`. - Added explicit `xcodebuild` step for iOS to compile the generated Maven source into a `.app` bundle. - Configured Android tests to use API 31 and KVM permissions. - Set timeouts for all jobs. - Updated `scripts/ci/run-ios-simulator.sh`: - Added existence check for `APP_BUNDLE`. - Improved runtime detection and logging. - Deleted `scripts/ci/start-android-emulator.sh` as it is replaced by the GitHub Action.
- Updated `.github/workflows/maven.yml`:
- Replaced manual Android emulator script with `reactivecircus/android-emulator-runner@v2`.
- Added explicit steps to locate and compile the generated native projects:
- Android: Runs `./gradlew assembleDebug` after `mvn cn1:build`.
- iOS: Runs `xcodebuild` on the generated `.xcodeproj`.
- Configured correct JDK versions (JDK 11 for Maven, JDK 17 for Gradle/Android tools).
- Set timeouts to prevent indefinite hangs.
- Updated `scripts/ci/build-thirdparty-app.sh`:
- Changed Maven goal from `package` to `cn1:build` to correctly generate native sources.
- Set default build targets to `android-source` and `ios-source`.
- Updated `scripts/ci/run-ios-simulator.sh`:
- Improved runtime detection and error handling for missing app bundles.
- Removed `scripts/ci/start-android-emulator.sh` as it is replaced by the GitHub Action.
- Updated `.github/workflows/maven.yml`: - Android: Uses `cn1:build` to generate source, then runs `./gradlew assembleDebug` to build the APK. - iOS: Uses `cn1:build` to generate source, then runs `xcodebuild` to create the `.app` bundle. - Replaced manual emulator script with `reactivecircus/android-emulator-runner@v2` for stability. - Ensures artifacts are correctly located using `find` before testing. - Updated `scripts/ci/build-thirdparty-app.sh`: - Switched to `cn1:build` goal. - Defaults to source generation targets (`android-source`, `ios-source`). - Updated `scripts/ci/run-ios-simulator.sh`: - Improved error reporting for missing app bundles. - Removed obsolete `start-android-emulator.sh`.
- Updated `pom.xml` to use Codename One version `7.0.215`. - Added `maven-source-plugin` to `pom.xml` to fix build warnings. - Created `BTDemo/codenameone_settings.properties` to ensure `cn1:build` correctly locates the project and generates sources. - Updated `scripts/ci/build-thirdparty-app.sh` to use `cn1:build` goal instead of `package`. - Updated `.github/workflows/maven.yml` to dynamically find and build generated native projects (Gradle/Xcode) before running simulators. - Improved robustness of artifact locating logic using `find` in the pipeline steps.
009903e to
eea2125
Compare
eea2125 to
35f0758
Compare
847464e to
4ad97fe
Compare
4ad97fe to
6665ab3
Compare
d0ae489 to
faf60b0
Compare
faf60b0 to
6ea3b67
Compare
This change introduces helper scripts and CI workflow updates to validate Codename One applications on native Android emulators and iOS simulators. This allows ensuring that the toolchain works correctly with published artifacts on actual simulator environments.
PR created automatically by Jules for task 6328949105883812303 started by @shai-almog