From 5d127b3baaaab66f09636af737300dbbfb041381 Mon Sep 17 00:00:00 2001 From: izzy2lost Date: Sat, 8 Mar 2025 12:16:05 -0500 Subject: [PATCH] Update build-sm64.yml --- .github/workflows/build-sm64.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-sm64.yml b/.github/workflows/build-sm64.yml index 4e55478..fd4b0ec 100644 --- a/.github/workflows/build-sm64.yml +++ b/.github/workflows/build-sm64.yml @@ -1,4 +1,4 @@ -name: Build APK with Valid Docker Tag +name: Build APK with Headless Emulator on: push: @@ -9,32 +9,33 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - arch: [armv7, arm64] # armv7 uses Houdini; arm64 uses native emulator + arch: [armv7, arm64] steps: - name: Checkout code uses: actions/checkout@v4 - name: Start Android emulator - uses: docker://budtmo/docker-android:emulator_13.0 + uses: docker://budtmo/docker-android:emulator_11.0 with: args: > - -e EMULATOR_DEVICE="Samsung Galaxy S10" # Device from README example - -e EMULATOR_ARGS="-no-window -no-audio -no-boot-anim" + -e EMULATOR_DEVICE="Nexus 5" # Use a simpler device + -e EMULATOR_ARGS="-no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -no-snapshot -partition-size 2048" + -e WEB_VNC=false # Disable web/VNC -e ARCH=${{ matrix.arch }} -v ${{ github.workspace }}:/root/workspace - name: Install Termux and build APK run: | - # Install Termux - curl -L -o termux.apk "https://f-droid.org/repo/com.termux_$(curl -s https://api.github.com/repos/termux/termux-app/releases/latest | grep -oP '"tag_name": "\K[^"]+').apk" - adb install termux.apk + # Wait for emulator to fully boot + adb wait-for-device + while [[ -z $(adb shell getprop sys.boot_completed) ]]; do sleep 5; done - # Run your build script + # Install Termux and run script + adb install termux.apk adb push myscript.sh /data/data/com.termux/files/home/ - adb shell "chmod +x /data/data/com.termux/files/home/myscript.sh" adb shell "cd /data/data/com.termux/files/home && ./myscript.sh" - - name: Upload APK artifact + - name: Upload APK uses: actions/upload-artifact@v4 with: name: sm64coopdx-${{ matrix.arch }}