1
1
Fork
You've already forked zop
0

Enable Android KVM acceleration and fix multi-arch Linux release builds #18

Merged
Copilot merged 5 commits from copilot/add-hardware-acceleration-android-build into main 2026年03月17日 07:48:49 +01:00
Copilot commented 2026年03月17日 03:13:46 +01:00 (Migrated from github.com)
Copy link

This issue asks to apply GitHub Actions Android hardware acceleration guidance to the release workflow and ensure Linux release artifacts build correctly across architectures.

  • What changed

    • Updated .github/workflows/release.yml in the android job to configure KVM device permissions via udev on ubuntu-latest runners.
    • Kept the existing fyne-cross android ... build and artifact flow unchanged.
    • Updated release workflow runner labels to supported GitHub-hosted values (replacing invalid ubuntu-slim usage).
    • Updated the Linux build matrix to produce both whisper and non-whisper artifacts for:
      • linux/amd64
      • linux/arm64
    • Routed linux/arm64 matrix entries to an ARM64 runner (ubuntu-24.04-arm) so CGO/whisper builds are compiled for the correct architecture.
  • Why this is in scope

    • Aligns the Android release workflow with GitHub’s documented Linux runner setup for Android hardware acceleration.
    • Addresses release workflow correctness issues introduced during matrix expansion.
    • Ensures requested artifact coverage (whisper + non-whisper for amd64 and arm64) is produced reliably.
  • Workflow snippet

    - name:Enable KVM for Android hardware accelerationrun:| 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
    build:runs-on:${{ matrix.runner }}strategy:matrix:include:- goos:linuxgoarch:amd64cgo:"1"tags:"whisper"whisper:truerunner:ubuntu-latest- goos:linuxgoarch:amd64cgo:"0"tags:""whisper:falserunner:ubuntu-latest- goos:linuxgoarch:arm64cgo:"1"tags:"whisper"whisper:truerunner:ubuntu-24.04-arm- goos:linuxgoarch:arm64cgo:"0"tags:""whisper:falserunner:ubuntu-24.04-arm
Original prompt

This section details on the original issue you should resolve

<issue_title>Add hardware acceleration for Androd build</issue_title>
<issue_description>Look up the documentation on how to add hardware acceleration for Android builds in the github action we use for release. Supposedly it results in faster, cheaper builds. Implement that.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

This issue asks to apply GitHub Actions Android hardware acceleration guidance to the release workflow and ensure Linux release artifacts build correctly across architectures. - **What changed** - Updated `.github/workflows/release.yml` in the `android` job to configure KVM device permissions via udev on `ubuntu-latest` runners. - Kept the existing `fyne-cross android ...` build and artifact flow unchanged. - Updated release workflow runner labels to supported GitHub-hosted values (replacing invalid `ubuntu-slim` usage). - Updated the Linux build matrix to produce **both whisper and non-whisper** artifacts for: - `linux/amd64` - `linux/arm64` - Routed `linux/arm64` matrix entries to an ARM64 runner (`ubuntu-24.04-arm`) so CGO/whisper builds are compiled for the correct architecture. - **Why this is in scope** - Aligns the Android release workflow with GitHub’s documented Linux runner setup for Android hardware acceleration. - Addresses release workflow correctness issues introduced during matrix expansion. - Ensures requested artifact coverage (whisper + non-whisper for amd64 and arm64) is produced reliably. - **Workflow snippet** ```yaml - name: Enable KVM for Android hardware acceleration 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 ``` ```yaml build: runs-on: ${{ matrix.runner }} strategy: matrix: include: - goos: linux goarch: amd64 cgo: "1" tags: "whisper" whisper: true runner: ubuntu-latest - goos: linux goarch: amd64 cgo: "0" tags: "" whisper: false runner: ubuntu-latest - goos: linux goarch: arm64 cgo: "1" tags: "whisper" whisper: true runner: ubuntu-24.04-arm - goos: linux goarch: arm64 cgo: "0" tags: "" whisper: false runner: ubuntu-24.04-arm ``` <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Add hardware acceleration for Androd build</issue_title> > <issue_description>Look up the documentation on how to add hardware acceleration for Android builds in the github action we use for release. Supposedly it results in faster, cheaper builds. Implement that.</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes peterwwillis/zop#17 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 Send tasks to Copilot coding agent from [Slack](https://gh.io/cca-slack-docs) and [Teams](https://gh.io/cca-teams-docs) to turn conversations into code. Copilot posts an update in your thread when it's finished.
peterwwillis (Migrated from github.com) reviewed 2026年03月17日 03:13:46 +01:00
github-actions[bot] commented 2026年03月17日 03:35:56 +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-18/zop-mobile-ui.png) <!-- Sticky Pull Request Commentzop-mobile-ui -->
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026年03月17日 03:49:16 +01:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment
Copy link

