|
1 | | -name: Auto Build ARM Wheel (Beta) |
| 1 | +name: Fast Termux Native Build |
2 | 2 |
|
3 | | -on: |
4 | | - workflow_dispatch: |
5 | | - inputs: |
6 | | - package: |
7 | | - description: "PyPI package name" |
8 | | - required: true |
9 | | - version: |
10 | | - description: "Package version (empty = latest)" |
11 | | - required: false |
12 | | - python: |
13 | | - description: "Python selector" |
14 | | - required: true |
15 | | - default: "cp311-*" |
16 | | - arch: |
17 | | - description: "CPU architecture" |
18 | | - required: true |
19 | | - default: "aarch64" |
| 3 | +on: [push] |
20 | 4 |
|
21 | 5 | jobs: |
22 | 6 | build: |
23 | 7 | runs-on: ubuntu-latest |
24 | | - timeout-minutes: 120 |
25 | | - |
26 | 8 | steps: |
27 | 9 | - uses: actions/checkout@v4 |
28 | 10 |
|
29 | | - - name: Set up Python |
30 | | - uses: actions/setup-python@v5 |
| 11 | + - name: Set up Android NDK |
| 12 | + uses: nndixon/setup-android-ndk@v1 |
31 | 13 | with: |
32 | | - python-version: "3.11" |
| 14 | + ndk-version: r26b # Latest stable for Bionic support |
| 15 | + |
| 16 | + - name: Install Termux Toolchain |
| 17 | + run: | |
| 18 | + # We use the NDK to create a standalone toolchain for Termux |
| 19 | + export CC=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang |
| 20 | + export CXX=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang++ |
| 21 | + echo "CC=$CC" >> $GITHUB_ENV |
| 22 | + echo "CXX=$CXX" >> $GITHUB_ENV |
33 | 23 |
|
34 | | - - name: Enable QEMU |
35 | | - uses: docker/setup-qemu-action@v3 |
| 24 | + - name: Build Wheel |
| 25 | + run: | |
| 26 | + pip install wheel |
| 27 | + # We tell the build system specifically to target Android |
| 28 | + # This avoids the 'manylinux' GLIBC errors entirely |
| 29 | + python setup.py bdist_wheel --plat-name=android_aarch64 |
36 | 30 |
|
| 31 | + - name: Upload Fast Wheel |
| 32 | + uses: actions/upload-artifact@v4 |
| 33 | + with: |
| 34 | + name: fast-termux-wheel |
| 35 | + path: dist/*.whl |
37 | 36 | # -------------------------------------------------- |
38 | 37 | # System deps (heavy ones upfront) |
39 | 38 | # -------------------------------------------------- |
|
0 commit comments