16K page size for android #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: android build scripts | |
| on: | |
| pull_request: | |
| branches: | |
| - development | |
| - main | |
| paths: | |
| - '.github/workflows/android-build-scripts.yml' | |
| - 'android/**' | |
| - '!android/README.md' | |
| - 'scripts/**' | |
| - 'tools/**' | |
| - 'android.sh' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to use for release (e.g., v6.0.2)' | |
| required: true | |
| default: 'v6.0.2' | |
| ndk-version: | |
| description: 'NDK version to use (e.g., r25b)' | |
| required: false | |
| default: 'r25c' | |
| jobs: | |
| build-main-on-linux: | |
| name: android main on linux | |
| runs-on: ubuntu-22.04 | |
| env: | |
| NDK_VERSION: ${{ github.event.inputs.ndk-version || 'r25c' }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up adopt jdk 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'adopt' | |
| java-version: '17' | |
| - name: prerequisites | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y \ | |
| gettext \ | |
| autopoint \ | |
| automake \ | |
| autoconf \ | |
| libtool \ | |
| gperf \ | |
| groff \ | |
| groff-base | |
| ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall "cmake;3.10.2.4988404" "cmake;3.18.1" | |
| - name: set up android ndk | |
| run: | | |
| curl -s "https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux.zip" -o ndk.zip | |
| unzip -q -o ndk.zip -d .ndk | |
| echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV | |
| - name: run the build script | |
| run: | | |
| ./android.sh -d --enable-android-media-codec --enable-android-zlib --disable-arm-v7a-neon \ | |
| --disable-x86 --disable-x86-64 --enable-gpl --enable-x264 --enable-libass --enable-libiconv | |
| - name: print build logs | |
| if: ${{ always() }} | |
| run: cat build.log | |
| - name: Upload build.log as artifact | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-log | |
| path: build.log | |
| - name: print ffbuild logs | |
| if: ${{ failure() }} | |
| run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' | |
| - name: Zip AAR | |
| if: ${{ success() }} | |
| run: | | |
| cd prebuilt/bundle-android-aar | |
| zip -r ffmpeg-kit-android.zip ffmpeg-kit | |
| - name: Create Release | |
| if: ${{ success() && github.event.inputs.tag }} | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.inputs.tag }} | |
| files: | | |
| prebuilt/bundle-android-aar/ffmpeg-kit-android.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload the built binary as artifact | |
| if: ${{ success() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ffmpeg-kit-android.zip | |
| path: prebuilt/bundle-android-aar/ffmpeg-kit-android.zip |