Pull request overview

This PR aims to speed up the Android release build by enabling KVM access on GitHub Actions Linux runners (per GitHub’s Android hardware acceleration guidance) before building the APK.

Changes:

  • Add a udev rule + udev reload/trigger step in the android job to enable /dev/kvm access.
  • Change several jobs’ runner label from ubuntu-latest to ubuntu-slim.
  • Add a new linux/arm64 whisper-enabled build entry (CGO_ENABLED=1, -tags whisper) to the release build matrix.
## Pull request overview This PR aims to speed up the Android release build by enabling KVM access on GitHub Actions Linux runners (per GitHub’s Android hardware acceleration guidance) before building the APK. **Changes:** - Add a udev rule + udev reload/trigger step in the `android` job to enable `/dev/kvm` access. - Change several jobs’ runner label from `ubuntu-latest` to `ubuntu-slim`. - Add a new `linux/arm64` **whisper-enabled** build entry (`CGO_ENABLED=1`, `-tags whisper`) to the release build matrix.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026年03月17日 03:49:14 +01:00
Copy link

runs-on: ubuntu-slim is not a valid GitHub-hosted runner label (supported values are like ubuntu-latest, ubuntu-22.04, ubuntu-24.04, etc.). This will prevent the workflow from being scheduled. Please revert to a supported runner label or switch to runs-on: [self-hosted, ubuntu-slim] if this is intended to target a self-hosted runner.

`runs-on: ubuntu-slim` is not a valid GitHub-hosted runner label (supported values are like `ubuntu-latest`, `ubuntu-22.04`, `ubuntu-24.04`, etc.). This will prevent the workflow from being scheduled. Please revert to a supported runner label or switch to `runs-on: [self-hosted, ubuntu-slim]` if this is intended to target a self-hosted runner.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026年03月17日 03:49:15 +01:00
Copy link

PR description says the change surface is limited to adding KVM provisioning in the Android job, but this diff also changes multiple jobs to runs-on: ubuntu-slim and adds a new Linux/arm64 whisper build matrix entry. Please either update the PR description/scope accordingly or split/revert the unrelated workflow changes so the PR matches its stated intent.

PR description says the change surface is limited to adding KVM provisioning in the Android job, but this diff also changes multiple jobs to `runs-on: ubuntu-slim` and adds a new Linux/arm64 whisper build matrix entry. Please either update the PR description/scope accordingly or split/revert the unrelated workflow changes so the PR matches its stated intent.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026年03月17日 03:49:15 +01:00
Copy link

runs-on: ubuntu-slim is not a valid GitHub-hosted runner label, so this job will never start on GitHub-hosted runners. Use a supported runner label (e.g. ubuntu-latest / ubuntu-24.04) or an explicit self-hosted label array if applicable.

`runs-on: ubuntu-slim` is not a valid GitHub-hosted runner label, so this job will never start on GitHub-hosted runners. Use a supported runner label (e.g. `ubuntu-latest` / `ubuntu-24.04`) or an explicit self-hosted label array if applicable.
@ -98,7 +98,7 @@ jobs:
build:
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026年03月17日 03:49:15 +01:00
Copy link

