|
44 | 44 | build_output: btch-arm64 |
45 | 45 | asset_name: btch-linux-arm64 |
46 | 46 | compile_target: bun-linux-arm64 |
| 47 | + # Native Android (Termux) — Bun 1.3.14+ compiles a bionic-linked |
| 48 | + # binary (interpreter /system/bin/linker64) that actually runs on |
| 49 | + # Termux, unlike the glibc linux-arm64 build. libopentui.so is |
| 50 | + # statically linked so the TUI works too. |
| 51 | + - runner: ubuntu-latest |
| 52 | + build_output: btch-android |
| 53 | + asset_name: btch-android-arm64 |
| 54 | + compile_target: bun-android-arm64 |
47 | 55 | - runner: windows-latest |
48 | 56 | build_output: btch.exe |
49 | 57 | asset_name: btch-windows-x64.exe |
@@ -74,20 +82,29 @@ jobs: |
74 | 82 | - name: Setup Bun |
75 | 83 | uses: oven-sh/setup-bun@v2 |
76 | 84 | with: |
77 | | - bun-version: 1.3.11 |
| 85 | + bun-version: 1.3.14 |
78 | 86 |
|
79 | 87 | - name: Install dependencies |
80 | 88 | run: bun install --frozen-lockfile |
81 | 89 |
|
82 | 90 | # bun install only installs the OpenTUI platform package matching the |
83 | | - # *build host* (x64), so cross-compiling the arm64 binary needs the |
84 | | - # linux-arm64 native package present too (Bun bundles it at build time). |
| 91 | + # *build host* (x64), so cross-compiling the arm64/android binaries needs |
| 92 | + # the arm64 native package present too (Bun bundles it at build time). |
85 | 93 | # The shared script downloads the tarball directly, bypassing npm's |
86 | 94 | # os/cpu check without touching package.json/lockfiles. |
87 | 95 | - name: Install ARM64 OpenTUI native package (cross-compile) |
88 | | - if: matrix.asset_name == 'btch-linux-arm64' |
| 96 | + if: contains(matrix.asset_name, 'arm64') |
89 | 97 | run: node scripts/install-opentui-platform.mjs @opentui/core-linux-arm64 |
90 | 98 |
|
| 99 | + # OpenTUI has no android package; for the android target Bun resolves |
| 100 | + # @opentui/core-android-arm64 at build time. libopentui.so is statically |
| 101 | + # linked, so the linux-arm64 package works verbatim as the android shim. |
| 102 | + - name: Shim Android OpenTUI package |
| 103 | + if: matrix.asset_name == 'btch-android-arm64' |
| 104 | + run: | |
| 105 | + mkdir -p node_modules/@opentui/core-android-arm64 |
| 106 | + cp -r node_modules/@opentui/core-linux-arm64/. node_modules/@opentui/core-android-arm64/ |
| 107 | +
|
91 | 108 | - name: Compile standalone binary |
92 | 109 | run: bun build --compile --target="${{ matrix.compile_target }}" --outfile "release/${{ matrix.build_output }}" ./src/index.ts |
93 | 110 |
|
@@ -161,6 +178,7 @@ jobs: |
161 | 178 | release-assets/**/btch-linux-x64 |
162 | 179 | release-assets/**/btch-linux-x64-baseline |
163 | 180 | release-assets/**/btch-linux-arm64 |
| 181 | + release-assets/**/btch-android-arm64 |
164 | 182 | release-assets/**/btch-darwin-arm64 |
165 | 183 | release-assets/**/btch-windows-x64.exe |
166 | 184 | release-assets/checksums.txt |
@@ -194,7 +212,7 @@ jobs: |
194 | 212 | - name: Setup Bun |
195 | 213 | uses: oven-sh/setup-bun@v2 |
196 | 214 | with: |
197 | | - bun-version: 1.3.11 |
| 215 | + bun-version: 1.3.14 |
198 | 216 |
|
199 | 217 | - name: Install dependencies |
200 | 218 | run: bun install --frozen-lockfile |
|
0 commit comments