|
1 | | -name: Full-Dep Termux Factory |
| 1 | +name: Universal Termux Factory |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
5 | 5 | inputs: |
6 | 6 | package_name: |
7 | | - description: 'Main package to build (e.g., manim)' |
| 7 | + description: 'Main package to build' |
8 | 8 | required: true |
9 | 9 | default: 'manim' |
10 | 10 | system_deps: |
11 | | - description: 'System libs needed for compilation (e.g., libcairo2-dev libpango1.0-dev)' |
| 11 | + description: 'System libs (pkg install style)' |
12 | 12 | required: false |
13 | | - default: 'libcairo2-dev libpango1.0-dev ffmpeg libffi-dev' |
| 13 | + default: 'libcairo libpango ffmpeg libffi' |
14 | 14 |
|
15 | 15 | jobs: |
16 | 16 | build_everything: |
17 | 17 | runs-on: ubuntu-latest |
18 | | - container: |
| 18 | + container: |
19 | 19 | image: termux/termux-docker:aarch64 |
| 20 | + # This is the secret sauce to stop the "not running" error ⬇️ |
| 21 | + options: --tty |
20 | 22 |
|
21 | 23 | steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + |
22 | 26 | - name: Sync Termux Environment |
23 | 27 | run: | |
24 | | - # Prepare the environment with all native tools |
25 | | - pkg update -y |
| 28 | + # The container starts fresh, so we gotta wake it up |
| 29 | + yes | pkg upgrade -y |
26 | 30 | pkg install python python-pip build-essential binutils ${{ github.event.inputs.system_deps }} -y |
27 | 31 | pip install --upgrade pip wheel setuptools |
28 | 32 |
|
29 | | - - name: Build Main PKG and All Deps |
| 33 | + - name: Build All Dependencies as Wheels |
30 | 34 | run: | |
31 | 35 | mkdir -p ./build_output |
32 | | - # This command is the 'Beast Mode' |
33 | | - # --no-binary :all: ensures we don't accidentally grab a Glibc wheel |
34 | | - # It forces a rebuild from source for EVERYTHING in the dependency tree |
| 36 | + # We force it to build from source so it's 100% Bionic/Termux compatible |
| 37 | + # This will recursively find every dep and turn it into a .whl |
35 | 38 | pip wheel ${{ github.event.inputs.package_name }} \ |
36 | 39 | --wheel-dir ./build_output \ |
37 | 40 | --no-binary :all: |
38 | 41 |
|
| 42 | + - name: Archive the Loot |
| 43 | + run: | |
| 44 | + # Using tar because it's usually pre-installed and faster |
| 45 | + tar -cvf ${{ github.event.inputs.package_name }}_bundle.tar ./build_output |
| 46 | +
|
| 47 | + - name: Upload Bundle |
| 48 | + uses: actions/upload-artifact@v4 |
| 49 | + with: |
| 50 | + name: ${{ github.event.inputs.package_name }}-termux-bundle |
| 51 | + path: ./*.tar |
| 52 | + --no-binary :all: |
| 53 | + |
39 | 54 | - name: Package the Loot |
40 | 55 | run: | |
41 | 56 | # Zip everything together so you get one clean file |
|
0 commit comments