From 2cba9bf200829e9144fbd86b9853a480bc1bdd72 Mon Sep 17 00:00:00 2001 From: Rishav Sanjay Date: Fri, 31 Jul 2026 03:26:35 +0530 Subject: [PATCH 1/9] build Android arm64-v8a wheel --- .github/workflows/compile.yml | 111 +++++++++++++++++++++++++++++++++- README.md | 6 ++ 2 files changed, 116 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 664b528..6431d68 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -119,10 +119,119 @@ jobs: with: name: tinymesa-whl-${{ matrix.tag }}-${{ matrix.os }} path: dist/ + android: + name: Build tinymesa mesa-25.2.7 for Android arm64-v8a + runs-on: ubuntu-22.04 + env: + MESA_TAG: mesa-25.2.7 + ANDROID_API: '25' + NDK_VERSION: 29.0.14206865 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup tinymesa + uses: ./.github/actions/setup + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + - name: Install Android NDK + run: sdkmanager "ndk;${NDK_VERSION}" + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.88.0 + targets: aarch64-linux-android + - name: Install bindgen + run: cargo install --locked --version 0.72.1 bindgen-cli + - name: Clone mesa + run: git clone --depth 1 --branch ${MESA_TAG} https://gitlab.freedesktop.org/mesa/mesa.git ${{ github.workspace }}/mesa + - name: Build host mesa_clc + run: | + cd ${{ github.workspace }}/mesa + export CLANG_PATH=$(which clang-20) + meson setup build-compiler \ + -Dprefix=${{ runner.temp }}/mesa-compiler \ + -Dbuildtype=release \ + -Dstrip=true \ + -Dplatforms="[]" \ + -Dgallium-drivers="[]" \ + -Dvulkan-drivers="[]" \ + -Dmesa-clc=enabled \ + -Dinstall-mesa-clc=true + meson install -C build-compiler + echo "${{ runner.temp }}/mesa-compiler/bin" >> "$GITHUB_PATH" + - name: Patch mesa + run: ./apply_patches.py ${{ github.workspace }}/mesa ${MESA_TAG} + - name: Build Android wheel + env: + LIBCLANG_PATH: /usr/lib/llvm-20/lib + run: | + NDK=${ANDROID_SDK_ROOT}/ndk/${NDK_VERSION} + TOOLCHAIN=${NDK}/toolchains/llvm/prebuilt/linux-x86_64 + cat > ${{ runner.temp }}/android-aarch64.ini < Date: Tue, 11 Aug 2026 23:55:16 +0530 Subject: [PATCH 2/9] remove nak --- README.md | 4 +--- meson.build | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9152d23..bc98178 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,4 @@ Builds are automatically generated upon new releases of mesa (checked daily). ### Android -Android `arm64-v8a` wheels target API 25 and contain `libtinymesa.so` with -the same NIR, NAK, and IR3 compiler API as the desktop build. The optional -LLVMpipe-based `libtinymesa_cpu.so` is not included. +Android arm64 wheels target API 25 and include NIR and IR3 support. NAK and LLVMpipe are not included. diff --git a/meson.build b/meson.build index 5e182ec..2fab834 100644 --- a/meson.build +++ b/meson.build @@ -52,6 +52,10 @@ foreach sym : ir3_symbols ir3_link_args += '-Wl,-u,' + symbol_prefix + sym endforeach -shared_library('tinymesa', link_whole : [ _libnir ], link_args : nak_link_args+ir3_link_args, link_with : [ libfreedreno_ir3, libfreedreno_common ], dependencies : [ idep_nak ]) -shared_library('tinymesa_cpu', link_whole : [ _libnir ], link_args : lvp_link_args+nak_link_args+ir3_link_args, link_with : [ libfreedreno_ir3, libfreedreno_common, libgallium ], dependencies : [ idep_nak ]) +if host_machine.system() == 'android' + shared_library('tinymesa', link_whole : [ _libnir ], link_args : ir3_link_args, link_with : [ libfreedreno_ir3, libfreedreno_common ]) +else + shared_library('tinymesa', link_whole : [ _libnir ], link_args : nak_link_args+ir3_link_args, link_with : [ libfreedreno_ir3, libfreedreno_common ], dependencies : [ idep_nak ]) + shared_library('tinymesa_cpu', link_whole : [ _libnir ], link_args : lvp_link_args+nak_link_args+ir3_link_args, link_with : [ libfreedreno_ir3, libfreedreno_common, libgallium ], dependencies : [ idep_nak ]) +endif From ddd0a6d7afb752ece948aad2840ab9000f0c4735 Mon Sep 17 00:00:00 2001 From: Rishav Sanjay Date: Tue, 11 Aug 2026 23:58:14 +0530 Subject: [PATCH 3/9] clean up --- .github/workflows/compile.yml | 99 ++++++++--------------------------- 1 file changed, 22 insertions(+), 77 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 6431d68..92346c8 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -120,12 +120,8 @@ jobs: name: tinymesa-whl-${{ matrix.tag }}-${{ matrix.os }} path: dist/ android: - name: Build tinymesa mesa-25.2.7 for Android arm64-v8a + name: Build tinymesa mesa-25.2.7 on Android arm64 runs-on: ubuntu-22.04 - env: - MESA_TAG: mesa-25.2.7 - ANDROID_API: '25' - NDK_VERSION: 29.0.14206865 steps: - name: Checkout repository uses: actions/checkout@v4 @@ -134,94 +130,43 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v3 - name: Install Android NDK - run: sdkmanager "ndk;${NDK_VERSION}" - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: 1.88.0 - targets: aarch64-linux-android - - name: Install bindgen - run: cargo install --locked --version 0.72.1 bindgen-cli + run: sdkmanager "ndk;29.0.14206865" - name: Clone mesa - run: git clone --depth 1 --branch ${MESA_TAG} https://gitlab.freedesktop.org/mesa/mesa.git ${{ github.workspace }}/mesa - - name: Build host mesa_clc - run: | - cd ${{ github.workspace }}/mesa - export CLANG_PATH=$(which clang-20) - meson setup build-compiler \ - -Dprefix=${{ runner.temp }}/mesa-compiler \ - -Dbuildtype=release \ - -Dstrip=true \ - -Dplatforms="[]" \ - -Dgallium-drivers="[]" \ - -Dvulkan-drivers="[]" \ - -Dmesa-clc=enabled \ - -Dinstall-mesa-clc=true - meson install -C build-compiler - echo "${{ runner.temp }}/mesa-compiler/bin" >> "$GITHUB_PATH" + run: git clone --depth 1 --branch mesa-25.2.7 https://gitlab.freedesktop.org/mesa/mesa.git ${{ github.workspace }}/mesa - name: Patch mesa - run: ./apply_patches.py ${{ github.workspace }}/mesa ${MESA_TAG} - - name: Build Android wheel - env: - LIBCLANG_PATH: /usr/lib/llvm-20/lib + run: ./apply_patches.py ${{ github.workspace }}/mesa mesa-25.2.7 + - name: Build mesa + shell: bash run: | - NDK=${ANDROID_SDK_ROOT}/ndk/${NDK_VERSION} - TOOLCHAIN=${NDK}/toolchains/llvm/prebuilt/linux-x86_64 - cat > ${{ runner.temp }}/android-aarch64.ini < ${{ runner.temp }}/android.ini < Date: Wed, 26 Aug 2026 00:47:35 +0530 Subject: [PATCH 4/9] fix readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bc98178..7fd979c 100644 --- a/README.md +++ b/README.md @@ -85,4 +85,6 @@ Builds are automatically generated upon new releases of mesa (checked daily). ### Android -Android arm64 wheels target API 25 and include NIR and IR3 support. NAK and LLVMpipe are not included. +Android arm64-v8a wheels target API 25 and currently ship +`libtinymesa.so` with NIR + IR3/freedreno support. NAK is not included, +and `libtinymesa_cpu.so`/LLVMpipe is not built. From 61109f07eccc77063ee923c0d9ea7260c0a4521e Mon Sep 17 00:00:00 2001 From: Rishav Sanjay Date: Wed, 26 Aug 2026 04:42:38 +0530 Subject: [PATCH 5/9] use ndk --- .github/workflows/compile.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 92346c8..64da1ca 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -127,10 +127,10 @@ jobs: uses: actions/checkout@v4 - name: Setup tinymesa uses: ./.github/actions/setup - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - - name: Install Android NDK - run: sdkmanager "ndk;29.0.14206865" + - name: Verify Android NDK + shell: bash + run: | + test -x "${ANDROID_SDK_ROOT}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android25-clang" - name: Clone mesa run: git clone --depth 1 --branch mesa-25.2.7 https://gitlab.freedesktop.org/mesa/mesa.git ${{ github.workspace }}/mesa - name: Patch mesa From 057d9653b08f5a79646be56398b8d4c48e90e256 Mon Sep 17 00:00:00 2001 From: Rishav Sanjay Date: Wed, 26 Aug 2026 23:00:03 +0530 Subject: [PATCH 6/9] add android.ini --- .github/workflows/compile.yml | 18 ++---------------- android.ini | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 android.ini diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 64da1ca..b8757e4 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -138,23 +138,9 @@ jobs: - name: Build mesa shell: bash run: | - TOOLCHAIN=${ANDROID_SDK_ROOT}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64 - cat > ${{ runner.temp }}/android.ini < Date: Sun, 30 Aug 2026 06:27:54 +0530 Subject: [PATCH 7/9] target Android API 30 --- .github/workflows/compile.yml | 6 +++--- README.md | 17 +++++++++++++++-- android.ini | 4 ++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index b8757e4..ea822ba 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -130,7 +130,7 @@ jobs: - name: Verify Android NDK shell: bash run: | - test -x "${ANDROID_SDK_ROOT}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android25-clang" + test -x "${ANDROID_SDK_ROOT}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang" - name: Clone mesa run: git clone --depth 1 --branch mesa-25.2.7 https://gitlab.freedesktop.org/mesa/mesa.git ${{ github.workspace }}/mesa - name: Patch mesa @@ -140,7 +140,7 @@ jobs: run: | export PATH="${ANDROID_SDK_ROOT}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH" cd ${{ github.workspace }}/mesa - meson setup build/ --cross-file=${{ github.workspace }}/android.ini -Db_staticpic=true -Dplatforms=android -Dplatform-sdk-version=25 -Dandroid-stub=true -Dandroid-libbacktrace=disabled -Dgallium-drivers="[]" -Dvulkan-drivers=freedreno -Dfreedreno-kmds=kgsl -Dllvm=disabled -Dshader-cache=disabled -Dzstd=disabled -Dzlib=disabled -Dopengl=false -Degl=disabled -Dgbm=disabled -Dvideo-codecs="[]" + meson setup build/ --cross-file=${{ github.workspace }}/android.ini -Db_staticpic=true -Dplatforms=android -Dplatform-sdk-version=30 -Dandroid-stub=true -Dandroid-libbacktrace=disabled -Dgallium-drivers="[]" -Dvulkan-drivers=freedreno -Dfreedreno-kmds=kgsl -Dllvm=disabled -Dshader-cache=disabled -Dzstd=disabled -Dzlib=disabled -Dopengl=false -Degl=disabled -Dgbm=disabled -Dvideo-codecs="[]" meson compile -C build tinymesa - name: Build wheel run: | @@ -151,7 +151,7 @@ jobs: fi ./build_wheel.py "${VERSION_ARG[@]}" \ - --platform android_25_arm64_v8a \ + --platform android_30_arm64_v8a \ mesa-25.2.7 ${{ github.workspace }}/mesa/build/src/tinymesa/libtinymesa.so - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 7fd979c..f4d9817 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ libvulkan_lvp.so (interpreter => None) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 + ld-linux-x86-64.so.2 => /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ``` ### tinymesa: ``` @@ -85,6 +86,18 @@ Builds are automatically generated upon new releases of mesa (checked daily). ### Android -Android arm64-v8a wheels target API 25 and currently ship -`libtinymesa.so` with NIR + IR3/freedreno support. NAK is not included, +Android arm64-v8a wheels require Android 11 (API 30) or newer and currently +ship `libtinymesa.so` with NIR + IR3/freedreno support. NAK is not included, and `libtinymesa_cpu.so`/LLVMpipe is not built. + +Termux Python currently advertises an Android API 24 platform tag, so plain +`pip install tinymesa` will reject the API 30 wheel even on newer devices. +Install it explicitly with: + +```sh +python -m pip install \ + --platform android_30_arm64_v8a \ + --only-binary=:all: \ + --target "$(python -c 'import sysconfig; print(sysconfig.get_path("purelib"))')" \ + tinymesa +``` diff --git a/android.ini b/android.ini index 72c79fc..6f5d3b3 100644 --- a/android.ini +++ b/android.ini @@ -1,7 +1,7 @@ [binaries] ar = 'llvm-ar' -c = 'aarch64-linux-android25-clang' -cpp = 'aarch64-linux-android25-clang++' +c = 'aarch64-linux-android30-clang' +cpp = 'aarch64-linux-android30-clang++' strip = 'llvm-strip' [host_machine] From 91d0516218e1cd6fb71f891efef51bd687bc91ff Mon Sep 17 00:00:00 2001 From: Rishav Sanjay Date: Tue, 13 Oct 2026 12:20:52 +0530 Subject: [PATCH 8/9] move workflow Integrate Android into the shared build matrix, publish release assets, use an explicit release tag for installation, and trigger CI for android.ini. --- .github/workflows/compile.yml | 74 +++++++++++++++-------------------- README.md | 21 ++++------ 2 files changed, 38 insertions(+), 57 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index ea822ba..414c32c 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -10,6 +10,7 @@ on: paths: - '.github/**' - 'meson.build' + - 'android.ini' tags: - 'v*' - 'rusticl*' @@ -72,11 +73,13 @@ jobs: tinymesa: name: Build tinymesa ${{ matrix.tag }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os == 'android' && 'ubuntu-22.04' || matrix.os }} + permissions: + contents: write strategy: fail-fast: false matrix: - os: [ ubuntu-22.04, ubuntu-22.04-arm, macos-14 ] + os: [ ubuntu-22.04, ubuntu-22.04-arm, macos-14, android ] tag: [ mesa-25.2.7 ] steps: - name: Checkout repository @@ -88,14 +91,23 @@ jobs: - name: Patch mesa run: ./apply_patches.py ${{ github.workspace }}/mesa ${{ matrix.tag }} - name: Build mesa + if: matrix.os != 'android' shell: bash run: | cd ${{ github.workspace }}/mesa export CLANG_PATH=$(which clang-20) meson setup build/ -Db_staticpic=true -Dgallium-drivers=llvmpipe -Dplatforms="[]" -Dglx=disabled -Dvulkan-drivers=swrast,nouveau,freedreno -Dopengl=false -Degl=disabled -Dgbm=disabled -Dvideo-codecs="[]" meson compile -C build tinymesa tinymesa_cpu + - name: Build mesa (Android) + if: matrix.os == 'android' + shell: bash + run: | + export PATH="$ANDROID_SDK_ROOT/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH" + cd ${{ github.workspace }}/mesa + meson setup build/ --cross-file=../android.ini -Db_staticpic=true -Dplatforms=android -Dplatform-sdk-version=30 -Dandroid-stub=true -Dandroid-libbacktrace=disabled -Dgallium-drivers="[]" -Dvulkan-drivers=freedreno -Dfreedreno-kmds=kgsl -Dllvm=disabled -Dshader-cache=disabled -Dzstd=disabled -Dzlib=disabled -Dopengl=false -Degl=disabled -Dgbm=disabled -Dvideo-codecs="[]" + meson compile -C build tinymesa - name: Polyfill glibc - if: runner.os == 'Linux' + if: runner.os == 'Linux' && matrix.os != 'android' run: | # can't go earlier than 2.32 because of __libc_single_threaded@GLIBC_2.32 polyfill-glibc --target-glibc=2.32 ${{ github.workspace }}/mesa/build/src/tinymesa/libtinymesa*.so @@ -108,9 +120,10 @@ jobs: fi ./build_wheel.py "${VERSION_ARG[@]}" \ - --platform ${{ matrix.os == 'ubuntu-22.04' && 'manylinux_2_32_x86_64' || matrix.os == 'ubuntu-22.04-arm' && 'manylinux_2_32_aarch64' || 'macosx_14_0_arm64' }} \ + --platform ${{ matrix.os == 'android' && 'android_30_arm64_v8a' || matrix.os == 'ubuntu-22.04' && 'manylinux_2_32_x86_64' || matrix.os == 'ubuntu-22.04-arm' && 'manylinux_2_32_aarch64' || 'macosx_14_0_arm64' }} \ ${{ matrix.tag }} ${{ github.workspace }}/mesa/build/src/tinymesa/libtinymesa*${{ runner.os == 'macOS' && '.dylib' || '.so' }} - name: Test loading with ctypes + if: matrix.os != 'android' run: | pip install dist/*.whl python3 -c "from ctypes import CDLL; from tinymesa import libtinymesa, libtinymesa_cpu; CDLL(libtinymesa).glsl_type_singleton_init_or_ref(), CDLL(libtinymesa_cpu).glsl_type_singleton_init_or_ref()" @@ -119,50 +132,25 @@ jobs: with: name: tinymesa-whl-${{ matrix.tag }}-${{ matrix.os }} path: dist/ - android: - name: Build tinymesa mesa-25.2.7 on Android arm64 - runs-on: ubuntu-22.04 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Setup tinymesa - uses: ./.github/actions/setup - - name: Verify Android NDK - shell: bash - run: | - test -x "${ANDROID_SDK_ROOT}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang" - - name: Clone mesa - run: git clone --depth 1 --branch mesa-25.2.7 https://gitlab.freedesktop.org/mesa/mesa.git ${{ github.workspace }}/mesa - - name: Patch mesa - run: ./apply_patches.py ${{ github.workspace }}/mesa mesa-25.2.7 - - name: Build mesa - shell: bash - run: | - export PATH="${ANDROID_SDK_ROOT}/ndk/29.0.14206865/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH" - cd ${{ github.workspace }}/mesa - meson setup build/ --cross-file=${{ github.workspace }}/android.ini -Db_staticpic=true -Dplatforms=android -Dplatform-sdk-version=30 -Dandroid-stub=true -Dandroid-libbacktrace=disabled -Dgallium-drivers="[]" -Dvulkan-drivers=freedreno -Dfreedreno-kmds=kgsl -Dllvm=disabled -Dshader-cache=disabled -Dzstd=disabled -Dzlib=disabled -Dopengl=false -Degl=disabled -Dgbm=disabled -Dvideo-codecs="[]" - meson compile -C build tinymesa - - name: Build wheel - run: | - if [[ "$GITHUB_REF" == refs/tags/v* ]]; then - VERSION_ARG=(--tag "$GITHUB_REF_NAME") - else - VERSION_ARG=(--sha "${GITHUB_SHA::7}") - fi - - ./build_wheel.py "${VERSION_ARG[@]}" \ - --platform android_30_arm64_v8a \ - mesa-25.2.7 ${{ github.workspace }}/mesa/build/src/tinymesa/libtinymesa.so - - name: Upload artifact + - name: Upload Android library + if: matrix.os == 'android' uses: actions/upload-artifact@v4 with: - name: tinymesa-whl-mesa-25.2.7-android-arm64-v8a - path: dist/ - + name: tinymesa-${{ matrix.tag }}-android-arm64-v8a + path: mesa/build/src/tinymesa/libtinymesa.so + - name: Attach Android library to GitHub release + if: matrix.os == 'android' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + env: + GH_TOKEN: ${{ github.token }} + run: | + cp mesa/build/src/tinymesa/libtinymesa.so libtinymesa-${{ matrix.tag }}-android-arm64-v8a.so + gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1 || + gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --generate-notes + gh release upload "$GITHUB_REF_NAME" libtinymesa-${{ matrix.tag }}-android-arm64-v8a.so --clobber release: name: Release tinymesa runs-on: ubuntu-22.04 - needs: [ tinymesa, android ] + needs: tinymesa if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') environment: name: pypi diff --git a/README.md b/README.md index f4d9817..b38b779 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ libvulkan_lvp.so (interpreter => None) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 - ld-linux-x86-64.so.2 => /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 ``` ### tinymesa: ``` @@ -84,20 +83,14 @@ all these symbols, but in addition, a subset of symbols from `gallium` Builds are automatically generated upon new releases of mesa (checked daily). -### Android - -Android arm64-v8a wheels require Android 11 (API 30) or newer and currently -ship `libtinymesa.so` with NIR + IR3/freedreno support. NAK is not included, -and `libtinymesa_cpu.so`/LLVMpipe is not built. +### Android (Termux) -Termux Python currently advertises an Android API 24 platform tag, so plain -`pip install tinymesa` will reject the API 30 wheel even on newer devices. -Install it explicitly with: +On arm64 Termux with Android 11 (API 30) or newer, download `libtinymesa.so` +into Termux's library directory. The Android build includes NIR and +IR3/freedreno, but not NAK or LLVMpipe. ```sh -python -m pip install \ - --platform android_30_arm64_v8a \ - --only-binary=:all: \ - --target "$(python -c 'import sysconfig; print(sysconfig.get_path("purelib"))')" \ - tinymesa +TAG=YOUR_RELEASE_TAG # Choose a published v* release containing this Android asset. +curl -fL "https://github.com/sirhcm/tinymesa/releases/download/${TAG}/libtinymesa-mesa-25.2.7-android-arm64-v8a.so" \ + -o "$PREFIX/lib/libtinymesa.so" ``` From d3420b2e183065351bf445da124ca2655c5a81a5 Mon Sep 17 00:00:00 2001 From: Rishav Sanjay Date: Tue, 13 Oct 2026 13:04:20 +0530 Subject: [PATCH 9/9] release asset --- .github/workflows/compile.yml | 8 ++++---- README.md | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 414c32c..9cf1d4f 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -143,10 +143,10 @@ jobs: env: GH_TOKEN: ${{ github.token }} run: | - cp mesa/build/src/tinymesa/libtinymesa.so libtinymesa-${{ matrix.tag }}-android-arm64-v8a.so - gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1 || - gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --generate-notes - gh release upload "$GITHUB_REF_NAME" libtinymesa-${{ matrix.tag }}-android-arm64-v8a.so --clobber + cp mesa/build/src/tinymesa/libtinymesa.so libtinymesa-android-arm64-v8a.so + gh release view android > /dev/null 2>&1 || + gh release create android --target "$GITHUB_SHA" --title "Android arm64" --notes "Updated on tinymesa version releases." --latest=false + gh release upload android libtinymesa-android-arm64-v8a.so --clobber release: name: Release tinymesa runs-on: ubuntu-22.04 diff --git a/README.md b/README.md index b38b779..160ecca 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,6 @@ into Termux's library directory. The Android build includes NIR and IR3/freedreno, but not NAK or LLVMpipe. ```sh -TAG=YOUR_RELEASE_TAG # Choose a published v* release containing this Android asset. -curl -fL "https://github.com/sirhcm/tinymesa/releases/download/${TAG}/libtinymesa-mesa-25.2.7-android-arm64-v8a.so" \ +curl -fL "https://github.com/sirhcm/tinymesa/releases/download/android/libtinymesa-android-arm64-v8a.so" \ -o "$PREFIX/lib/libtinymesa.so" ```