runs-on: ubuntu-slim is not a valid GitHub-hosted runner label, which will block the build matrix from running. Please change back to a supported runner label (e.g. ubuntu-latest / ubuntu-24.04) unless this is meant for a self-hosted runner.

`runs-on: ubuntu-slim` is not a valid GitHub-hosted runner label, which will block the build matrix from running. Please change back to a supported runner label (e.g. `ubuntu-latest` / `ubuntu-24.04`) unless this is meant for a self-hosted runner.
@ -138,0 +140,4 @@
# whisper: false
#- goos: windows
# goarch: arm64
# cgo: "0"
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026年03月17日 03:49:15 +01:00
Copy link

This adds a Linux/arm64 build with CGO_ENABLED=1 and tags: whisper, but the job runs on an amd64 Ubuntu runner and does not set up an arm64 cross toolchain (CC=aarch64-linux-gnu-gcc, sysroot, etc.) or build whisper.cpp for arm64. As written, cmake will produce amd64 libraries and the subsequent go build for GOARCH=arm64 with CGO enabled is expected to fail. Either keep arm64 as cgo: "0" (no-whisper), or switch this matrix entry to run on an arm64 runner / add the required cross-compilation setup and build whisper.cpp for arm64.

This adds a Linux/arm64 build with `CGO_ENABLED=1` and `tags: whisper`, but the job runs on an amd64 Ubuntu runner and does not set up an arm64 cross toolchain (`CC=aarch64-linux-gnu-gcc`, sysroot, etc.) or build `whisper.cpp` for arm64. As written, `cmake` will produce amd64 libraries and the subsequent `go build` for `GOARCH=arm64` with CGO enabled is expected to fail. Either keep arm64 as `cgo: "0"` (no-whisper), or switch this matrix entry to run on an arm64 runner / add the required cross-compilation setup and build `whisper.cpp` for arm64.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026年03月17日 03:49:15 +01:00
Copy link

runs-on: ubuntu-slim is not a valid GitHub-hosted runner label, so the release job will not be scheduled. Please use a supported label (e.g. ubuntu-latest / ubuntu-24.04) or a self-hosted runner label array.

`runs-on: ubuntu-slim` is not a valid GitHub-hosted runner label, so the release job will not be scheduled. Please use a supported label (e.g. `ubuntu-latest` / `ubuntu-24.04`) or a self-hosted runner label array.
peterwwillis (Migrated from github.com) reviewed 2026年03月17日 03:52:46 +01:00
@ -138,0 +140,4 @@
# whisper: false
#- goos: windows
# goarch: arm64
# cgo: "0"
peterwwillis (Migrated from github.com) commented 2026年03月17日 03:52:46 +01:00
Copy link

@copilot I want to make whisper and non-whisper builds for arm64, as well as amd64. Make any necessary changes to make that happen.

@copilot I want to make whisper and non-whisper builds for arm64, as well as amd64. Make any necessary changes to make that happen.
copilot-swe-agent[bot] (Migrated from github.com) reviewed 2026年03月17日 03:54:39 +01:00
@ -138,0 +140,4 @@
# whisper: false
#- goos: windows
# goarch: arm64
# cgo: "0"
copilot-swe-agent[bot] (Migrated from github.com) commented 2026年03月17日 03:54:39 +01:00
Copy link

Implemented in aa06892. The release workflow now builds whisper and non-whisper variants for both linux/amd64 and linux/arm64, and the arm64 whisper build runs on an arm64 runner (ubuntu-24.04-arm) so CGO + whisper.cpp are built for the correct architecture.

Implemented in aa06892. The release workflow now builds whisper and non-whisper variants for both linux/amd64 and linux/arm64, and the arm64 whisper build runs on an arm64 runner (`ubuntu-24.04-arm`) so CGO + whisper.cpp are built for the correct architecture.
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!18
Reference in a new issue
mutablecc/zop
No description provided.
Delete branch "copilot/add-hardware-acceleration-android-build"

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?