1
1
Fork
You've already forked zop
0

Fix Android release APK discovery and add PR release dry-run validation #20

Merged
Copilot merged 8 commits from copilot/fix-android-build-error into main 2026年03月17日 19:38:34 +01:00
Copilot commented 2026年03月17日 08:04:58 +01:00 (Migrated from github.com)
Copy link

Android release packaging succeeded, but the workflow failed afterward because it looked for the APK in fyne-cross/dist/android, while fyne-cross outputs to an arch-specific directory (e.g. fyne-cross/dist/android-arm64). This PR fixes APK discovery and adds PR-time release dry-run checks so release-specific issues are caught before tagging.

  • Workflow fix: APK path resolution (release workflow)

    • Updated the Android release job to search for APKs under fyne-cross/dist instead of a hardcoded fyne-cross/dist/android path.
    • Kept existing failure behavior and artifact copy flow unchanged.
  • Failure message alignment

    • Updated the error message to reflect the new search root (fyne-cross/dist) for clearer diagnostics.
fyne-cross android -app-id com.zop.app -arch arm64 ./cmd/zop-mobile
APK_PATH=$(find fyne-cross/dist -type f -name "*.apk" -print -quit)
if [ -z "$APK_PATH" ]; then
 echo "APK not found under fyne-cross/dist" >&2
 exit 1
fi
cp "$APK_PATH" "zop-android-arm64.apk"
  • PR CI enhancement: release dry-run jobs (no publish)
    • Added PR-only dry-run jobs to .github/workflows/test.yml that run after the existing test and test-whisper jobs:
      • release-dry-run-build: runs the Linux release build matrix (amd64/arm64, whisper + nowhisper variants).
      • release-dry-run-android: runs Android APK packaging with fyne-cross, including APK discovery under fyne-cross/dist.
    • These jobs intentionally stop before any GitHub release creation/publishing.
    • Centralized shared CI settings in workflow env (WHISPER_CPP_VERSION, ANDROID_APP_ID, ANDROID_ARCH) and simplified dry-run naming logic for consistency.
Original prompt

This section details on the original issue you should resolve

<issue_title>Bug in Android build</issue_title>
<issue_description>Release failed with following error:

