Add aarch64-linux-android build target to release workflow - #1
Merged
Conversation
Owner
|
@claude[agent] are you able to accomplish this? The copilot task wasn't able to run |
Co-authored-by: wallentx <8990544+wallentx@users.noreply.github.com>
Yes, I was able to accomplish this! I've successfully added the aarch64-linux-android build target to the release workflow. Changes made in commit 1c54a95:
The workflow will now build codex and codex-responses-api-proxy binaries for Android ARM64 devices. |
wallentx
marked this pull request as ready for review
February 9, 2026 20:38
wallentx
pushed a commit
that referenced
this pull request
Feb 14, 2026
…i#10590) ## Summary This PR makes app-server-provided image URLs first-class attachments in TUI, so they survive resume/backtrack/history recall and are resubmitted correctly. <img width="715" height="491" alt="Screenshot 2026-02-12 at 8 27 08 PM" src="https://github.com/user-attachments/assets/226cbd35-8f0c-4e51-a13e-459ef5dd1927" /> Can delete the attached image upon backtracking: <img width="716" height="301" alt="Screenshot 2026-02-12 at 8 27 31 PM" src="https://github.com/user-attachments/assets/4558d230-f1bd-4eed-a093-8e1ab9c6db27" /> In both history and composer, remote images are rendered as normal `[Image #N]` placeholders, with numbering unified with local images. ## What changed - Plumb remote image URLs through TUI message state: - `UserHistoryCell` - `BacktrackSelection` - `ChatComposerHistory::HistoryEntry` - `ChatWidget::UserMessage` - Show remote images as placeholder rows inside the composer box (above textarea), and in history cells. - Support keyboard selection/deletion for remote image rows in composer (`Up`/`Down`, `Delete`/`Backspace`). - Preserve remote-image-only turns in local composer history (Up/Down recall), including restore after backtrack. - Ensure submit/queue/backtrack resubmit include remote images in model input (`UserInput::Image`), and keep request shape stable for remote-image-only turns. - Keep image numbering contiguous across remote + local images: - remote images occupy `[Image #1]..[Image #M]` - local images start at `[Image #M+1]` - deletion renumbers consistently. - In protocol conversion, increment shared image index for remote images too, so mixed remote/local image tags stay in a single sequence. - Simplify restore logic to trust in-memory attachment order (no placeholder-number parsing path). - Backtrack/replay rollback handling now queues trims through `AppEvent::ApplyThreadRollback` and syncs transcript overlay/deferred lines after trims, so overlay/transcript state stays consistent. - Trim trailing blank rendered lines from user history rendering to avoid oversized blank padding. ## Docs + tests - Updated: `docs/tui-chat-composer.md` (remote image flow, selection/deletion, numbering offsets) - Added/updated tests across `tui/src/chatwidget/tests.rs`, `tui/src/app.rs`, `tui/src/app_backtrack.rs`, `tui/src/history_cell.rs`, and `tui/src/bottom_pane/chat_composer.rs` - Added snapshot coverage for remote image composer states, including deleting the first of two remote images. ## Validation - `just fmt` - `cargo test -p codex-tui` ## Codex author `codex fork 019c2636-1571-74a1-8471-15a3b1c3f49d`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for building Android ARM64 (aarch64-linux-android) binaries in the Rust release workflow.
Changes Made
aarch64-linux-androidtarget usingubuntu-24.04runner for cross-compilationaarch64-linux-android34-clang).zstand.tar.gzformats for bothcodexandcodex-responses-api-proxyTesting
The workflow is now ready to produce Android ARM64 binaries when triggered with a release tag.
Original prompt
Summary
Add
aarch64-linux-androidas a new build target to the release workflow, and ensure the build workflow supportsworkflow_dispatchso it can be triggered manually, with the resulting binary available as a downloadable artifact in the action run summary.Context
The repository currently builds binaries for 8 targets in
.github/workflows/rust-release.yml:aarch64-apple-darwinx86_64-apple-darwinx86_64-unknown-linux-muslx86_64-unknown-linux-gnuaarch64-unknown-linux-muslaarch64-unknown-linux-gnux86_64-pc-windows-msvcaarch64-pc-windows-msvcWe want to add
aarch64-linux-android(the Rust target triple for 64-bit ARM Android).Required Changes
1. Add
workflow_dispatchtriggerThe workflow should be executable via
workflow_dispatchin addition to its existing tag-push trigger. When triggered viaworkflow_dispatch, the tag-check job validation should be skipped (or made conditional) so the build can proceed without a tag. The resulting binaries should be available as downloadable artifacts in the GitHub Actions run summary (they already useactions/upload-artifact, so this should work).2. Add the Android matrix entry
Add a new entry to the build matrix in
rust-release.yml:3. Add Android NDK setup step
Add a new conditional step that installs the Android NDK and configures the cross-compilation toolchain. This step should:
ndk-bundleor a specific NDK version like r27)CC_aarch64_linux_android→ pointing to the NDK'saarch64-linux-android21-clangAR_aarch64_linux_android→ pointing to the NDK'sllvm-ar.cargo/config.tomlmatrix.target == 'aarch64-linux-android'4. Fix conditional logic for existing steps
Several existing steps use conditions that would incorrectly match or not match the Android target:
CODEX_BWRAP_ENABLE_FFIenv var (line 69): Currentlycontains(matrix.target, 'unknown-linux') && '1' || '0'. The Android target does NOT containunknown-linux, so this correctly evaluates to'0'— no change needed."Install Linux bwrap build dependencies" step (line 94-100): Currently gated on
runner.os == 'Linux'. This would fire for the Android target too. The Android build doesn't need bwrap deps (pkg-config,libcap-dev), but having them installed shouldn't hurt since it's a cross-compilation. However, if it causes issues, add an exclusion condition. For safety, change the condition to also exclude the android target:runner.os == 'Linux' && !contains(matrix.target, 'android'), or leave it as-is if the extra packages don't interfere.musl-specific steps (lines 101-188): These are all gated on
*-unknown-linux-musltargets — they will NOT fire foraarch64-linux-android. No change needed."Cosign Linux artifacts" step (line 212): Currently
contains(matrix.target, 'linux'). This WILL matchaarch64-linux-android. The cosign step uses./.github/actions/linux-code-sign. This should be fine for Android artifacts too (they're still Linux ELF binaries that can be signed). No change needed unless the signing action has issues with the android target.Sigstore copy in "Stage artifacts" (line 319): The glob
*linux*will match the android target. This is correct — if cosign runs, we should copy the.sigstorefiles. No change needed.5. Optionally update
.github/dotslash-config.jsonDotSlash doesn't natively have an
android-aarch64platform, so adding an entry there is optional. Skip this unless specifically needed.6. Handle
workflow_dispatchfor the release jobWhen triggered via
workflow_dispatch:tag-checkjob should be skipped or succeed trivially (since there's no tag)buildjob should still run and produce artifactsreleasejob (which creates a GitHub Release) should be skipped since there's no tag to release againstpublish-npmandupdate-branchjobs should also be skippedactions/upload-artifactso they appear in the run summaryOne approach: make
tag-checkconditional ongithub.event_name != 'workflow_dispatch', and makebuild.needsconditional (or useif: always()with appropriate checks). Therelease,publish-npm, andupdate-branchjobs should haveif: github.event_name != 'workflow_dispatch'(or remain gated on tag-check which won't produce outputs on dispatch).Files to modify
.github/workflows/rust-release.yml— main changes (matrix entry, NDK setup, workflow_dispatch trigger, conditional job logic).github/scripts/install-android-ndk.shif the setup logic is complex en...This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.