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: support 4.2.3 #705

Merged
merged 48 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
87a2ce5
feat: support 4.2.3
LichKing-2234 Sep 12, 2023
d7415f4
chore: wip
LichKing-2234 Sep 12, 2023
d08ccb7
[AUTO] Generate comments by iris-doc (#703)
LichKing-2234 Sep 12, 2023
8cfe6c0
[AUTO] Generate code by terra (#704)
LichKing-2234 Sep 12, 2023
979c69a
fix: initMusicContentCenter NMS-15609
LichKing-2234 Sep 15, 2023
4029ab8
fix: add listenUserJoinOrLeave NMS-15612
LichKing-2234 Sep 15, 2023
1d4627e
fix: d3d11_texture_2d NMS-15590
LichKing-2234 Sep 15, 2023
7c68f79
fix: play before preload NMS-15609
LichKing-2234 Sep 19, 2023
d20e060
fix: fix: setState prev issue
LichKing-2234 Sep 28, 2023
299e395
chore: update native
LichKing-2234 Oct 7, 2023
f9e7934
[AUTO] Generate comments by iris-doc (#706)
LichKing-2234 Oct 7, 2023
b1435a1
[AUTO] Generate code by terra (#709)
LichKing-2234 Oct 7, 2023
8ee5081
[AUTO] Generate comments by iris-doc (#711)
LichKing-2234 Oct 7, 2023
0667e44
build: upgrade to 0.72.5 #708
LichKing-2234 Oct 9, 2023
47a36a7
[WIP]
LichKing-2234 Oct 9, 2023
5234318
[WIP]
LichKing-2234 Oct 9, 2023
ce01df9
build: fix `AgoraRtcNgExample`
LichKing-2234 Oct 9, 2023
bb67e55
[WIP]
LichKing-2234 Oct 9, 2023
0f9b20b
[WIP]
LichKing-2234 Oct 9, 2023
3e77830
[WIP]
LichKing-2234 Oct 9, 2023
2016bfb
[WIP]
LichKing-2234 Oct 9, 2023
41a4439
[WIP]
LichKing-2234 Oct 9, 2023
dcc2ec1
[WIP]
LichKing-2234 Oct 9, 2023
3a82c71
[WIP]
LichKing-2234 Oct 9, 2023
c602093
[WIP]
LichKing-2234 Oct 9, 2023
36c3100
[WIP]
LichKing-2234 Oct 9, 2023
dba927b
[WIP]
LichKing-2234 Oct 9, 2023
38978cb
[WIP]
LichKing-2234 Oct 9, 2023
d5fb6b7
[WIP]
LichKing-2234 Oct 9, 2023
112484b
[WIP]
LichKing-2234 Oct 9, 2023
1205c45
[WIP]
LichKing-2234 Oct 9, 2023
6a381ae
[WIP]
LichKing-2234 Oct 9, 2023
d6e2667
[WIP]
LichKing-2234 Oct 9, 2023
d946b64
[WIP]
LichKing-2234 Oct 11, 2023
5607e15
[WIP]
LichKing-2234 Oct 11, 2023
ddd7d75
[WIP]
LichKing-2234 Oct 11, 2023
c02d631
[WIP]
LichKing-2234 Oct 11, 2023
9aa0fc0
[WIP]
LichKing-2234 Oct 11, 2023
f20d2d7
[WIP]
LichKing-2234 Oct 11, 2023
7acf2a2
[WIP]
LichKing-2234 Oct 11, 2023
bc12a8c
[WIP]
LichKing-2234 Oct 12, 2023
ed1b956
[WIP]
LichKing-2234 Oct 12, 2023
87cd41e
chore: wip
LichKing-2234 Oct 12, 2023
13a8517
chore: wip
LichKing-2234 Oct 12, 2023
9b0d682
chore: test
LichKing-2234 Oct 12, 2023
fe2fa80
chore: test
LichKing-2234 Oct 12, 2023
754b6bb
chore: wip
LichKing-2234 Oct 12, 2023
dc64aa9
chore: wip
LichKing-2234 Oct 12, 2023
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
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
Loading