Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade native sdk 4.2.2.142 #1817

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/code-gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Code gen

on:
workflow_dispatch:
inputs:
target_branch:
description: The branch to run code-gen
type: string
required: true
default: 'main'

version:
description: 'The version of native sdk in terra-script'
required: false
type: string
default: ''

jobs:
run_code_gen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.target_branch }}
fetch-depth: 0
- name: enable corepack
run: corepack enable
- name: set node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Reconfigure git to use HTTP authentication
run: |
git config --global url."https://${{ secrets.GH_TOKEN }}@github.com/".insteadOf ssh://[email protected]/
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0.6" # Need ping version to 15.x
directory: ${{ runner.temp }}/llvm
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Run code-gen
run: |
bash scripts/code_gen.sh ${{ inputs.version }}

- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> "$GITHUB_OUTPUT"

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Auto generate codes for native sdk version ${{ inputs.version }}"
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: auto-code-gen-${{ steps.date.outputs.date }}
base: ${{ inputs.target_branch }}
delete-branch: true
title: "Auto generate codes for native sdk ${{ inputs.version }}"
body: |
Auto generate codes for native sdk version ${{ inputs.version }}

*This pull request is opened by bot*
labels: |
ci:skip
reviewers: |
littleGnAl
2 changes: 1 addition & 1 deletion internal/deps_summary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Iris:
https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_Android_Video_20240509_1139.zip
https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_iOS_Video_20240509_1139.zip
https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_Mac_Video_20240509_1139.zip
https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_Windows_Video_20240509_1139.zip
https://download.agora.io/sdk/release/iris_4.2.2.142-build.1_DCG_Windows_Video_20240329_1152.zip
implementation 'io.agora.rtc:iris-rtc:4.2.6.10-build.1'
pod 'AgoraIrisRTC_iOS', '4.2.6.10-build.1'
pod 'AgoraIrisRTC_macOS', '4.2.6.10-build.1'
Expand Down
4 changes: 4 additions & 0 deletions lib/src/impl/json_converters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Object? readIntPtr(Map json, String key) {
final value = json[newKey];
assert(value is String);
returnValue = _intPtrStr2Int(value);
} else {
returnValue = json[key];
}

return returnValue;
Expand All @@ -88,6 +90,8 @@ Object? readIntPtrList(Map json, String key) {
final value = json[newKey];
assert(value is List);
returnValue = List.from(value.map((e) => _intPtrStr2Int(e)));
} else {
returnValue = json[key];
}

return returnValue;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: agora_rtc_engine
description: >-
Flutter plugin of Agora RTC SDK, allow you to simply integrate Agora Video
Calling or Live Video Streaming to your app with just a few lines of code.
version: 6.2.6-sp.42612
version: 6.2.6-sp.422142
homepage: https://www.agora.io
repository: https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/tree/main
environment:
Expand Down
2 changes: 1 addition & 1 deletion scripts/artifacts_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -e
export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_Android_Video_20240509_1139.zip"
export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_iOS_Video_20240509_1139.zip"
export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_Mac_Video_20240509_1139.zip"
export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_Windows_Video_20240509_1139.zip"
export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.2.2.142-build.1_DCG_Windows_Video_20240329_1152.zip"
4 changes: 2 additions & 2 deletions scripts/code_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
set -e
set -x

TERRA_PATH=$1
RTC_VERSION=$1
MY_PATH=$(realpath $(dirname "$0"))
PROJECT_ROOT=$(realpath ${MY_PATH}/..)

pushd ${PROJECT_ROOT}

flutter packages get
bash ${PROJECT_ROOT}/tool/terra/build.sh ${TERRA_PATH}
bash ${PROJECT_ROOT}/tool/terra/build.sh ${RTC_VERSION}
bash ${MY_PATH}/flutter-build-runner.sh
bash ${PROJECT_ROOT}/tool/testcase_gen/build.sh

Expand Down
19 changes: 17 additions & 2 deletions tool/terra/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,31 @@
set -e
set -x

NEW_VERSION=$1
MY_PATH=$(realpath $(dirname "$0"))
PROJECT_ROOT=$(realpath ${MY_PATH}/../..)

TERRA_MAIN_FILE=${PROJECT_ROOT}/tool/terra/terra_config_main.yaml

if [ -n "$NEW_VERSION" ]; then
# Check the operating system type
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS
sed -i '' -E "s/rtc_[0-9]+\.[0-9]+(\.[0-9]+)*/${NEW_VERSION}/g" $TERRA_MAIN_FILE
else
# Linux and other Unix-like systems
sed -i -E "s/rtc_[0-9]+\.[0-9]+(\.[0-9]+)*/${NEW_VERSION}/g" $TERRA_MAIN_FILE
fi
echo "Updated version to ${NEW_VERSION} in $TERRA_MAIN_FILE"
fi

bash ${MY_PATH}/prepare.sh

pushd ${MY_PATH}

npm exec terra -- run \
--config ${PROJECT_ROOT}/tool/terra/terra_config_main.yaml \
--output-dir=${PROJECT_ROOT}/
--config ${TERRA_MAIN_FILE} \
--output-dir=${PROJECT_ROOT}

popd

Expand Down
4 changes: 2 additions & 2 deletions windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ project(${PROJECT_NAME} LANGUAGES CXX)
# not be changed
set(PLUGIN_NAME "agora_rtc_engine_plugin")

set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.2.6.10-build.1_DCG_Windows_Video_20240509_1139.zip")
set(IRIS_SDK_DOWNLOAD_NAME "iris_4.2.6.10-build.1_DCG_Windows")
set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.2.2.142-build.1_DCG_Windows_Video_20240329_1152.zip")
set(IRIS_SDK_DOWNLOAD_NAME "iris_4.2.2.142-build.1_DCG_Windows")
set(RTC_SDK_DOWNLOAD_NAME "Agora_Native_SDK_for_Windows_FULL")
set(IRIS_SDK_VERSION "v3_6_2_fix.1")

Expand Down
Loading