Skip to content

ci: add Termux Android release targets#56

Open
armannoca wants to merge 2 commits into
madebyaris:mainfrom
armannoca:add-termux-android-release
Open

ci: add Termux Android release targets#56
armannoca wants to merge 2 commits into
madebyaris:mainfrom
armannoca:add-termux-android-release

Conversation

@armannoca

@armannoca armannoca commented May 14, 2026

Copy link
Copy Markdown

Adds Android release targets for Termux: aarch64-linux-android and armv7-linux-androideabi. Updates install.sh to detect Termux and download linux-android release assets. Switches nca-core reqwest to rustls-only and removes unused mcpr dependency to avoid native OpenSSL during Android builds.


Summary by cubic

Add Android Termux release targets and a Termux-aware installer, and gate CLI clipboard behind a clipboard feature for Android. Switch HTTP to reqwest with rustls and drop mcpr to avoid OpenSSL.

  • New Features

    • Release artifacts for aarch64-linux-android and armv7-linux-androideabi; CI installs NDK r27c and sets LLVM linkers.
    • install.sh detects Termux and downloads linux-android assets; maps armv7. CLI clipboard is feature-gated (clipboard, default on) with a no-clipboard fallback.
  • Dependencies

    • Switch reqwest to default-features = false with rustls-tls to remove OpenSSL/native-tls.
    • Remove unused mcpr crate and its transitive TLS dependencies.

Written for commit e83d0aa. Summary will update on new commits.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

4 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="install.sh">

<violation number="1" location="install.sh:20">
P1: Termux install support is incomplete: script still defaults to /usr/local/bin and sudo, which are unavailable/invalid in Termux</violation>

<violation number="2" location="install.sh:33">
P2: armv7l/armv8l is treated as supported on all Linux platforms, but only an Android armv7 release artifact is built. On regular Linux ARMv7 systems this produces `armv7-unknown-linux-gnu`, which doesn't exist in releases, causing a confusing download failure instead of the previous clear unsupported-architecture error.</violation>

<violation number="3" location="install.sh:33">
P0: ARMv7 Android release asset name mismatch: script produces `armv7-linux-android` but CI builds `armv7-linux-androideabi`, causing download to fail with 404 on Termux armv7 devices</violation>
</file>

<file name=".github/workflows/release.yml">

<violation number="1" location=".github/workflows/release.yml:121">
P1: Android NDK clang targets are hardcoded to API 35 (Android 15), making Termux release binaries incompatible with the vast majority of Android devices</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread install.sh
case "$arch" in
x86_64|amd64) arch="x86_64" ;;
aarch64|arm64) arch="aarch64" ;;
armv7l|armv8l) arch="armv7" ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0: ARMv7 Android release asset name mismatch: script produces armv7-linux-android but CI builds armv7-linux-androideabi, causing download to fail with 404 on Termux armv7 devices

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At install.sh, line 33:

<comment>ARMv7 Android release asset name mismatch: script produces `armv7-linux-android` but CI builds `armv7-linux-androideabi`, causing download to fail with 404 on Termux armv7 devices</comment>

<file context>
@@ -16,14 +16,21 @@ detect_platform() {
     case "$arch" in
         x86_64|amd64)   arch="x86_64" ;;
         aarch64|arm64)  arch="aarch64" ;;
+        armv7l|armv8l)  arch="armv7" ;;
         *)              error "Unsupported architecture: $arch" ;;
     esac
</file context>

Comment thread install.sh
case "$os" in
Linux) os="unknown-linux-gnu" ;;
Linux)
if [ -n "${TERMUX_VERSION:-}" ] || [ -d "/data/data/com.termux/files/usr" ]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: Termux install support is incomplete: script still defaults to /usr/local/bin and sudo, which are unavailable/invalid in Termux

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At install.sh, line 20:

<comment>Termux install support is incomplete: script still defaults to /usr/local/bin and sudo, which are unavailable/invalid in Termux</comment>

<file context>
@@ -16,14 +16,21 @@ detect_platform() {
     case "$os" in
-        Linux)  os="unknown-linux-gnu" ;;
+        Linux)
+            if [ -n "${TERMUX_VERSION:-}" ] || [ -d "/data/data/com.termux/files/usr" ]; then
+                os="linux-android"
+            else
</file context>

@@ -84,6 +84,14 @@ jobs:
- target: aarch64-apple-darwin

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1: Android NDK clang targets are hardcoded to API 35 (Android 15), making Termux release binaries incompatible with the vast majority of Android devices

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 121:

<comment>Android NDK clang targets are hardcoded to API 35 (Android 15), making Termux release binaries incompatible with the vast majority of Android devices</comment>

<file context>
@@ -94,12 +102,27 @@ jobs:
+        if: matrix.android == true
+        shell: bash
+        run: |
+          echo "CC_aarch64_linux_android=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android35-clang" >> "$GITHUB_ENV"
+          echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android35-clang" >> "$GITHUB_ENV"
+          echo "CC_armv7_linux_androideabi=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi35-clang" >> "$GITHUB_ENV"
</file context>
Suggested change
- target: aarch64-apple-darwin
echo "CC_aarch64_linux_android=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang" >> "$GITHUB_ENV"
echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang" >> "$GITHUB_ENV"
echo "CC_armv7_linux_androideabi=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang" >> "$GITHUB_ENV"
echo "CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang" >> "$GITHUB_ENV"

Comment thread install.sh
case "$arch" in
x86_64|amd64) arch="x86_64" ;;
aarch64|arm64) arch="aarch64" ;;
armv7l|armv8l) arch="armv7" ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: armv7l/armv8l is treated as supported on all Linux platforms, but only an Android armv7 release artifact is built. On regular Linux ARMv7 systems this produces armv7-unknown-linux-gnu, which doesn't exist in releases, causing a confusing download failure instead of the previous clear unsupported-architecture error.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At install.sh, line 33:

<comment>armv7l/armv8l is treated as supported on all Linux platforms, but only an Android armv7 release artifact is built. On regular Linux ARMv7 systems this produces `armv7-unknown-linux-gnu`, which doesn't exist in releases, causing a confusing download failure instead of the previous clear unsupported-architecture error.</comment>

<file context>
@@ -16,14 +16,21 @@ detect_platform() {
     case "$arch" in
         x86_64|amd64)   arch="x86_64" ;;
         aarch64|arm64)  arch="aarch64" ;;
+        armv7l|armv8l)  arch="armv7" ;;
         *)              error "Unsupported architecture: $arch" ;;
     esac
</file context>
Suggested change
armv7l|armv8l) arch="armv7" ;;
armv7l|armv8l)
if [ "$os" = "linux-android" ]; then
arch="armv7"
else
error "Unsupported architecture: $arch"
fi
;;

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.

1 participant