Force cold-boot emulator and rely on file-path installs #193
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: Test Android build scripts | |
| 'on': | |
| pull_request: | |
| paths: | |
| - 'scripts/**' | |
| - 'BUILDING.md' | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '**/*.md' | |
| jobs: | |
| build-android: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: true | |
| android: false | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: false # Changed to false - might be removing packages | |
| - name: Install System Dependencies | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y xvfb libxrender1 libxtst6 libxi6 xmlstarlet | |
| echo "Verifying xvfb installation:" | |
| ls -la /usr/bin/xvfb-run | |
| which xvfb-run | |
| /usr/bin/xvfb-run --help || true | |
| - name: Additional Cleanup | |
| run: | | |
| sudo rm -rf /usr/local/lib/android/sdk/build-tools/* 2>/dev/null || true | |
| sudo rm -rf /usr/local/lib/android/sdk/platforms/* 2>/dev/null || true | |
| sudo rm -rf /usr/local/lib/android/sdk/platform-tools 2>/dev/null || true | |
| df -h | |
| - name: Setup workspace | |
| run: ./scripts/setup-workspace.sh -q -DskipTests | |
| - name: Build Android port | |
| run: ./scripts/build-android-port.sh -q -DskipTests | |
| - name: Build Hello Codename One Android app | |
| run: ./scripts/build-android-app.sh -q -DskipTests | |
| env: | |
| AVD_CACHE_ROOT: ${{ github.workspace }}/.android-avd | |
| EMULATOR_BOOT_TIMEOUT_SECONDS: 1200 | |
| PACKAGE_SERVICE_TIMEOUT_SECONDS: 1200 | |
| FRAMEWORK_READY_PRIMARY_TIMEOUT_SECONDS: 300 | |
| FRAMEWORK_READY_RESTART_TIMEOUT_SECONDS: 240 | |
| EMULATOR_POST_BOOT_GRACE_SECONDS: 30 | |
| UI_TEST_TIMEOUT_SECONDS: 1200 | |
| - name: Upload UI test artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hello-codenameone-ui-test-artifacts | |
| path: ${{ env.CN1_UI_TEST_ARTIFACT_DIR }} | |
| if-no-files-found: warn |