Skip to content

Commit

Permalink
ci: support update dependencies (#730)
Browse files Browse the repository at this point in the history
* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* chore: wip

* [AUTO] Generate codes by terra (#729)

Co-authored-by: LichKing-2234 <[email protected]>

---------

Co-authored-by: sda-rob <[email protected]>
Co-authored-by: LichKing-2234 <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2023
1 parent bf6feec commit fe2bb4e
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 52 deletions.
24 changes: 15 additions & 9 deletions .github/actions/doc/action.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
name: Doc
description: Generate comments
description: Generate comments.

inputs:
target-path:
description: The path to generate comments, if set, will skip clone & pr
default: ""
github-token:
description: The github token
description: >
GITHUB_TOKEN (permissions contents: write and pull-requests: write) or a repo scoped Personal Access Token (PAT).
required: true

target-repo:
description: Relative path under GITHUB_WORKSPACE to the repository.

target-branch:
description: Sets the pull request base branch.

runs:
using: composite
steps:
- name: Generate comments
uses: AgoraIO-Extensions/actions/.github/actions/doc@main
with:
target-repo: ${{ github.repository }}
target-branch: ${{ github.ref_name }}
target-path: ${{ inputs.target-path }}
github-token: ${{ inputs.github-token }}
target-repo: ${{ inputs.target-repo }}
target-branch: ${{ inputs.target-branch }}
config: fmt_config/fmt_ts.yaml
language: ts
base-template-url: https://github.com/AgoraIO/agora_doc_source/releases/download/master-build/rn_ng_json_template_en.json
export-file-path: src/index.ts
github-token: ${{ inputs.github-token }}
pre-pr-command: |
rm -rf iris-doc
yarn lint --fix
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
- name: Install dependencies
env:
POD_INSTALL: 0
POD_INSTALL: "0"
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
name: Build API Example

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
pull_request:
types: [labeled, synchronize]

jobs:
build-android:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:dep-update') }}
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
Expand Down Expand Up @@ -73,6 +80,7 @@ jobs:
example/android/app/build/outputs/apk/release/*.apk
build-ios:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:dep-update') }}
runs-on: macos-latest
env:
TURBO_CACHE_DIR: .turbo/ios
Expand Down Expand Up @@ -121,14 +129,6 @@ jobs:
run: |
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: |
sed "s/localAppId = '\(.*\)'/localAppId = '${{ secrets.APP_ID }}'/g" agora.config.ts > tmp
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
type: string

jobs:
generate-codes:
update-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -19,11 +19,30 @@ jobs:
uses: ./.github/actions/setup

- name: Update dependencies
id: dep
uses: AgoraIO-Extensions/actions/.github/actions/dep@main
with:
dependencies-content: ${{ inputs.dependencies-content }}
github-token: ${{ secrets.GH_TOKEN }}
target-path: |
dependencies-content: ${{ inputs.dependencies-content }}
target-files: |
android/build.gradle
example/ios/Podfile
react-native-agora.podspec
- name: Update example
run: |
yarn pod-install example/ios
- name: Create pull request
uses: AgoraIO-Extensions/actions/.github/actions/pr@main
with:
github-token: ${{ secrets.GH_TOKEN }}
target-repo: ${{ github.workspace }}
target-branch: ${{ github.ref_name }}
target-branch-name-surffix: dep-update
pull-request-title: |
[AUTO] Update dependencies
pull-request-body: |
Dependencies content:
${{ steps.dep.outputs.matches }}
6 changes: 5 additions & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3


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

- name: Generate comments
uses: ./.github/actions/doc
with:
github-token: ${{ secrets.GH_TOKEN }}
target-branch: ${{ github.ref_name }}
19 changes: 11 additions & 8 deletions .github/workflows/terra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
uses: ./.github/actions/setup

- name: Generate codes
id: terra
uses: AgoraIO-Extensions/actions/.github/actions/terra@main
env:
LLVM_DOWNLOAD_URL: |
https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz
with:
github-token: ${{ secrets.GH_TOKEN }}
terra-ref: ${{ inputs.terra-ref }}
target-path: ${{ github.workspace }}
config: ci/config/terra_config.yaml
output-dir: src
export-file-path: src/index.ts
github-token: ${{ secrets.GH_TOKEN }}

- name: Format codes
run: |
Expand All @@ -38,22 +38,25 @@ jobs:
- name: Generate ts interface
run: |
yarn ts_interface_builder
yarn
- name: Generate comments
uses: ./.github/actions/doc
with:
target-path: ${{ github.workspace }}
github-token: ${{ secrets.GH_TOKEN }}
target-path: ${{ github.workspace }}

- name: Create pull request
uses: AgoraIO-Extensions/actions/.github/actions/pr@main
with:
github-token: ${{ secrets.GH_TOKEN }}
target-repo: ${{ github.workspace }}
target-branch: ${{ github.ref_name }}
target-branch-name-surffix: |
terra-update
target-branch-name-surffix: terra-update
pull-request-title: |
[AUTO] Generate code by terra
[AUTO] Generate codes by terra
pull-request-body: |
Terra configuration:
${{ steps.terra.outputs.configuration }}
add-paths: src
github-token: ${{ secrets.GH_TOKEN }}
2 changes: 1 addition & 1 deletion src/AgoraBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ export class VideoEncoderConfiguration {
*/
export class DataStreamConfig {
/**
* Whether to synchronize the data packet with the published audio packet. true : Synchronize the data packet with the audio packet. false : Do not synchronize the data packet with the audio packet. When you set the data packet to synchronize with the audio, then if the data packet delay is within the audio delay, the SDK triggers the onStreamMessage callback when the synchronized audio packet is played out. Do not set this parameter as true if you need the receiver to receive the data packet immediately. Agora recommends that you set this parameter to true only when you need to implement specific functions, for example, lyric synchronization.
* Whether to synchronize the data packet with the published audio packet. true : Synchronize the data packet with the audio packet. This setting is suitable for special scenarios such as lyrics synchronization. false : Do not synchronize the data packet with the audio packet. This setting is suitable for scenarios where data packets need to arrive at the receiving end immediately. When you set the data packet to synchronize with the audio, then if the data packet delay is within the audio delay, the SDK triggers the onStreamMessage callback when the synchronized audio packet is played out.
*/
syncWithAudio?: boolean;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/IAgoraMediaPlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export abstract class IMediaPlayer {
* Gets the ID of the media player.
*
* @returns
* ≥ 0: Success. The ID of the media player.
* Success. The ID of the media player.
* < 0: Failure.
*/
abstract getMediaPlayerId(): number;
Expand Down
34 changes: 14 additions & 20 deletions src/IAgoraRtcEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export enum PriorityType {
*/
export class LocalVideoStats {
/**
* The user ID of the local user.
* The ID of the local user.
*/
uid?: number;
/**
Expand Down Expand Up @@ -1393,7 +1393,7 @@ export interface IRtcEngineEventHandler {
/**
* Occurs when the playback of the local music file finishes.
*
* Deprecated: Please use onAudioMixingStateChanged instead. After you call startAudioMixing to play a local music file, this callback occurs when the playback finishes. If the call startAudioMixing fails, the error code WARN_AUDIO_MIXING_OPEN_ERROR is returned.
* Deprecated: Use onAudioMixingStateChanged instead. After you call startAudioMixing to play a local music file, this callback occurs when the playback finishes. If the call of startAudioMixing fails, the error code WARN_AUDIO_MIXING_OPEN_ERROR is returned.
*/
onAudioMixingFinished?(): void;

Expand All @@ -1402,7 +1402,7 @@ export interface IRtcEngineEventHandler {
*
* This callback occurs when the local audio effect file finishes playing.
*
* @param soundId The audio effect ID. The ID of each audio effect file is unique.
* @param soundId The ID of the audio effect. The ID of each audio effect file is unique.
*/
onAudioEffectFinished?(soundId: number): void;

Expand Down Expand Up @@ -1740,7 +1740,7 @@ export interface IRtcEngineEventHandler {
/**
* Occurs when the camera turns on and is ready to capture the video.
*
* Deprecated: Please use LocalVideoStreamStateCapturing (1) in onLocalVideoStateChanged instead. This callback indicates that the camera has been successfully turned on and you can start to capture video.
* Deprecated: Use LocalVideoStreamStateCapturing (1) in onLocalVideoStateChanged instead. This callback indicates that the camera has been successfully turned on and you can start to capture video.
*/
onCameraReady?(): void;

Expand Down Expand Up @@ -2097,13 +2097,7 @@ export interface IRtcEngineEventHandler {
): void;

/**
* Reports the volume change of the audio device or app.
*
* Occurs when the volume on the playback device, audio capture device, or the volume in the application changes.
*
* @param deviceType The device type. See MediaDeviceType.
* @param volume The volume value. The range is [0, 255].
* @param muted Whether the audio device is muted: true : The audio device is muted. false : The audio device is not muted.
* @ignore
*/
onAudioDeviceVolumeChanged?(
deviceType: MediaDeviceType,
Expand Down Expand Up @@ -2345,9 +2339,9 @@ export interface IRtcEngineEventHandler {
* Occurs when the video subscribing state changes.
*
* @param channel The channel name.
* @param uid The ID of the remote user.
* @param oldState The previous subscribing status, see StreamSubscribeState for details.
* @param newState The current subscribing status, see StreamSubscribeState for details.
* @param uid The user ID of the remote user.
* @param oldState The previous subscribing status. See StreamSubscribeState.
* @param newState The current subscribing status. See StreamSubscribeState.
* @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
*/
onVideoSubscribeStateChanged?(
Expand Down Expand Up @@ -2626,16 +2620,16 @@ export enum MaxMetadataSizeType {
export class Metadata {
/**
* The user ID.
* For the recipient:the ID of the remote user who sent the Metadata.
* Ignore it for sender.
* For the recipient: The ID of the remote user who sent the Metadata.
* For the sender: Ignore it.
*/
uid?: number;
/**
* Buffer size for received or sent Metadata.
* The buffer size of the sent or received Metadata.
*/
size?: number;
/**
* The buffer address of the received or sent Metadata.
* The buffer address of the sent or received Metadata.
*/
buffer?: Uint8Array;
/**
Expand Down Expand Up @@ -4306,7 +4300,7 @@ export abstract class IRtcEngine {
/**
* Retrieves the playback position of the audio effect file.
*
* Call this method after the playEffect method.
* Call this method after playEffect.
*
* @param soundId The audio effect ID. The ID of each audio effect file is unique.
*
Expand Down Expand Up @@ -6811,7 +6805,7 @@ export abstract class IRtcEngine {
*
* If the metadata is sent successfully, the SDK triggers the onMetadataReceived callback on the receiver.
*
* @param metadata Media metadata See Metadata.
* @param metadata Media metadata. See Metadata.
* @param sourceType The type of the video source. See VideoSourceType.
*
* @returns
Expand Down

0 comments on commit fe2bb4e

Please sign in to comment.