Skip to content

[example][android] Bump AGP 8.7 and Gradle 8.10 (#2049) #1360

[example][android] Bump AGP 8.7 and Gradle 8.10 (#2049)

[example][android] Bump AGP 8.7 and Gradle 8.10 (#2049) #1360

Workflow file for this run

name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_call:
secrets:
MY_APP_ID:
required: true
jobs:
flutter_codestyle_check:
name: Flutter codestyle/analyze check
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Check Dart Format
run: bash ci/dart_pub_publish_check.sh
- uses: axel-op/dart-package-analyzer@v3
id: analysis
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check scores
env:
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 120 ))
then
echo Pub Score too low.
exit 1
fi
flutter_ut:
name: Flutter unit test
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter test
attach_docs:
name: Attach dartdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Build DartDoc 📖
run: |
dart pub get
# Generate DartDoc
dart doc
# Create a zip file of the DartDoc output
zip -r agora_rtc_engine_docs.zip doc
- name: Upload DartDoc Artifact ⬆️
uses: actions/upload-artifact@v3
with:
name: agora_rtc_engine_docs.zip
path: agora_rtc_engine_docs.zip
pub_publish_check:
name: pub publish check
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- run: bash ci/dart_pub_publish_check.sh
integration_test_android:
name: Run Flutter Android Integration Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ["2.10.5", "3.x"]
runs-on: macos-12
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
- run: flutter config --enable-macos-desktop
- name: run flutter android integration tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
arch: x86_64
profile: pixel_5
ram-size: 2048M
heap-size: 4096M
disk-size: 8192M
script: bash ci/run_flutter_integration_test_android.sh
integration_test_ios:
name: Run Flutter iOS Integration Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ["2.10.5", "3.x"]
runs-on: macos-12
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- uses: futureware-tech/simulator-action@v1
with:
model: 'iPhone 13 Pro Max'
- run: bash ci/run_flutter_integration_test_ios.sh
integration_test_macos:
name: Run Flutter macOS Integration Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ["2.10.5", "3.x"]
runs-on: macos-12
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: flutter config --enable-macos-desktop
- run: bash ci/run_flutter_macos_integration_test.sh
integration_test_windows:
name: Run Flutter Windows Integration Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
# Pin Flutter SDK version to 3.19, since there's issue with 3.22.x, see https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/actions/runs/9186647960/job/25262717666
version: ["2.10.5", "3.19"]
runs-on: windows-2019
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: flutter config --enable-windows-desktop
- name: Run windows integration test
shell: bash
run: |
bash ci/run_flutter_windows_integration_test.sh
integration_test_web:
name: Run Flutter Web Integration Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ['3.x']
runs-on: ubuntu-latest
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- name: Run web integration test
shell: bash
run: |
chromedriver --port=4444 --trace-buffer-size=100000 &
bash ci/run_flutter_integration_test.sh web
build_android_ubuntu:
name: Build Android on Ubuntu
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
needs: flutter_codestyle_check
strategy:
matrix:
<<<<<<< HEAD

Check failure on line 206 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 206
version: ["2.10.5", "3.x"]
=======
version: ["3.7.12", "3.x"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838
>>>>>>> f4ffd347 ([example][android] Bump AGP 8.7 and Gradle 8.10 (#2049))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
- run: flutter pub get
- name: Run flutter build apk
run: flutter build apk
working-directory: example
build_android_windows:
name: Build Android on Windows
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
<<<<<<< HEAD
version: ["2.10.5", "3.x"]
=======
version: ["3.7.12", "3.x"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838
>>>>>>> f4ffd347 ([example][android] Bump AGP 8.7 and Gradle 8.10 (#2049))
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: flutter pub get
- name: Run flutter build apk
run: flutter build apk
working-directory: example
build_ios:
name: Build iOS
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ["2.10.5", "3.x"]
runs-on: macos-12
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: flutter pub get
- name: Run flutter build ios --no-codesign
run: flutter build ios --no-codesign
working-directory: example
# This job aim to cover https://github.com/flutter/flutter/issues/135739
build_ios_xcode_15:
name: Build iOS with xcode 15.x
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ['3.x']
runs-on: macos-13
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: | # https://github.com/actions/runner-images/issues/6746#issuecomment-1380042553
# set xcode version to use for build
sudo xcode-select -switch /Applications/Xcode_15.0.1.app
# Print used xCode version
xcode-select -print-path
xcodebuild -version
- run: flutter pub get
- name: Run flutter build ios --no-codesign
run: flutter build ios --no-codesign
working-directory: example
build_web:
name: Build Web
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ["2.10.5", "3.x"]
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: flutter packages get
- name: Run flutter build web
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
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
cache: true
- name: Checkout hoe
uses: actions/checkout@v3
with:
repository: littleGnAl/hoe
ref: littlegnal/update
path: hoe
- name: Download iris artifacts
if: ${{ contains(github.event.pull_request.labels.*.name, 'integration_test:iris_artifacts') }}
run: |
source scripts/artifacts_version.sh
PROJECT_DIR=$(pwd)
mkdir -p output
cd hoe
dart pub get
dart run bin/hoe.dart build-agora-flutter-example \
--setup-local-dev \
--project-dir=${PROJECT_DIR} \
--artifacts-output-dir=${PROJECT_DIR}/output \
--platforms=android,macos \
--apple-package-name=io.agora.agoraRtcEngineExample \
--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: run flutter android integration tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
arch: x86_64
profile: pixel_5
ram-size: 2048M
heap-size: 4096M
disk-size: 8192M
script: bash ci/rendering_test_android.sh
rendering_test_ios:
name: Run Flutter iOS Rendering Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ["3.x"]
runs-on: macos-13 # Rendering test on ios simulator need macos 13+
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
- name: Checkout hoe
uses: actions/checkout@v3
with:
repository: littleGnAl/hoe
ref: littlegnal/update
path: hoe
- name: Download iris artifacts
if: ${{ contains(github.event.pull_request.labels.*.name, 'integration_test:iris_artifacts') }}
run: |
source scripts/artifacts_version.sh
PROJECT_DIR=$(pwd)
mkdir -p output
cd hoe
dart pub get
dart run bin/hoe.dart build-agora-flutter-example \
--setup-local-dev \
--project-dir=${PROJECT_DIR} \
--artifacts-output-dir=${PROJECT_DIR}/output \
--platforms=ios \
--apple-package-name=io.agora.agoraRtcEngineExample \
--flutter-package-name=agora_rtc_engine \
--iris-ios-cdn-url=${IRIS_CDN_URL_IOS}
- name: Create ios simulator
run: |
xcrun simctl list
# We generate the screenshots base on the simulator "iPhone 13 Pro Max", so we set the SimDeviceType to iPhone 13 Pro Max.
# If you need to change the SimDeviceType, you may need to re-generate the screenshots first.
xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-13-Pro-Max com.apple.CoreSimulator.SimRuntime.iOS-16-4 | xargs xcrun simctl boot
- run: bash ci/rendering_test_ios.sh
rendering_test_macos:
name: Run Flutter macOS Rendering Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ['3.x']
runs-on: macos-12
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- name: Checkout hoe
uses: actions/checkout@v3
with:
repository: littleGnAl/hoe
ref: littlegnal/update
path: hoe
- name: Download iris artifacts
if: ${{ contains(github.event.pull_request.labels.*.name, 'integration_test:iris_artifacts') }}
run: |
source scripts/artifacts_version.sh
PROJECT_DIR=$(pwd)
echo "project dir: ${PROJECT_DIR}"
ls ${PROJECT_DIR}
mkdir -p output
cd hoe
dart pub get
dart run bin/hoe.dart build-agora-flutter-example \
--setup-local-dev \
--project-dir=${PROJECT_DIR} \
--artifacts-output-dir=${PROJECT_DIR}/output \
--platforms=macos \
--apple-package-name=io.agora.agoraRtcEngineExample \
--flutter-package-name=agora_rtc_engine \
--iris-macos-cdn-url=${IRIS_CDN_URL_MACOS}
- run: flutter config --enable-macos-desktop
- run: bash ci/rendering_test_macos.sh
rendering_test_windows:
name: Run Flutter Windows Rendering Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
# Pin Flutter SDK version to 3.19, since there's issue with 3.22.x, see https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/actions/runs/9186647960/job/25262717666
version: ['3.19']
runs-on: windows-2019
timeout-minutes: 120
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- name: Checkout hoe
uses: actions/checkout@v3
with:
repository: littleGnAl/hoe
ref: littlegnal/update
path: hoe
- name: Download iris artifacts
if: ${{ contains(github.event.pull_request.labels.*.name, 'integration_test:iris_artifacts') }}
shell: bash
run: |
source scripts/artifacts_version.sh
PROJECT_DIR=$(pwd)
mkdir -p output
cd hoe
dart pub get
dart run bin/hoe.dart build-agora-flutter-example \
--setup-local-dev \
--project-dir=${PROJECT_DIR} \
--artifacts-output-dir=${PROJECT_DIR}/output \
--platforms=windows \
--apple-package-name=io.agora.agoraRtcEngineExample \
--flutter-package-name=agora_rtc_engine \
--iris-windows-cdn-url=${IRIS_CDN_URL_WINDOWS}
- run: flutter config --enable-windows-desktop
- name: Run windows integration test
shell: bash
run: |
bash ci/rendering_test_windows.sh
rendering_test_web:
name: Run Flutter Web Rendering Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ['3.x']
runs-on: ubuntu-latest
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- name: Run web rendering test
shell: bash
run: |
export SAVE_DEBUG_GOLDEN="true"
chromedriver --port=4444 --trace-buffer-size=100000 &
bash ci/run_rendering_test.sh web
- uses: actions/upload-artifact@v3
if: failure()
with:
name: debug-golden-files
path: test_shard/rendering_test/screenshot/*.debug.png
check_android15_16k_page_alignment:
name: Check android15 16k page size alignment
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ['3.x']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: flutter pub get
- name: Run flutter build apk
run: flutter build apk
working-directory: example
- name: Check android15 16k page size alignment
run: bash scripts/check_android15_16k_page_alignment.sh example/build/app/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib/arm64-v8a/libiris_rendering_android.so