Skip to content

chore: fixed max flutter version with 3.24.5 when do integration test #1361

chore: fixed max flutter version with 3.24.5 when do integration test

chore: fixed max flutter version with 3.24.5 when do integration test #1361

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: ["3.7.0", "3.24.5"]
runs-on: ubuntu-latest
timeout-minutes: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: "11"
- 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: ["3.7.0", "3.16"]
runs-on: macos-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
- uses: futureware-tech/simulator-action@v1
with:
model: 'iPhone 15'
- run: bash ci/run_flutter_integration_test_ios.sh
- name: Get ios crash logs
if: always()
run: |
sleep 30
mkdir logs-ios
CRASH_DIR="${HOME}/Library/Logs/DiagnosticReports/"
OUTPUT_CRASH_DIR=./logs-ios/crash
mkdir -p ${OUTPUT_CRASH_DIR}
# Copy all files
cp -RP $CRASH_DIR* $OUTPUT_CRASH_DIR
- name: Upload ios logs
uses: actions/upload-artifact@v4
if: always()
with:
name: logs-ios-${{ matrix.version }}
path: logs-ios/*
integration_test_macos:
name: Run Flutter macOS Integration Tests
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ["3.7.0"]
runs-on: macos-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
- 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:
version: ["3.7.0", "3.24.5"]
runs-on: windows-2019
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
- 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.24.5"]
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 220 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 220
version: ["3.7.0", "3.x"]
=======
version: ["3.7.12", "3.24.5"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838
>>>>>>> ed146c16 (chore: fixed max flutter version with 3.24.5 when do integration test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v1
with:
java-version: "11"
- 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: ["3.7.0", "3.x"]
=======
version: ["3.7.12", "3.24.5"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838
>>>>>>> ed146c16 (chore: fixed max flutter version with 3.24.5 when do integration test)
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v1
with:
java-version: '11'
- 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: ["3.7.0"]
runs-on: macos-latest
timeout-minutes: 60
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.24.5"]
runs-on: macos-13
timeout-minutes: 60
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: ["3.7.0", "3.24.5"]
runs-on: ubuntu-latest
timeout-minutes: 60
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: 60
env:
TEST_APP_ID: ${{ secrets.MY_APP_ID }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.5"
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.24.5"]
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}
- uses: futureware-tech/simulator-action@v3
with:
model: 'iPhone 15'
- 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.24.5"]
runs-on: macos-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: 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:
version: ["3.24.5"]
runs-on: windows-2019
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: 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.24.5"]
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