Merge pull request #136 from paulocoutinhox/chromium/6694 #354
This file contains 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 | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- 'extras/images/**' | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { name: "Ubuntu", os: "ubuntu-20.04", target: "android" } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install System Packages | |
run: | | |
sudo apt-get -y update && \ | |
sudo apt-get remove -y php7.4-common && \ | |
sudo rm -rf /var/lib/apt/lists/* && \ | |
sudo apt-get clean | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Upgrade PIP | |
run: python3 -m pip install --upgrade pip setuptools wheel | |
- name: Install CMake | |
uses: jwlawson/actions-setup-cmake@v2 | |
with: | |
cmake-version: "3.24.0" | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
with: | |
version: "1.10.0" | |
- name: Install NDK | |
uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r25c | |
add-to-path: true | |
- name: Verify | |
run: | | |
python3 --version | |
cmake --version | |
ninja --version | |
ndk-build -version | |
- name: Python requirements | |
run: python3 -m pip install -r requirements.txt --user | |
- name: Depot tools | |
run: python3 make.py build-depot-tools | |
- name: Environment | |
run: echo "$PWD/build/depot-tools" >> $GITHUB_PATH | |
- name: PDFium | |
run: python3 make.py build-pdfium-${{ matrix.config.target }} | |
- name: Patch | |
run: python3 make.py patch-${{ matrix.config.target }} | |
- name: Patch - Check | |
run: python3 make.py patch-${{ matrix.config.target }} | |
- name: Build | |
run: python3 make.py build-${{ matrix.config.target }} | |
- name: Install | |
run: python3 make.py install-${{ matrix.config.target }} | |
- name: Test | |
run: python3 make.py test-${{ matrix.config.target }} | |
- name: Archive | |
run: python3 make.py archive-${{ matrix.config.target }} | |
- name: Save | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-${{ matrix.config.target }} | |
path: ${{ matrix.config.target }}.tgz | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Load | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifact-android | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload release asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: android.tgz | |
asset_name: android.tgz | |
asset_content_type: application/tar+gzip |