From a4261f51abb7639a67a0f40f82d6513b87f60c07 Mon Sep 17 00:00:00 2001 From: littleGnAl Date: Fri, 9 Aug 2024 18:26:43 +0800 Subject: [PATCH] First commit for RTM 2.x --- .github/workflows/build.yml | 64 ++++++++++++------------- scripts/artifacts_version.sh | 2 +- scripts/dart_pub_publish_check.sh | 20 ++++++++ scripts/run_flutter_integration_test.sh | 2 + 4 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 scripts/dart_pub_publish_check.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e4f7fe..2ae03ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ on: required: true jobs: - flutter_codestyle_check: + pub_publish_check: name: Flutter codestyle/analyze check if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} runs-on: ubuntu-latest @@ -21,7 +21,7 @@ jobs: with: channel: 'stable' - name: Check Dart Format - run: bash ci/dart_pub_publish_check.sh + run: bash scripts/dart_pub_publish_check.sh - uses: axel-op/dart-package-analyzer@v3 id: analysis with: @@ -37,35 +37,35 @@ jobs: 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 + # 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 - 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 + # 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"] + version: ["3.0.0", "3.24.0"] runs-on: ubuntu-latest timeout-minutes: 120 env: @@ -92,14 +92,14 @@ jobs: ram-size: 2048M heap-size: 4096M disk-size: 8192M - script: bash ci/run_flutter_integration_test_android.sh + script: bash scripts/run_flutter_integration_test.sh "android" 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.16"] + version: ["3.0.0", "3.16"] runs-on: macos-12 timeout-minutes: 120 env: @@ -113,7 +113,7 @@ jobs: - uses: futureware-tech/simulator-action@v3 with: model: 'iPhone 14 Pro Max' - - run: bash ci/run_flutter_integration_test_ios.sh + - run: bash scripts/run_flutter_integration_test.sh "ios" - name: Get ios crash logs if: always() run: | @@ -140,7 +140,7 @@ jobs: # if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} # strategy: # matrix: - # version: ["2.10.5", "3.x"] + # version: ["3.0.0", "3.24.0"] # runs-on: macos-12 # timeout-minutes: 120 # env: @@ -185,7 +185,7 @@ jobs: # if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} # strategy: # matrix: - # version: ["2.10.5", "3.x"] + # version: ["3.0.0", "3.24.0"] # runs-on: windows-2019 # timeout-minutes: 120 # env: @@ -239,7 +239,7 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: matrix: - version: ["2.10.5", "3.x"] + version: ["3.0.0", "3.24.0"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -259,7 +259,7 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: matrix: - version: ["2.10.5", "3.x"] + version: ["3.0.0", "3.24.0"] runs-on: windows-2019 steps: - uses: actions/checkout@v3 @@ -280,7 +280,7 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: matrix: - version: ["2.10.5", "3.x"] + version: ["3.0.0", "3.24.0"] runs-on: macos-12 timeout-minutes: 120 steps: diff --git a/scripts/artifacts_version.sh b/scripts/artifacts_version.sh index 828b9bf..b291dfd 100644 --- a/scripts/artifacts_version.sh +++ b/scripts/artifacts_version.sh @@ -1,6 +1,6 @@ set -e export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_2.2.1-dev.4_RTM_Android_Video_20240808_0551_578.zip" -export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.3.2-build.1_DCG_iOS_Video_20240604_0459_409.zip" +export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_2.2.1-dev.4_RTM_iOS_Video_20240808_0551_479.zip" export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.3.2-build.1_DCG_Mac_Video_20240604_0500_404.zip" export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.3.2-build.1_DCG_Windows_Video_20240604_0456_441.zip" diff --git a/scripts/dart_pub_publish_check.sh b/scripts/dart_pub_publish_check.sh new file mode 100644 index 0000000..e410065 --- /dev/null +++ b/scripts/dart_pub_publish_check.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# The log of `dart pub publish`` will be written into `${PUB_CACHE}/log/pub_log.txt` +dart pub publish --dry-run --verbose + +if [[ ! -f "${PUB_CACHE}/log/pub_log.txt" ]]; then + echo "The ${PUB_CACHE}/log/pub_log.txt is not exist." + exit 1 +fi + +RET=$(grep 'ERR' ${PUB_CACHE}/log/pub_log.txt) + +if [[ ! -z $RET ]]; then + echo "\n" + echo "=================================== ERR =============================================" + echo "There are some ERR when run the \`dart pub publish --dry-run\`, please check the log." + exit 1 +fi + +exit 0 \ No newline at end of file diff --git a/scripts/run_flutter_integration_test.sh b/scripts/run_flutter_integration_test.sh index 6f4b342..a3db720 100644 --- a/scripts/run_flutter_integration_test.sh +++ b/scripts/run_flutter_integration_test.sh @@ -46,6 +46,8 @@ elif [[ ${PLATFORM} == "android" || ${PLATFORM} == "ios" ]];then flutter packages get + flutter test + flutter test integration_test/binding_apis_call_fake_test.dart --dart-define=TEST_APP_ID="${TEST_APP_ID}" --verbose popd