Session Overlay Prototype #22
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: Session Overlay Prototype | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/session-overlay-prototype.yml" | |
| - "android/app/build.gradle.kts" | |
| - "android/app/src/main/AndroidManifest.xml" | |
| - "android/app/src/main/kotlin/com/verseles/codewalk/MainActivity.kt" | |
| - "android/app/src/main/kotlin/com/verseles/codewalk/overlay/**" | |
| - "android/app/src/androidTest/kotlin/com/verseles/codewalk/overlay/**" | |
| - "lib/presentation/services/session_attention/**" | |
| - "lib/presentation/widgets/session_attention_overlay/**" | |
| - "test/widget/session_attention_overlay_test.dart" | |
| - "tool/ci/run_session_overlay_instrumentation.sh" | |
| env: | |
| FLUTTER_VERSION: "3.41.5" | |
| jobs: | |
| android-compile: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: gradle | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - run: flutter pub get | |
| - run: flutter build apk --debug | |
| - run: ./android/gradlew -p android app:assembleDebugAndroidTest | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: session-overlay-app-debug | |
| path: build/app/outputs/flutter-apk/app-debug.apk | |
| retention-days: 1 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: session-overlay-test-debug | |
| path: build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk | |
| retention-days: 1 | |
| android-runtime: | |
| needs: android-compile | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| api-level: [34, 35, 36] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: session-overlay-app-debug | |
| path: build/app/outputs/flutter-apk | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: session-overlay-test-debug | |
| path: build/app/outputs/apk/androidTest/debug | |
| - name: Enable KVM group permissions | |
| 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: Prepare runtime diagnostics | |
| run: | | |
| mkdir -p build/session-overlay-test-results | |
| touch build/session-overlay-test-results/emulator-api-${{ matrix.api-level }}.started | |
| - uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ matrix.api-level }} | |
| target: google_apis | |
| arch: x86_64 | |
| profile: pixel_6 | |
| disable-animations: true | |
| emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none | |
| pre-emulator-launch-script: timeout --kill-after=10s 30s adb start-server | |
| script: bash tool/ci/run_session_overlay_instrumentation.sh ${{ matrix.api-level }} | |
| - name: Capture runner failure diagnostics | |
| if: failure() | |
| run: | | |
| results_dir=build/session-overlay-test-results | |
| timeout 15s adb devices -l \ | |
| > "$results_dir/adb-devices-api-${{ matrix.api-level }}.txt" 2>&1 || true | |
| timeout 15s adb logcat -d -v threadtime \ | |
| > "$results_dir/runner-logcat-api-${{ matrix.api-level }}.txt" 2>&1 || true | |
| timeout 15s adb shell dumpsys activity exit-info com.verseles.codewalk \ | |
| > "$results_dir/runner-exit-info-api-${{ matrix.api-level }}.txt" 2>&1 || true | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: session-overlay-runtime-api-${{ matrix.api-level }} | |
| path: build/session-overlay-test-results | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| desktop-compile: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: linux | |
| - os: windows-latest | |
| target: windows | |
| - os: macos-15 | |
| target: macos | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - if: matrix.target == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libayatana-appindicator3-dev libsecret-1-dev | |
| - run: flutter pub get | |
| - if: matrix.target != 'macos' | |
| run: flutter build ${{ matrix.target }} --debug | |
| - if: matrix.target == 'macos' | |
| run: MACOSX_DEPLOYMENT_TARGET=11.0 flutter build macos --debug |