|
| 1 | +# macOS smoke tests in GitHub Actions |
| 2 | + |
| 3 | +## Goal |
| 4 | + |
| 5 | +Package a sample app on GitHub's Apple Silicon macOS runners and check the result, so macOS issues can be verified without owning a Mac. |
| 6 | + |
| 7 | +## Context |
| 8 | + |
| 9 | +- There are no tests and no CI workflows (`.github/` only has issue templates). |
| 10 | +- The maintainer has no Mac. Several open issues can only be checked on macOS: |
| 11 | + - #448 and #449: launcher fails or runs under Rosetta on ARM / macOS 15. Possibly fixed by the native launcher in devel (f02c0b0), but unconfirmed. |
| 12 | + - #473 and #398: with `administratorRequired=true`, `MacPackager.processStartupScript()` never copies the launcher into `Contents/MacOS`. |
| 13 | + - #474 and #377: `GenerateDmg` always runs `osascript` to customize the DMG, which fails on headless CI. |
| 14 | +- GitHub `macos-14` and `macos-15` runners are arm64 and free for public repos. Docker can't run macOS. |
| 15 | +- Output layout: app at `target/<name>/<name>.app`, DMG at `target/<name>_<version>.dmg`, PKG at `target/<name>_<version>.pkg`. |
| 16 | + |
| 17 | +## Changes |
| 18 | + |
| 19 | +- Add a minimal Maven sample app under `samples/hello-world/` that prints a known line and exits. It takes the plugin version as a property, so CI uses the snapshot built from the repo. |
| 20 | +- Add the workflow `.github/workflows/macos-smoke.yml`: |
| 21 | + - Triggers: push and pull request on `devel` and `master`, plus manual dispatch. |
| 22 | + - Builds the plugin with `./gradlew publishToMavenLocal`. |
| 23 | + - Matrix over `macos-14` and `macos-15` and `macStartup` (`UNIVERSAL`, `ARM64`, `SCRIPT`), with one extra job using `administratorRequired=true`. |
| 24 | + - Packages the sample with `mvn package`, with `bundleJre=true` and installers enabled. |
| 25 | +- Checks per job: |
| 26 | + - The `.app` exists and `Contents/MacOS/universalJavaApplicationStub` is present and executable. |
| 27 | + - For compiled launchers, `file`/`lipo` reports arm64. |
| 28 | + - Running the launcher directly prints the sample's known line. |
| 29 | + - The DMG and PKG exist. A DMG failure is reported, not hidden. |
| 30 | +- Upload `target/*.dmg`, `target/*.pkg` and the build log as artifacts. |
| 31 | +- Known failures are allowed: `continue-on-error` on the `administratorRequired` job until #473/#398 is fixed. |
| 32 | + |
| 33 | +## Acceptance |
| 34 | + |
| 35 | +- The workflow runs on `devel` and its results are visible in the Actions tab. |
| 36 | +- `UNIVERSAL`, `ARM64` and `SCRIPT` jobs show whether the app launches natively on ARM, which gives an answer for #448/#449. |
| 37 | +- The `administratorRequired` job reproduces #473/#398 (missing launcher) before the fix and passes after it. |
| 38 | +- The DMG step shows whether `osascript` fails headless on the runner (#474/#377). |
| 39 | +- No changes to plugin code in this feature; fixes go in their own bugfix notes. |
0 commit comments