feat: build with ndk r27b on top of webkitgtk 2.26.4 #118
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: Build jsc-android and test | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🔨 Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: ⬢ Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install coreutils curl git wget python3 ruby gperf -y | |
shell: bash | |
- name: Install Android packages | |
run: | | |
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools | |
yes | sdkmanager --licenses || true | |
sdkmanager \ | |
"cmake;3.22.1" \ | |
"ndk;27.1.12297006" | |
# move out builtin icu headers from ndk and prevent icu build errors | |
mv "${ANDROID_HOME}/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/unicode" "${ANDROID_HOME}/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/unicode2" | |
echo "ANDROID_NDK=$ANDROID_HOME/ndk/27.1.12297006" >> $GITHUB_ENV | |
echo "PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools" >> $GITHUB_ENV | |
shell: bash | |
- name: Build | |
run: | | |
yarn install --frozen-lockfile | |
yarn clean | |
yarn download | |
yarn start | |
shell: bash | |
- name: Archive | |
run: | | |
mkdir -p archive | |
mv dist archive/ | |
mv dist.unstripped archive/ | |
shell: bash | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: archive | |
path: archive | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🧹 Cleanup GitHub Linux runner disk space | |
uses: ./.github/actions/cleanup-linux-disk-space | |
- name: ⬢ Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: 🔨 Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: archive | |
path: archive | |
- name: 🍺 Install Maestro | |
run: | | |
curl -Ls "https://get.maestro.mobile.dev" | bash | |
echo "${HOME}/.maestro/bin" >> $GITHUB_PATH | |
- name: Install node packages | |
run: yarn install --frozen-lockfile | |
working-directory: test | |
- name: ⚙️ Enable KVM for Android virtualization | |
shell: bash | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: Run test | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 24 | |
arch: x86_64 | |
target: google_apis | |
working-directory: test | |
script: | | |
mv ../archive/dist ../dist | |
npx expo run:android --variant release --no-bundler | |
maestro test maestro.yaml |