Skip to content

Build Android

Build Android #2

Workflow file for this run

name: Android CI
on:
workflow_dispatch:
inputs:
ndkVersion:
description: 'Android NDK Version (e.g., r23b)'
required: true
default: 'r23b' # Provide a default NDK version
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- .mailmap
- '**.md'
- AUTHORS
- doc/**
- .github/**
- '!.github/workflows/android_ci.yml'
push:
branches:
- main
- v[0-9]+.x-staging
- v[0-9]+.x
paths-ignore:
- .mailmap
- '**.md'
- AUTHORS
- doc/**
- .github/**
- '!.github/workflows/android_ci.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
PYTHON_VERSION: '3.11'
ARCH: 'x86_64'
API_LEVEL: '34'
permissions:
contents: read
jobs:
android-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config unzip g++ make python3-pip
- name: Download Android NDK
run: |
wget https://dl.google.com/android/repository/android-ndk-${{ github.event.inputs.ndkVersion }}-linux.zip
unzip android-ndk-${{ github.event.inputs.ndkVersion }}-linux.zip -d ${{ github.workspace }}
echo "NDK_PATH=${{ github.workspace }}/android-ndk-${{ github.event.inputs.ndkVersion }}" >> $GITHUB_ENV
- name: Configure for Android
run: |
./android-configure $NDK_PATH $API_LEVEL $ARCH
- name: Build
run: make -j8