fix lwjgl3 dependencies: add windows-arm64 and remove 32bit (#2882) #71
This file contains hidden or 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 Screenshot Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - v3.7 | |
| - v3.6 | |
| - v3.5 | |
| - v3.4 | |
| - v3.3 | |
| - ios-2024_2 | |
| pull_request: | |
| jobs: | |
| screenshot-test-android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v6.0.2 | |
| - name: Setup the java environment | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Enable KVM | |
| 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: Gradle cache | |
| uses: gradle/actions/setup-gradle@v6.1.0 | |
| - name: AVD cache | |
| uses: actions/cache@v5 | |
| id: avd-cache | |
| with: | |
| path: | | |
| ~/.android/avd/* | |
| ~/.android/adb* | |
| key: avd-35 | |
| - name: Prepare Android test script | |
| run: | | |
| cat > android-test-script.sh << 'EOF' | |
| #!/usr/bin/env bash | |
| curl -L https://maven.google.com/androidx/test/services/test-services/1.6.0/test-services-1.6.0.apk --output test-services-1.6.0.apk | |
| adb install -r -g test-services-1.6.0.apk | |
| exit_code=1 | |
| for attempt in 1 2 3; do | |
| echo "Android screenshot test attempt $attempt of 3" | |
| adb uninstall org.jmonkeyengine.screenshottests.android || true | |
| ./gradlew :jme3-screenshot-tests:jme3-screenshot-tests-android:connectedDebugAndroidTest | |
| exit_code=$? | |
| if [ $exit_code -eq 0 ]; then | |
| break | |
| fi | |
| if [ $attempt -lt 3 ]; then | |
| echo "Attempt $attempt failed, retrying..." | |
| fi | |
| done | |
| mkdir -p logcat | |
| adb logcat -d > logcat/logcat_full.txt || true | |
| adb logcat -d | grep org.jmonkeyengine.screenshottests.android > logcat/logcat.txt || true | |
| mkdir -p report | |
| adb pull /storage/emulated/0/googletest/test_outputfiles/report report/protoReport || true | |
| adb pull /storage/emulated/0/googletest/test_outputfiles/changed-images report/changed-images || true | |
| ./gradlew :jme3-screenshot-tests:jme3-screenshot-tests-proto-report:upgradeProtoReport --args="$(pwd)/report/protoReport $(pwd)/report/extentReport" || true | |
| echo "GRADLE_EXIT_CODE=$exit_code" >> $GITHUB_ENV | |
| exit $exit_code | |
| EOF | |
| chmod +x android-test-script.sh | |
| - name: Run Android Screenshot Test | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 35 | |
| avd-name: test_avd | |
| target: google_apis | |
| arch: x86_64 | |
| force-avd-creation: true | |
| ram-size: 4096M | |
| heap-size: 2048M | |
| profile: pixel_tablet | |
| emulator-options: -no-window -gpu mesa -noaudio -no-boot-anim -camera-back none -no-snapshot -no-snapshot-save -no-snapshot-load | |
| disable-animations: false | |
| script: bash android-test-script.sh | |
| - name: Upload logcat | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: android-logcat | |
| path: logcat | |
| - name: Upload Screenshot | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: android-screenshot-report | |
| path: report | |
| if-no-files-found: error |