Skip to content

Commit

Permalink
feat: support 4.2.3 (#705)
Browse files Browse the repository at this point in the history
* feat: support 4.2.3

* chore: wip

* [AUTO] Generate comments by iris-doc (#703)

Co-authored-by: LichKing-2234 <LichKing-2234@users.noreply.github.com>

* [AUTO] Generate code by terra (#704)

Co-authored-by: LichKing-2234 <LichKing-2234@users.noreply.github.com>

* fix: initMusicContentCenter NMS-15609

* fix: add listenUserJoinOrLeave NMS-15612

* fix: d3d11_texture_2d NMS-15590

* fix: play before preload NMS-15609

* fix: fix: setState prev issue

* chore: update native

* [AUTO] Generate comments by iris-doc (#706)

Co-authored-by: Nero-Hu <Nero-Hu@users.noreply.github.com>

* [AUTO] Generate code by terra (#709)

Co-authored-by: LichKing-2234 <LichKing-2234@users.noreply.github.com>

* [AUTO] Generate comments by iris-doc (#711)

Co-authored-by: Nero-Hu <Nero-Hu@users.noreply.github.com>

* build: upgrade to 0.72.5 #708

* [WIP]

* [WIP]

* build: fix `AgoraRtcNgExample`

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* [WIP]

* chore: wip

* chore: wip

* chore:  test

* chore: test

* chore: wip

* chore: wip

---------

Co-authored-by: LichKing-2234 <LichKing-2234@users.noreply.github.com>
Co-authored-by: Nero-Hu <Nero-Hu@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 17, 2023
1 parent 6a3211c commit 416bcfa
Show file tree
Hide file tree
Showing 74 changed files with 19,444 additions and 17,927 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"extends": [
"@react-native-community",
"@react-native",
"prettier"
],
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
*.bat text eol=crlf
27 changes: 15 additions & 12 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,39 @@ fi
call_lefthook()
{
dir="$(git rev-parse --show-toplevel)"
osArch=$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')
cpuArch=$(echo "$(uname -m)" | sed 's/aarch64/arm64/')
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/')

if lefthook -h >/dev/null 2>&1
then
eval lefthook $@
lefthook "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
eval "\"$dir/node_modules/lefthook/bin/index.js\" $@"
"$dir/node_modules/lefthook/bin/index.js" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
eval "\"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
eval "\"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook $@
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook $@
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook $@
elif npx @evilmartians/lefthook -h >/dev/null 2>&1
pnpm lefthook "$@"
elif command -v npx >/dev/null 2>&1
then
npx @evilmartians/lefthook $@
npx @evilmartians/lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
}

call_lefthook "run commit-msg $@"
call_lefthook run "commit-msg" "$@"
27 changes: 15 additions & 12 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,39 @@ fi
call_lefthook()
{
dir="$(git rev-parse --show-toplevel)"
osArch=$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')
cpuArch=$(echo "$(uname -m)" | sed 's/aarch64/arm64/')
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/')

if lefthook -h >/dev/null 2>&1
then
eval lefthook $@
lefthook "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
eval "\"$dir/node_modules/lefthook/bin/index.js\" $@"
"$dir/node_modules/lefthook/bin/index.js" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
eval "\"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
eval "\"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook $@
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook $@
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook $@
elif npx @evilmartians/lefthook -h >/dev/null 2>&1
pnpm lefthook "$@"
elif command -v npx >/dev/null 2>&1
then
npx @evilmartians/lefthook $@
npx @evilmartians/lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
}

call_lefthook "run pre-commit $@"
call_lefthook run "pre-commit" "$@"
27 changes: 15 additions & 12 deletions .githooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,39 @@ fi
call_lefthook()
{
dir="$(git rev-parse --show-toplevel)"
osArch=$(echo "$(uname)" | tr '[:upper:]' '[:lower:]')
cpuArch=$(echo "$(uname -m)" | sed 's/aarch64/arm64/')
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/')

if lefthook -h >/dev/null 2>&1
then
eval lefthook $@
lefthook "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
eval "\"$dir/node_modules/lefthook/bin/index.js\" $@"
"$dir/node_modules/lefthook/bin/index.js" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
eval "\"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook"
then
eval "\"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook\" $@"
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook" "$@"
elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook $@
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook $@
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook $@
elif npx @evilmartians/lefthook -h >/dev/null 2>&1
pnpm lefthook "$@"
elif command -v npx >/dev/null 2>&1
then
npx @evilmartians/lefthook $@
npx @evilmartians/lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
}

call_lefthook "run prepare-commit-msg $@"
call_lefthook run "prepare-commit-msg" "$@"
13 changes: 8 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ runs:
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-ng-${{ hashFiles('**/yarn.lock') }}
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-ng-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-ng
${{ runner.os }}-yarn-ng-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-ng-
- name: Install dependencies
run: |
yarn install --frozen-lockfile
yarn patch-package
env:
POD_INSTALL: 0
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash
135 changes: 96 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,128 @@ on:
jobs:
build-android:
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
turbo_cache_hit: 0
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- name: SetupExample
- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-
- name: Check turborepo cache for Android
run: |
yarn example install --frozen-lockfile
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- name: Install JDK
if: env.turbo_cache_hit != 1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'

- name: Finalize Android SDK
if: env.turbo_cache_hit != 1
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-false-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-false-
- name: Modify APP ID
run: |
sed "s/localAppId = '\(.*\)'/localAppId = '${{ secrets.APP_ID }}'/g" agora.config.ts > tmp
mv tmp agora.config.ts
working-directory: example/src/config

- name: Gradle build
- name: Build example for Android
run: |
./gradlew :app:assembleRelease
working-directory: example/android

- uses: actions/upload-artifact@v3
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: AgoraRtcNgExample
path: |
example/android/app/build/outputs/apk/release/*.apk
build-ios:
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios
turbo_cache_hit: 0
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Setup
uses: ./.github/actions/setup

- uses: actions/cache@v3
- name: Setup cocoapods
run: |
gem install cocoapods -v 1.13.0
gem install activesupport -v 7.0.8
- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: |
**/Pods
key: ${{ runner.os }}-pods-ng-${{ hashFiles('**/Podfile.lock') }}
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-pods-ng
${{ runner.os }}-turborepo-ios-
- name: Check turborepo cache for iOS
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi
- uses: hendrikmuhs/ccache-action@v1.2
- name: Cache cocoapods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
max-size: 1024M
key: ${{ runner.os }}-ccache-ng
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-0-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-ccache-ng
${{ runner.os }}-cocoapods-0-
- name: SetupExample
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
yarn example install --frozen-lockfile
yarn example pods
yarn pod-install example/ios
- name: Upload Podfile.lock & Manifest.lock
uses: actions/upload-artifact@v3
with:
name: lock
path: |
example/ios/Podfile.lock
example/ios/Pods/Manifest.lock
- name: Modify APP ID
run: |
Expand Down Expand Up @@ -96,30 +164,19 @@ jobs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Fastlane build
env:
CC: clang
CXX: clang++
CLANG: clang
CLANGPLUSPLUS: clang++
LD: clang
LDPLUSPLUS: clang++
CCACHE_SLOPPINESS: clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
CCACHE_FILECLONE: true
CCACHE_DEPEND: true
CCACHE_INODECACHE: true
- name: Build example for iOS
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
fastlane gym --export_method "development" --export_options "{\"compileBitcode\":false}"
working-directory: example/ios

- uses: actions/upload-artifact@v3
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
- name: Upload IPA
uses: actions/upload-artifact@v3
with:
name: AgoraRtcNgExample
path: |
example/ios/*.ipa
- uses: actions/upload-artifact@v3
- name: Upload dSYM
uses: actions/upload-artifact@v3
with:
name: AgoraRtcNgExampleSymbol
path: |
Expand Down
Loading

0 comments on commit 416bcfa

Please sign in to comment.