From fd15755275e9fa0c4623ad9c591d7a452659ad7f Mon Sep 17 00:00:00 2001 From: Littlegnal <8847263+littleGnAl@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:43:32 +0800 Subject: [PATCH] [ci] Run android integration test and rendering test on ubuntu (#1689) After hardware accelerated support on Ubuntu, we can move the integration test and rendering test to Ubuntu to save the test times. https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/ --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9049d418c..1e309680d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,7 +86,7 @@ jobs: strategy: matrix: version: ["2.10.5", "3.x"] - runs-on: macos-12 + runs-on: ubuntu-latest timeout-minutes: 120 env: TEST_APP_ID: ${{ secrets.MY_APP_ID }} @@ -98,7 +98,11 @@ jobs: - uses: subosito/flutter-action@v2 with: flutter-version: ${{ matrix.version }} - - run: flutter config --enable-macos-desktop + - 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: run flutter android integration tests uses: reactivecircus/android-emulator-runner@v2 with: @@ -233,7 +237,6 @@ jobs: build_android_ubuntu: name: Build Android on Ubuntu if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - needs: flutter_codestyle_check strategy: matrix: version: ["2.10.5", "3.x"] @@ -336,11 +339,10 @@ jobs: run: flutter build web working-directory: example - # Run android rendering test in macos is more stable rendering_test_android: name: Run Flutter Android Rendering Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - runs-on: macos-12 + runs-on: ubuntu-latest timeout-minutes: 120 env: TEST_APP_ID: ${{ secrets.MY_APP_ID }} @@ -378,7 +380,11 @@ jobs: --flutter-package-name=agora_rtc_engine \ --iris-android-cdn-url=${IRIS_CDN_URL_ANDROID} \ --iris-macos-cdn-url=${IRIS_CDN_URL_MACOS} - - run: flutter config --enable-macos-desktop + - 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: run flutter android integration tests uses: reactivecircus/android-emulator-runner@v2 with: