commit 6d4bbc683cfa341813ce1e4d11333d7253881f42 Author: oSumAtrIX Date: Fri May 20 00:08:47 2022 +0200 Initial commit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..55695e1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,48 @@ +name: Build package aapt + +on: + push: + paths: + - '.github/**' + workflow_dispatch: + inputs: + logLevel: + description: 'Reason' + required: false + default: 'update package' +jobs: + build: + runs-on: ubuntu-latest + env: + ANDROID_HOME: "/opt/termux/android-sdk" + NDK: "/opt/termux/android-ndk" + + strategy: + matrix: + target_arch: [aarch64, arm] + fail-fast: false + steps: + - name: Clone termux-packages repository + run: git clone https://github.com/termux/termux-packages . + + - name: Build aapt package + run: ./scripts/run-docker.sh ./build-package.sh -a ${{ matrix.target_arch }} aapt + + - name: Prepare artifacts + run: | + cd output + + # TODO: silently ignore extracting/overwriting existing files, because it exits with code != 0 + for pkg in *.deb; do dpkg-deb -R $pkg extracted_packages || true; done + + cd extracted_packages/data/data/com.termux/files/usr/ + rm -r include/ share/ lib/pkgconfig/ lib/cmake/ + + # TODO: find a way to exclude deleting the bin directory itself, because it exits with code != 0 + find bin ! -name 'aapt2' -exec rm -f {} + || true + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: aapt-${{ matrix.target_arch }}-${{ github.sha }} + path: output/extracted_packages/data/data/com.termux/files/usr/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ffcaa08 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Aapt2 package build workflow + +[![build workflow](https://github.com/revanced/aapt2/actions/workflows/build.yml/badge.svg)](https://github.com/revanced/aapt2/actions/workflows/build.yml) + +This repository contains a workflow to build the aapt2 package via the [`termux-packages` build system](https://github.com/termux/termux-packages). \ No newline at end of file