feat: add java 11 #33
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: CI | |
on: [push, workflow_dispatch] | |
jobs: | |
flutter_job: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
api-level: [31] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.3' | |
channel: 'stable' | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2 | |
- name: Install Maestro | |
run: | | |
curl -Ls "https://get.maestro.mobile.dev" | bash | |
export PATH="$PATH":"$HOME/.maestro/bin" | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.api-level }} | |
- name: Run setup script | |
run: ./setup_flutter_as_app.sh | |
- name: Create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
target: android-tv | |
profile: tv_1080p | |
arch: x86 | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
avd-name: macos-ci-avd | |
script: echo "Generated AVD snapshot for caching." | |
- name: Run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
target: android-tv | |
arch: x86 | |
profile: tv_1080p | |
force-avd-creation: false | |
avd-name: macos-ci-avd | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./install_app_flutter_job.sh | |
android_native_job: | |
needs: flutter_job | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
api-level: [31] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Run setup script | |
run: ./setup_flutter_as_app.sh | |
- name: Build Android App | |
run: | | |
cd ./android_native_app | |
./gradlew assembleRelease | |
- name: Run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
target: android-tv | |
arch: x86 | |
profile: tv_1080p | |
force-avd-creation: false | |
avd-name: macos-ci-avd | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true |