Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0b0b94b
chore: optimize
guoxianzhe Aug 12, 2025
77c82ff
chore: optimize
guoxianzhe Aug 12, 2025
6c634c9
chore: expo
guoxianzhe Aug 14, 2025
c700ef3
chore: expo
guoxianzhe Aug 14, 2025
915daea
chore: expo
guoxianzhe Aug 14, 2025
e924325
chore: optimize
guoxianzhe Aug 15, 2025
c7ab384
chore: optimize
guoxianzhe Aug 15, 2025
494b407
chore: optimize
guoxianzhe Aug 15, 2025
4772072
chore: optimize
guoxianzhe Aug 18, 2025
c7062b0
chore: optimize
guoxianzhe Aug 18, 2025
c4ee60b
chore: optimize
guoxianzhe Aug 18, 2025
360ba60
chore: optimize
guoxianzhe Aug 18, 2025
f9cbde6
chore: optimize
guoxianzhe Aug 18, 2025
0017c23
chore: optimize
guoxianzhe Aug 18, 2025
af30089
chore: optimize
guoxianzhe Aug 19, 2025
68a47eb
chore: optimize
guoxianzhe Aug 19, 2025
065618d
chore: optimize
guoxianzhe Aug 19, 2025
43f4c36
chore: optimize
guoxianzhe Aug 19, 2025
0f3ac67
chore: optimize
guoxianzhe Aug 19, 2025
c89bd2c
chore: optimize
guoxianzhe Aug 19, 2025
d024c6c
chore: optimize
guoxianzhe Aug 19, 2025
670757f
chore: optimize
guoxianzhe Aug 19, 2025
8b3fa2e
chore: optimize
guoxianzhe Aug 19, 2025
11e43d3
chore: optimize
guoxianzhe Aug 19, 2025
119b973
chore: optimize
guoxianzhe Aug 19, 2025
9f66bb4
chore: optimize
guoxianzhe Aug 19, 2025
e3c641f
chore: optimize
guoxianzhe Aug 19, 2025
46812c5
chore: optimize
guoxianzhe Aug 19, 2025
3a84ab1
chore: optimize
guoxianzhe Aug 19, 2025
667933c
chore: optimize
guoxianzhe Aug 19, 2025
dfe9a56
chore: optimize
guoxianzhe Aug 19, 2025
c6ae1ba
chore: optimize
guoxianzhe Aug 19, 2025
d85af51
chore: optimize
guoxianzhe Aug 19, 2025
fada091
chore: optimize
guoxianzhe Aug 19, 2025
8dab9b7
chore: optimize
guoxianzhe Aug 20, 2025
d45d757
chore: optimize
guoxianzhe Aug 20, 2025
7a9f04a
chore: optimize
guoxianzhe Aug 20, 2025
85874b3
chore: optimize
guoxianzhe Aug 20, 2025
7defed8
chore: optimize
guoxianzhe Aug 20, 2025
0fa7e07
chore: optimize
guoxianzhe Aug 20, 2025
aa363f3
chore: optimize
guoxianzhe Aug 20, 2025
339b809
chore: optimize
guoxianzhe Aug 20, 2025
42f1b8b
chore: optimize
guoxianzhe Aug 20, 2025
2040aee
chore: optimize
guoxianzhe Aug 21, 2025
310d45a
chore: optimize
guoxianzhe Aug 22, 2025
cc17337
chore: optimize
guoxianzhe Aug 22, 2025
e1adf2b
chore: optimize
guoxianzhe Aug 22, 2025
e6b5fcc
chore: optimize
guoxianzhe Aug 22, 2025
213c1e1
chore: optimize
guoxianzhe Aug 25, 2025
196c961
chore: optimize
guoxianzhe Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
if: ${{ runner.os == 'macOS' }}
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.13.0
version: 1.16.2

- name: Cache dependencies
id: yarn-cache
Expand Down
79 changes: 16 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
matrix:
newArch: [false, true]
env:
TURBO_CACHE_DIR: .turbo/android
turbo_cache_hit: 0
ORG_GRADLE_PROJECT_newArchEnabled: ${{ matrix.newArch }}
steps:
- name: Checkout
Expand All @@ -24,71 +22,40 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ matrix.newArch }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-${{ matrix.newArch }}-

- name: Check turborepo cache for Android
run: |
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: '17'

- 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-${{ matrix.newArch }}-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-${{ matrix.newArch }}-

- 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
working-directory: examples/expo/src/config

- name: Build example for Android
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force=true
yarn example build:android

- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample-Android-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
name: AgoraRtcNgExampleExpo-Android-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
path: |
example/android/app/build/outputs/apk/release/*.apk
examples/expo/android/app/build/outputs/apk/release/*.apk
if-no-files-found: error

build-ios:
runs-on: macos-latest
runs-on: macos-15
strategy:
matrix:
newArch: [false, true]
env:
TURBO_CACHE_DIR: .turbo/ios
turbo_cache_hit: 0
RCT_NEW_ARCH_ENABLED: ${{ matrix.newArch }}
steps:
- name: Checkout
Expand All @@ -101,34 +68,20 @@ jobs:
run: |
brew install fastlane

- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ matrix.newArch }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-${{ matrix.newArch }}-

- name: Cache cocoapods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ matrix.newArch }}-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-${{ matrix.newArch }}-
- name: Switch Xcode
run: |
#https://github.com/actions/runner-images/issues/12758
sudo xcode-select --switch /Applications/Xcode_16.4.app

- name: Install cocoapods
run: |
yarn pod-install example/ios
yarn pod-install examples/expo/ios

- 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
working-directory: examples/expo/src/config

- name: Install the Apple certificate and provisioning profile
env:
Expand Down Expand Up @@ -161,22 +114,22 @@ jobs:

- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force=true
yarn example build:ios

- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample-iOS-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
name: AgoraRtcNgExampleExpo-iOS-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
path: |
example/ios/*.ipa
examples/expo/ios/*.ipa
if-no-files-found: error

- name: Upload dSYM
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExampleSymbol-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
name: AgoraRtcNgExampleExpoSymbol-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
path: |
example/ios/*.dSYM.zip
examples/expo/ios/*.dSYM.zip
if-no-files-found: error

notification:
Expand Down
69 changes: 26 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,55 +68,24 @@ jobs:
newArch: [true, false]
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
ORG_GRADLE_PROJECT_newArchEnabled: ${{ matrix.newArch }}
turbo_cache_hit: 0
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Cache turborepo for Android
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-detox-${{ matrix.newArch }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-detox-${{ matrix.newArch }}-

- name: Check turborepo cache for Android
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run detox:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'detox: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: '17'

- 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-${{ matrix.newArch }}-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-${{ matrix.newArch }}-

- name: Install Detox dependencies
shell: bash
run: |
Expand All @@ -126,23 +95,33 @@ jobs:
run: |
sed "s/localAppId = '\(.*\)'/localAppId = '${{ secrets.APP_ID }}'/g" agora.config.ts > tmp
mv tmp agora.config.ts
working-directory: example/src/config
working-directory: examples/expo/src/config

- name: Build example for Android
run: |
yarn turbo run detox:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
yarn example detox:android

- name: Clean Useless cache
run: |
rm -rf "${{ env.TURBO_CACHE_DIR }}" || true
rm -rf ~/.gradle/caches || true
rm -rf ~/.gradle/wrapper || true
sudo apt-get clean
npm cache clean --force
rm -rf example/ios
rm -rf examples/**/ios
yarn cache clean
df -h

- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
Expand All @@ -157,16 +136,15 @@ jobs:
api-level: 31
arch: x86_64
avd-name: emulator
working-directory: example
working-directory: examples/expo
script: detox test -c android.emu.release

test-ios:
strategy:
matrix:
newArch: [1, 0]
runs-on: macos-latest
runs-on: macos-15
env:
TURBO_CACHE_DIR: .turbo/ios
RCT_NEW_ARCH_ENABLED: ${{ matrix.newArch }}
steps:
- name: Checkout
Expand All @@ -177,7 +155,12 @@ jobs:

- name: Install cocoapods
run: |
yarn pod-install example/ios
yarn pod-install examples/expo/ios

- name: Switch Xcode
run: |
#https://github.com/actions/runner-images/issues/12758
sudo xcode-select --switch /Applications/Xcode_16.4.app

- name: Install Detox dependencies
shell: bash
Expand All @@ -190,20 +173,20 @@ jobs:
run: |
sed "s/localAppId = '\(.*\)'/localAppId = '${{ secrets.APP_ID }}'/g" agora.config.ts > tmp
mv tmp agora.config.ts
working-directory: example/src/config
working-directory: examples/expo/src/config

- name: Build example for iOS
run: |
yarn turbo run detox:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
yarn example detox:ios

- uses: futureware-tech/simulator-action@v4
with:
model: 'iPhone 15'
model: 'iPhone 16'

- name: Run e2e tests
# https://github.com/wix/Detox/issues/3720#issuecomment-1347855162
if: ${{ matrix.newArch == 0 }}
working-directory: example
working-directory: examples/expo
run: |
detox clean-framework-cache
detox build-framework-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:

- name: Update example
run: |
rm -rf example/ios/Podfile.lock
yarn pod-install example/ios
rm -rf examples/expo/ios/Podfile.lock
yarn pod-install examples/expo/ios

- name: Create pull request
uses: AgoraIO-Extensions/actions/.github/actions/pr@main
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ android.iml

# Cocoapods
#
example/ios/Pods
examples/**/ios/Pods
**/Pods/

# Ruby
example/vendor/
examples/**/vendor/

# node.js
#
Expand Down
1 change: 0 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ nmHoistingLimits: workspaces

plugins:
- path: scripts/bootstrap.cjs
- path: scripts/pod-install.cjs
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
Expand Down
Loading
Loading