Skip to content

chore: add upload of ARM64 build to apk branch#3113

Draft
marcnause wants to merge 4 commits intofossasia:flutterfrom
marcnause:fixUpload
Draft

chore: add upload of ARM64 build to apk branch#3113
marcnause wants to merge 4 commits intofossasia:flutterfrom
marcnause:fixUpload

Conversation

@marcnause
Copy link
Contributor

@marcnause marcnause commented Mar 3, 2026

Fixes #3111

Changes

  • add step which builds and adds Linux ARM64 packages to apk branch

Screenshots / Recordings

N/A

Checklist:

  • No hard coding: I have used values from constants.dart or localization files instead of hard-coded values.
  • No end of file edits: No modifications done at end of resource files.
  • Code reformatting: I have formatted the code using dart format or the IDE formatter.
  • Code analysis: My code passes checks run in flutter analyze and tests run in flutter test.

Summary by Sourcery

Add Linux ARM64 build artifacts to the apk branch and adjust workflow cleanup to preserve the appropriate package files.

Build:

  • Update apk branch upload step to only remove non-ARM Linux packages before copying new artifacts.

CI:

  • Introduce a dedicated Linux ARM64 Flutter build job that builds ARM64 packages and pushes them to the apk branch.

Copilot AI review requested due to automatic review settings March 3, 2026 22:09
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Mar 3, 2026

Reviewer's Guide

Extends the GitHub Actions push workflow to build Linux ARM64 packages using a shared workflow and upload them to the apk branch, while adjusting the existing apk-branch cleanup logic to preserve architecture-specific artifacts appropriately.

Flow diagram for ARM64 packages upload to apk branch

flowchart TD
  Start["Start linux-arm64 job"] --> Checkout["Checkout repository"]
  Checkout --> RunWorkflow["Run shared linux-arm64 workflow with VERSION_NAME and VERSION_CODE"]
  RunWorkflow --> ConfigureGit["Configure git user for github-actions[bot]"]
  ConfigureGit --> CloneApk["Clone apk branch into apk directory"]
  CloneApk --> DetermineBranch["Determine source branch name"]
  DetermineBranch --> CleanArm64["Remove existing *arm64*.deb and *aarch64*.rpm from apk"]
  CleanArm64 --> CopyDeb["Copy generated *.deb into apk directory"]
  CopyDeb --> CopyRpm["Copy generated *.rpm into apk directory"]
  CopyRpm --> OrphanBranch["Create orphan branch temporary"]
  OrphanBranch --> AddAll["git add --all"]
  AddAll --> Commit["Commit with auto ARM64 packages message"]
  Commit --> ReplaceApk["Delete old apk branch and rename temporary to apk"]
  ReplaceApk --> PushForce["Force-push apk to origin"]
  PushForce --> End["End linux-arm64 job"]
Loading

File-Level Changes

Change Details Files
Adjust apk branch cleanup in existing Linux job to avoid deleting architecture-specific packages.
  • Replace blanket removal of all .deb and .rpm files with a pattern that excludes arm64/aarch64 artifacts when cleaning the apk branch directory before copying new files
.github/workflows/push-event.yml
Add a dedicated linux-arm64 job that builds ARM64 packages and publishes them to the apk branch.
  • Introduce linux-arm64 job depending on the common job and running on ubuntu-24.04-arm
  • Invoke the shared .github/actions/linux-arm64 composite action with VERSION_NAME and VERSION_CODE from the common job outputs
  • Clone the apk branch, delete existing ARM64 .deb and .rpm files, copy newly built ARM64 artifacts into the apk directory, and force-push an orphan apk branch with an auto-generated commit message
.github/workflows/push-event.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#3111 Add ARM64 Linux build job to the CI workflow so that Linux ARM64 packages (.deb/.rpm) are produced.
#3111 Upload the generated Linux ARM64 packages to the apk branch alongside other platform builds.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new GitHub Actions job to build Linux ARM64 packages and publish them to the apk branch, aligning push-event.yml with the repo’s existing “latest builds in apk branch” distribution approach.

Changes:

  • Introduces a linux-arm64 job running on ubuntu-24.04-arm.
  • Runs the existing .github/actions/linux-arm64 composite action to produce .deb/.rpm.
  • Pushes the generated ARM64 packages to the apk branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@marcnause marcnause marked this pull request as ready for review March 3, 2026 22:26
Copilot AI review requested due to automatic review settings March 3, 2026 22:26
sourcery-ai[bot]

This comment was marked as resolved.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 3, 2026 22:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +380 to +385
git checkout --orphan temporary
git add --all .
git commit -am "[Auto] Update Linux ARM64 Packages from $branch ($(date +%Y-%m-%d.%H:%M:%S))"
git branch -D apk
git branch -m apk
git push --force origin apk
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linux-arm64 updates the apk branch by creating an orphan commit and git push --force. Because other jobs in this same workflow (e.g., linux, windows, macos) also do the same in parallel, this job can overwrite their updates with a stale clone (last-writer-wins), even though the deletion patterns are now arch-specific. Serialize all apk publishing (e.g., workflow/job concurrency group shared by all publishing jobs, or a single dedicated publish job that runs after all builds and pushes once).

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

@marcnause marcnause changed the title chore: add upload of ARM64 build to apk branch WIP: chore: add upload of ARM64 build to apk branch Mar 3, 2026
@marcnause marcnause marked this pull request as draft March 3, 2026 22:43
@marcnause marcnause changed the title WIP: chore: add upload of ARM64 build to apk branch chore: add upload of ARM64 build to apk branch Mar 3, 2026
@marcnause marcnause self-assigned this Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Build Status

Build successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/22645911485/artifacts/5750193764.

Screenshots

Android Screenshots
iPhone Screenshots
iPad Screenshots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ARM64 Linux builds are not uploaded to apk branch

2 participants