Run fyne-cross android -app-id com.zop.app -arch arm64 ./cmd/zop-mobile
[i] Target: android/arm64
[i] Cleaning target directories...
[✓] "bin" dir cleaned: /home/runner/work/zop/zop/fyne-cross/bin/android-arm64
[✓] "dist" dir cleaned: /home/runner/work/zop/zop/fyne-cross/dist/android-arm64
[✓] "temp" dir cleaned: /home/runner/work/zop/zop/fyne-cross/tmp/android-arm64
[i] Checking for go.mod: /home/runner/work/zop/zop/go.mod
[✓] go.mod found
[i] Packaging app...
[!] Default icon not found at "Icon.png"
[✓] Created a placeholder icon using Fyne logo for testing purpose
Unable to find image 'fyneio/fyne-cross-images:android' locally
android: Pulling from fyneio/fyne-cross-images
b1badc6e5066: Pulling fs layer
9982ac0fded1: Pulling fs layer
3e09f9f722cb: Pulling fs layer
d660be5f5126: Pulling fs layer
4f4fb700ef54: Pulling fs layer
db19523adbf4: Pulling fs layer
01f14457df16: Pulling fs layer
7d3ae89c9919: Pulling fs layer
6ac20beeef15: Pulling fs layer
5fc3d03f5069: Pulling fs layer
58e038a18a81: Pulling fs layer
aea9dc73734b: Pulling fs layer
a247cff9490f: Pulling fs layer
9ac023f440cd: Pulling fs layer
4f4fb700ef54: Waiting
db19523adbf4: Waiting
01f14457df16: Waiting
7d3ae89c9919: Waiting
6ac20beeef15: Waiting
5fc3d03f5069: Waiting
58e038a18a81: Waiting
aea9dc73734b: Waiting
a247cff9490f: Waiting
d660be5f5126: Waiting
9ac023f440cd: Waiting
9982ac0fded1: Verifying Checksum
9982ac0fded1: Download complete
b1badc6e5066: Verifying Checksum
b1badc6e5066: Download complete
d660be5f5126: Verifying Checksum
d660be5f5126: Download complete
4f4fb700ef54: Verifying Checksum
4f4fb700ef54: Download complete
db19523adbf4: Verifying Checksum
db19523adbf4: Download complete
3e09f9f722cb: Verifying Checksum
3e09f9f722cb: Download complete
01f14457df16: Verifying Checksum
01f14457df16: Download complete
6ac20beeef15: Verifying Checksum
6ac20beeef15: Download complete
5fc3d03f5069: Verifying Checksum
5fc3d03f5069: Download complete
58e038a18a81: Verifying Checksum
58e038a18a81: Download complete
b1badc6e5066: Pull complete
a247cff9490f: Verifying Checksum
a247cff9490f: Download complete
7d3ae89c9919: Verifying Checksum
7d3ae89c9919: Download complete
aea9dc73734b: Verifying Checksum
aea9dc73734b: Download complete
9ac023f440cd: Verifying Checksum
9ac023f440cd: Download complete
9982ac0fded1: Pull complete
3e09f9f722cb: Pull complete
d660be5f5126: Pull complete
4f4fb700ef54: Pull complete
db19523adbf4: Pull complete
01f14457df16: Pull complete
7d3ae89c9919: Pull complete
6ac20beeef15: Pull complete
5fc3d03f5069: Pull complete
58e038a18a81: Pull complete
aea9dc73734b: Pull complete
a247cff9490f: Pull complete
9ac023f440cd: Pull complete
Digest: sha256:5b442901b992e019eb102c2707e4ad2f663fef3ddda88afae8cec1e69200c510
Status: Downloaded newer image for fyneio/fyne-cross-images:android
[✓] Package: "/home/runner/work/zop/zop/fyne-cross/dist/android-arm64/zop.apk"
find: ‘fyne-cross/dist/android’: No such file or directory
Error: Process completed with exit code 1.
```</issue_description>
## Comments on the Issue (you are @copilot in this section)
<comments>
</comments>

Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Android release packaging succeeded, but the workflow failed afterward because it looked for the APK in `fyne-cross/dist/android`, while `fyne-cross` outputs to an arch-specific directory (e.g. `fyne-cross/dist/android-arm64`). This PR fixes APK discovery and adds PR-time release dry-run checks so release-specific issues are caught before tagging. - **Workflow fix: APK path resolution (release workflow)** - Updated the Android release job to search for APKs under `fyne-cross/dist` instead of a hardcoded `fyne-cross/dist/android` path. - Kept existing failure behavior and artifact copy flow unchanged. - **Failure message alignment** - Updated the error message to reflect the new search root (`fyne-cross/dist`) for clearer diagnostics. ```bash fyne-cross android -app-id com.zop.app -arch arm64 ./cmd/zop-mobile APK_PATH=$(find fyne-cross/dist -type f -name "*.apk" -print -quit) if [ -z "$APK_PATH" ]; then echo "APK not found under fyne-cross/dist" >&2 exit 1 fi cp "$APK_PATH" "zop-android-arm64.apk" ``` - **PR CI enhancement: release dry-run jobs (no publish)** - Added PR-only dry-run jobs to `.github/workflows/test.yml` that run **after** the existing `test` and `test-whisper` jobs: - `release-dry-run-build`: runs the Linux release build matrix (amd64/arm64, whisper + nowhisper variants). - `release-dry-run-android`: runs Android APK packaging with `fyne-cross`, including APK discovery under `fyne-cross/dist`. - These jobs intentionally stop before any GitHub release creation/publishing. - Centralized shared CI settings in workflow `env` (`WHISPER_CPP_VERSION`, `ANDROID_APP_ID`, `ANDROID_ARCH`) and simplified dry-run naming logic for consistency. <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Bug in Android build</issue_title> > <issue_description>Release failed with following error: > > ``` > Run fyne-cross android -app-id com.zop.app -arch arm64 ./cmd/zop-mobile > [i] Target: android/arm64 > [i] Cleaning target directories... > [✓] "bin" dir cleaned: /home/runner/work/zop/zop/fyne-cross/bin/android-arm64 > [✓] "dist" dir cleaned: /home/runner/work/zop/zop/fyne-cross/dist/android-arm64 > [✓] "temp" dir cleaned: /home/runner/work/zop/zop/fyne-cross/tmp/android-arm64 > [i] Checking for go.mod: /home/runner/work/zop/zop/go.mod > [✓] go.mod found > [i] Packaging app... > [!] Default icon not found at "Icon.png" > [✓] Created a placeholder icon using Fyne logo for testing purpose > Unable to find image 'fyneio/fyne-cross-images:android' locally > android: Pulling from fyneio/fyne-cross-images > b1badc6e5066: Pulling fs layer > 9982ac0fded1: Pulling fs layer > 3e09f9f722cb: Pulling fs layer > d660be5f5126: Pulling fs layer > 4f4fb700ef54: Pulling fs layer > db19523adbf4: Pulling fs layer > 01f14457df16: Pulling fs layer > 7d3ae89c9919: Pulling fs layer > 6ac20beeef15: Pulling fs layer > 5fc3d03f5069: Pulling fs layer > 58e038a18a81: Pulling fs layer > aea9dc73734b: Pulling fs layer > a247cff9490f: Pulling fs layer > 9ac023f440cd: Pulling fs layer > 4f4fb700ef54: Waiting > db19523adbf4: Waiting > 01f14457df16: Waiting > 7d3ae89c9919: Waiting > 6ac20beeef15: Waiting > 5fc3d03f5069: Waiting > 58e038a18a81: Waiting > aea9dc73734b: Waiting > a247cff9490f: Waiting > d660be5f5126: Waiting > 9ac023f440cd: Waiting > 9982ac0fded1: Verifying Checksum > 9982ac0fded1: Download complete > b1badc6e5066: Verifying Checksum > b1badc6e5066: Download complete > d660be5f5126: Verifying Checksum > d660be5f5126: Download complete > 4f4fb700ef54: Verifying Checksum > 4f4fb700ef54: Download complete > db19523adbf4: Verifying Checksum > db19523adbf4: Download complete > 3e09f9f722cb: Verifying Checksum > 3e09f9f722cb: Download complete > 01f14457df16: Verifying Checksum > 01f14457df16: Download complete > 6ac20beeef15: Verifying Checksum > 6ac20beeef15: Download complete > 5fc3d03f5069: Verifying Checksum > 5fc3d03f5069: Download complete > 58e038a18a81: Verifying Checksum > 58e038a18a81: Download complete > b1badc6e5066: Pull complete > a247cff9490f: Verifying Checksum > a247cff9490f: Download complete > 7d3ae89c9919: Verifying Checksum > 7d3ae89c9919: Download complete > aea9dc73734b: Verifying Checksum > aea9dc73734b: Download complete > 9ac023f440cd: Verifying Checksum > 9ac023f440cd: Download complete > 9982ac0fded1: Pull complete > 3e09f9f722cb: Pull complete > d660be5f5126: Pull complete > 4f4fb700ef54: Pull complete > db19523adbf4: Pull complete > 01f14457df16: Pull complete > 7d3ae89c9919: Pull complete > 6ac20beeef15: Pull complete > 5fc3d03f5069: Pull complete > 58e038a18a81: Pull complete > aea9dc73734b: Pull complete > a247cff9490f: Pull complete > 9ac023f440cd: Pull complete > Digest: sha256:5b442901b992e019eb102c2707e4ad2f663fef3ddda88afae8cec1e69200c510 > Status: Downloaded newer image for fyneio/fyne-cross-images:android > [✓] Package: "/home/runner/work/zop/zop/fyne-cross/dist/android-arm64/zop.apk" > find: ‘fyne-cross/dist/android’: No such file or directory > Error: Process completed with exit code 1. > ```</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes peterwwillis/zop#19 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/peterwwillis/zop/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
peterwwillis (Migrated from github.com) reviewed 2026年03月17日 08:04:58 +01:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026年03月17日 08:36:19 +01:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment
Copy link

Pull request overview

This PR fixes the Android release workflow’s APK artifact discovery to match fyne-cross’s current arch-specific output directory layout (e.g. fyne-cross/dist/android-arm64), preventing post-build failures during artifact collection.

Changes:

  • Update the release workflow to search for APKs under fyne-cross/dist rather than a hardcoded fyne-cross/dist/android path.
  • Align the failure message with the updated search root for clearer diagnostics.
## Pull request overview This PR fixes the Android release workflow’s APK artifact discovery to match `fyne-cross`’s current arch-specific output directory layout (e.g. `fyne-cross/dist/android-arm64`), preventing post-build failures during artifact collection. **Changes:** - Update the release workflow to search for APKs under `fyne-cross/dist` rather than a hardcoded `fyne-cross/dist/android` path. - Align the failure message with the updated search root for clearer diagnostics.
peterwwillis commented 2026年03月17日 08:36:37 +01:00 (Migrated from github.com)
Copy link

@copilot the tests are not catching all the issues. in a PR, run the tests, and then run the release stuff, but stop before actually issuing the release. this will test everything and avoid any lingering bugs in the release process

@copilot the tests are not catching all the issues. in a PR, run the tests, and then run the release stuff, but stop before actually issuing the release. this will test everything and avoid any lingering bugs in the release process
github-actions[bot] commented 2026年03月17日 08:37:11 +01:00 (Migrated from github.com)
Copy link

Mobile UI Screenshot

zop mobile UI

### Mobile UI Screenshot ![zop mobile UI](https://raw.githubusercontent.com/peterwwillis/zop/ui-screenshots/pr-20/zop-mobile-ui.png) <!-- Sticky Pull Request Commentzop-mobile-ui -->
Copilot commented 2026年03月17日 08:43:26 +01:00 (Migrated from github.com)
Copy link

@copilot the tests are not catching all the issues. in a PR, run the tests, and then run the release stuff, but stop before actually issuing the release. this will test everything and avoid any linger...

Implemented in commit 6cd7783 (with follow-up refinements in ccac19f/4fdef30). PR CI now runs release dry-run jobs after tests on pull requests: a release-style Linux build matrix and Android APK packaging flow, and it stops before any GitHub release publication.

> @copilot the tests are not catching all the issues. in a PR, run the tests, and then run the release stuff, but stop before actually issuing the release. this will test everything and avoid any linger... Implemented in commit `6cd7783` (with follow-up refinements in `ccac19f`/`4fdef30`). PR CI now runs release dry-run jobs after tests on pull requests: a release-style Linux build matrix and Android APK packaging flow, and it stops before any GitHub release publication.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mutablecc/zop!20
Reference in a new issue
mutablecc/zop
No description provided.
Delete branch "copilot/fix-android-build-error"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?