diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index bedf7a159..c2807bef0 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -9,6 +9,24 @@ runs: with: node-version-file: .nvmrc + - name: Setup Ruby + if: ${{ runner.os == 'macOS' }} + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Setup activesupport + if: ${{ runner.os == 'macOS' }} + run: + gem install activesupport -v 7.0.8 + shell: bash + + - name: Setup Cocoapods + if: ${{ runner.os == 'macOS' }} + uses: maxim-lobanov/setup-cocoapods@v1 + with: + version: 1.13.0 + - name: Cache dependencies id: yarn-cache uses: actions/cache@v3 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c4acb48ce..8241893b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: turbo_cache_hit: 0 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup @@ -78,6 +78,7 @@ jobs: name: AgoraRtcNgExample path: | example/android/app/build/outputs/apk/release/*.apk + if-no-files-found: error build-ios: if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:dep-update') }} @@ -87,15 +88,14 @@ jobs: turbo_cache_hit: 0 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup - - - name: Setup cocoapods + + - name: Setup fastlane run: | - gem install cocoapods -v 1.13.0 - gem install activesupport -v 7.0.8 + brew install fastlane - name: Cache turborepo for iOS uses: actions/cache@v3 @@ -174,6 +174,7 @@ jobs: name: AgoraRtcNgExample path: | example/ios/*.ipa + if-no-files-found: error - name: Upload dSYM uses: actions/upload-artifact@v3 @@ -181,10 +182,11 @@ jobs: name: AgoraRtcNgExampleSymbol path: | example/ios/*.dSYM.zip + if-no-files-found: error notification: runs-on: ubuntu-latest needs: [ build-android, build-ios ] steps: - run: | - curl -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${{ secrets.WECHAT_KEY }}" -d '{"msgtype":"text","text":{"content":"ReactNative:\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}}' + curl -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${{ secrets.WECHAT_KEY }}" -d '{"msgtype":"text","text":{"content":"ReactNative Example:\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nDownload Link:\nhttps://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}"}}' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 084766cb8..4d0cbf446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ matrix.platform }}-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.platform }}-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup @@ -54,7 +54,7 @@ jobs: runs-on: ${{ matrix.platform }}-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup @@ -73,7 +73,7 @@ jobs: turbo_cache_hit: 0 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup @@ -154,16 +154,11 @@ jobs: turbo_cache_hit: 0 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup - - 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: diff --git a/.github/workflows/dep.yml b/.github/workflows/dep.yml index aa18404e7..2b7e842dd 100644 --- a/.github/workflows/dep.yml +++ b/.github/workflows/dep.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup @@ -46,3 +46,39 @@ jobs: Dependencies content: ${{ steps.dep.outputs.matches }} + + update-pod: + runs-on: macos-latest + needs: update-dependencies + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.ref_name }}-dep-update + token: ${{ secrets.GH_TOKEN }} + + - name: Setup + uses: ./.github/actions/setup + + - name: Cache cocoapods + id: cocoapods-cache + uses: actions/cache@v3 + with: + path: | + **/ios/Pods + key: ${{ runner.os }}-cocoapods-0-${{ hashFiles('example/ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-cocoapods-0- + + - name: Update Podfile.lock + run: | + pod update + working-directory: example/ios + + - name: Commit changes + run: | + git config --global user.email "${{ secrets.GIT_EMAIL }}" + git config --global user.name "${{ secrets.GIT_USERNAME }}" + git add example + git commit -m "chore(example): update Podfile.lock by new dependencies" + git push diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index ff175641b..ef148990e 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index dc9efd47a..c231ecdac 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -12,7 +12,7 @@ jobs: name: gitleaks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: gitleaks/gitleaks-action@v2 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e72eccf84..164225368 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/terra.yml b/.github/workflows/terra.yml index f1f982a8d..010f42a1f 100644 --- a/.github/workflows/terra.yml +++ b/.github/workflows/terra.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup @@ -38,7 +38,7 @@ jobs: - name: Generate ts interface run: | - yarn + yarn build:ts-interface - name: Generate comments uses: ./.github/actions/doc diff --git a/.github/workflows/typedoc.yml b/.github/workflows/typedoc.yml index 758da62fb..e98f57b50 100644 --- a/.github/workflows/typedoc.yml +++ b/.github/workflows/typedoc.yml @@ -28,19 +28,25 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Setup uses: ./.github/actions/setup + - name: Build TypeDoc run: yarn doc + - name: Zip It Up 🤐 run: | zip -r react-native-agora-docs.zip docs + - name: Upload Artifact ⬆️ uses: actions/upload-artifact@v3 with: name: react-native-agora-docs.zip path: react-native-agora-docs.zip + if-no-files-found: error + - name: Upload Doc Archive to GitHub release ⬆️ if: github.event.release uses: svenstaro/upload-release-action@2.6.0 @@ -48,11 +54,13 @@ jobs: file: react-native-agora-docs.zip asset_name: react-native-agora-docs.zip tag: ${{ github.ref_name }} + - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: # Upload docs directory path: 'docs' + - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v2 diff --git a/android/build.gradle b/android/build.gradle index bb90a21f7..0f1daee81 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -164,9 +164,9 @@ dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') - api 'io.agora.rtc:full-sdk:4.2.3' - implementation 'io.agora.rtc:full-screen-sharing:4.2.3' - implementation 'io.agora.rtc:iris-rtc:4.2.3-build.4' + api 'io.agora.rtc:full-sdk:4.2.6' + implementation 'io.agora.rtc:full-screen-sharing:4.2.6' + implementation 'io.agora.rtc:iris-rtc:4.2.6-build.3' } if (isNewArchitectureEnabled()) { diff --git a/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj b/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj index b4d10046b..3eacf931b 100644 --- a/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj +++ b/example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj @@ -774,10 +774,7 @@ ); OTHER_LDFLAGS = ( "$(inherited)", - "-Wl", - "-ld_classic", " ", - "-Wl -ld_classic ", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; @@ -850,10 +847,7 @@ ); OTHER_LDFLAGS = ( "$(inherited)", - "-Wl", - "-ld_classic", " ", - "-Wl -ld_classic ", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; diff --git a/example/ios/Podfile b/example/ios/Podfile index f33faca4b..c2e47ea17 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -62,5 +62,5 @@ target 'AgoraRtcNgExample' do end target 'ScreenShare' do - pod 'AgoraRtcEngine_iOS', '4.2.3' + pod 'AgoraRtcEngine_iOS', '4.2.6' end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 3aa32ff79..aa5de4d45 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,34 +1,34 @@ PODS: - - AgoraIrisRTC_iOS (4.2.3-build.4) - - AgoraRtcEngine_iOS (4.2.3): - - AgoraRtcEngine_iOS/AIAEC (= 4.2.3) - - AgoraRtcEngine_iOS/AINS (= 4.2.3) - - AgoraRtcEngine_iOS/AudioBeauty (= 4.2.3) - - AgoraRtcEngine_iOS/ClearVision (= 4.2.3) - - AgoraRtcEngine_iOS/ContentInspect (= 4.2.3) - - AgoraRtcEngine_iOS/DRM (= 4.2.3) - - AgoraRtcEngine_iOS/FaceDetection (= 4.2.3) - - AgoraRtcEngine_iOS/ReplayKit (= 4.2.3) - - AgoraRtcEngine_iOS/RtcBasic (= 4.2.3) - - AgoraRtcEngine_iOS/SpatialAudio (= 4.2.3) - - AgoraRtcEngine_iOS/VideoCodecDec (= 4.2.3) - - AgoraRtcEngine_iOS/VideoCodecEnc (= 4.2.3) - - AgoraRtcEngine_iOS/VirtualBackground (= 4.2.3) - - AgoraRtcEngine_iOS/VQA (= 4.2.3) - - AgoraRtcEngine_iOS/AIAEC (4.2.3) - - AgoraRtcEngine_iOS/AINS (4.2.3) - - AgoraRtcEngine_iOS/AudioBeauty (4.2.3) - - AgoraRtcEngine_iOS/ClearVision (4.2.3) - - AgoraRtcEngine_iOS/ContentInspect (4.2.3) - - AgoraRtcEngine_iOS/DRM (4.2.3) - - AgoraRtcEngine_iOS/FaceDetection (4.2.3) - - AgoraRtcEngine_iOS/ReplayKit (4.2.3) - - AgoraRtcEngine_iOS/RtcBasic (4.2.3) - - AgoraRtcEngine_iOS/SpatialAudio (4.2.3) - - AgoraRtcEngine_iOS/VideoCodecDec (4.2.3) - - AgoraRtcEngine_iOS/VideoCodecEnc (4.2.3) - - AgoraRtcEngine_iOS/VirtualBackground (4.2.3) - - AgoraRtcEngine_iOS/VQA (4.2.3) + - AgoraIrisRTC_iOS (4.2.6-build.3) + - AgoraRtcEngine_iOS (4.2.6): + - AgoraRtcEngine_iOS/AIAEC (= 4.2.6) + - AgoraRtcEngine_iOS/AINS (= 4.2.6) + - AgoraRtcEngine_iOS/AudioBeauty (= 4.2.6) + - AgoraRtcEngine_iOS/ClearVision (= 4.2.6) + - AgoraRtcEngine_iOS/ContentInspect (= 4.2.6) + - AgoraRtcEngine_iOS/DRM (= 4.2.6) + - AgoraRtcEngine_iOS/FaceDetection (= 4.2.6) + - AgoraRtcEngine_iOS/ReplayKit (= 4.2.6) + - AgoraRtcEngine_iOS/RtcBasic (= 4.2.6) + - AgoraRtcEngine_iOS/SpatialAudio (= 4.2.6) + - AgoraRtcEngine_iOS/VideoCodecDec (= 4.2.6) + - AgoraRtcEngine_iOS/VideoCodecEnc (= 4.2.6) + - AgoraRtcEngine_iOS/VirtualBackground (= 4.2.6) + - AgoraRtcEngine_iOS/VQA (= 4.2.6) + - AgoraRtcEngine_iOS/AIAEC (4.2.6) + - AgoraRtcEngine_iOS/AINS (4.2.6) + - AgoraRtcEngine_iOS/AudioBeauty (4.2.6) + - AgoraRtcEngine_iOS/ClearVision (4.2.6) + - AgoraRtcEngine_iOS/ContentInspect (4.2.6) + - AgoraRtcEngine_iOS/DRM (4.2.6) + - AgoraRtcEngine_iOS/FaceDetection (4.2.6) + - AgoraRtcEngine_iOS/ReplayKit (4.2.6) + - AgoraRtcEngine_iOS/RtcBasic (4.2.6) + - AgoraRtcEngine_iOS/SpatialAudio (4.2.6) + - AgoraRtcEngine_iOS/VideoCodecDec (4.2.6) + - AgoraRtcEngine_iOS/VideoCodecEnc (4.2.6) + - AgoraRtcEngine_iOS/VirtualBackground (4.2.6) + - AgoraRtcEngine_iOS/VQA (4.2.6) - boost (1.76.0) - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) @@ -405,9 +405,9 @@ PODS: - React-jsinspector (0.72.5) - React-logger (0.72.5): - glog - - react-native-agora (4.2.4): - - AgoraIrisRTC_iOS (= 4.2.3-build.4) - - AgoraRtcEngine_iOS (= 4.2.3) + - react-native-agora (4.2.5): + - AgoraIrisRTC_iOS (= 4.2.6-build.3) + - AgoraRtcEngine_iOS (= 4.2.6) - RCT-Folly (= 2021.07.22.00) - React-Core - react-native-agora-rawdata (0.1.0): @@ -547,7 +547,7 @@ PODS: - Yoga (~> 1.14) DEPENDENCIES: - - AgoraRtcEngine_iOS (= 4.2.3) + - AgoraRtcEngine_iOS (= 4.2.6) - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) @@ -746,8 +746,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - AgoraIrisRTC_iOS: 84ae4f5824d68480d1215cbdd8db261549a7c94e - AgoraRtcEngine_iOS: eb0a7e87dbc9e818b267d413b48f76a57959e6f4 + AgoraIrisRTC_iOS: 8346499b82968a4967e3d0bec2cf14bf7c0c3f76 + AgoraRtcEngine_iOS: ac647332ad8f86d79cf810601c9e62b28c3a4de0 boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 @@ -781,7 +781,7 @@ SPEC CHECKSUMS: React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4 - react-native-agora: 38f534bb58937768025bd7055d8e296785db920f + react-native-agora: 70e2396eb53445d650af92ca2a5de5173f26f33b react-native-agora-rawdata: 097895cdccd8fcf3cff5dffe23372f5d3c89fd31 react-native-image-tools: 88218449791389bbf550a2c475a3b564c8233c8b react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284 @@ -813,6 +813,6 @@ SPEC CHECKSUMS: Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 3933d6cb9d233a740943b1ee0fa22084b6fdc7e0 +PODFILE CHECKSUM: 6d0fe7dc02969298cf6c0c7f0d7e078bc429a2f1 COCOAPODS: 1.13.0 diff --git a/package.json b/package.json index fa85e5585..8ff325f3b 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib", "prepare": "bob build", "release": "release-it", - "doc": "typedoc src --out ./docs --exclude \"example/**\"" + "doc": "typedoc src --out ./docs --exclude \"example/**\"", + "build:ts-interface": "ts-interface-builder src/*.ts -o src/ti/" }, "keywords": [ "react-native", diff --git a/react-native-agora.podspec b/react-native-agora.podspec index ab9f8e4d4..1749d8729 100644 --- a/react-native-agora.podspec +++ b/react-native-agora.podspec @@ -40,8 +40,8 @@ Pod::Spec.new do |s| end end - s.dependency 'AgoraRtcEngine_iOS', '4.2.3' - s.dependency 'AgoraIrisRTC_iOS', '4.2.3-build.4' + s.dependency 'AgoraRtcEngine_iOS', '4.2.6' + s.dependency 'AgoraIrisRTC_iOS', '4.2.6-build.3' s.libraries = 'stdc++' s.framework = 'ReplayKit' end diff --git a/scripts/bootstrap.cjs b/scripts/bootstrap.cjs index 15bef5580..c0bc82bea 100644 --- a/scripts/bootstrap.cjs +++ b/scripts/bootstrap.cjs @@ -35,15 +35,11 @@ module.exports = { } if ( - child_process.spawnSync( - 'yarn', - ['ts-interface-builder', 'src/*.ts', '-o', 'src/ti/'], - { - stdio: 'inherit', - encoding: 'utf-8', - shell: true, - } - ).status !== 0 + child_process.spawnSync('yarn', ['build:ts-interface'], { + stdio: 'inherit', + encoding: 'utf-8', + shell: true, + }).status !== 0 ) { throw new Error('Failed to run ts-interface-builder'); }