Skip to content

*** DO NOT MERGE *** #1130

*** DO NOT MERGE ***

*** DO NOT MERGE *** #1130

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
PYTHON_VERSION: 3.11
MESON_VERSION: 0.64.0
jobs:
android-intel:
runs-on: macos-latest
strategy:
matrix:
arch: [x86, x86_64]
fail-fast: false
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '${{ env.PYTHON_VERSION }}'
- name: Install dependencies
run: |
pip install meson==${{ env.MESON_VERSION }}
.github/env/bootstrap.sh macos-x86_64 android-${{ matrix.arch }}
- name: Build
run: |
export PATH="/tmp/toolchain/bin:$PATH"
meson setup \
--native-file /tmp/native.txt \
--cross-file /tmp/cross.txt \
--default-library static \
-Doptimization=s \
-Dwerror=true \
-Dgumpp=enabled \
-Dgumjs=enabled \
-Dtests=enabled \
build
meson compile -C build
- uses: actions/upload-artifact@v4
with:
name: upload-build
path: build/
- name: AVD cache
uses: actions/cache@v2
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.arch }}
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
arch: ${{ matrix.arch }}
api-level: 27
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Test
uses: reactivecircus/android-emulator-runner@v2
with:
arch: ${{ matrix.arch }}
api-level: 27
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
gtar -C build/tests -czf /tmp/runner.tar.gz gum-tests data/
adb push /tmp/runner.tar.gz /data/local/tmp/
adb shell "su root sh -c 'set -ex; cd /data/local/tmp; tar xf runner.tar.gz; TMPDIR=/data/local/tmp ./gum-tests'"