Skip to content

Commit 6db751a

Browse files
authored
feat: support 4.1.1.124 (#1133)
* chore: [terra]upgrade code generate and comment generate * chore: upgrade to iris 4.1.1.124-build.1
1 parent 439d848 commit 6db751a

17 files changed

+4827
-83
lines changed

.github/actions/doc/action.yml

-31
This file was deleted.

.github/workflows/doc.yml

+23-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,33 @@ jobs:
99
steps:
1010
- name: Checkout
1111
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
token: ${{ secrets.GITHUB_TOKEN }}
1215

1316
- name: Setup
1417
uses: ./.github/actions/setup
1518

16-
- name: Generate comments
17-
uses: ./.github/actions/doc
19+
- name: Generate comment by terra
20+
uses: AgoraIO-Extensions/actions/.github/actions/generate@main
1821
with:
1922
github-token: ${{ secrets.GH_TOKEN }}
23+
generate-code: false
24+
generate-comment: true
25+
generate-comment-command: |
26+
sh generate-comment.sh
27+
28+
- name: Create pull request
29+
uses: AgoraIO-Extensions/actions/.github/actions/pr@main
30+
with:
31+
github-token: ${{ secrets.GH_TOKEN }}
32+
target-repo: ${{ github.workspace }}
2033
target-branch: ${{ github.ref_name }}
34+
target-branch-name-surffix: doc-update
35+
pull-request-title: |
36+
[AUTO] Generate comments by iris-doc
37+
pull-request-body: |
38+
Doc source:
39+
40+
https://github.com/AgoraIO/agora_doc_source/releases/download/master-build/electron_ng_json_template_en.json
41+
add-paths: ts

.github/workflows/terra.yml

+11-34
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,30 @@ name: Generate codes
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
terra-ref:
7-
description: The terra repo ref
8-
required: true
9-
default: "main"
105

116
jobs:
127
generate-codes:
138
runs-on: ubuntu-latest
149
steps:
1510
- name: Checkout
1611
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
token: ${{ secrets.GITHUB_TOKEN }}
1715

1816
- name: Setup
1917
uses: ./.github/actions/setup
2018

21-
- name: Generate codes
22-
id: terra
23-
uses: AgoraIO-Extensions/actions/.github/actions/terra@main
24-
env:
25-
LLVM_DOWNLOAD_URL: |
26-
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
19+
- name: Generate code and comment by terra
20+
uses: AgoraIO-Extensions/actions/.github/actions/generate@main
2721
with:
2822
github-token: ${{ secrets.GH_TOKEN }}
29-
terra-ref: ${{ inputs.terra-ref }}
30-
config: ci/config/terra_config.yaml
31-
output-dir: ts/Private
32-
export-file-path: ts/AgoraSdk.ts
33-
34-
- name: Format codes
35-
run: |
36-
rm -rf terra
37-
yarn lint --fix
38-
39-
- name: Generate ts interface
40-
run: |
41-
yarn build:ts-interface
42-
43-
- name: Generate comments
44-
uses: ./.github/actions/doc
45-
with:
46-
github-token: ${{ secrets.GH_TOKEN }}
47-
target-path: ${{ github.workspace }}
23+
generate-code: true
24+
generate-comment: true
25+
generate-code-command: |
26+
sh generate-code.sh
27+
generate-comment-command: |
28+
sh generate-comment.sh
4829
4930
- name: Create pull request
5031
uses: AgoraIO-Extensions/actions/.github/actions/pr@main
@@ -55,8 +36,4 @@ jobs:
5536
target-branch-name-surffix: terra-update
5637
pull-request-title: |
5738
[AUTO] Generate codes by terra
58-
pull-request-body: |
59-
Terra configuration:
60-
61-
${{ steps.terra.outputs.configuration }}
6239
add-paths: ts

.gitignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
### VisualStudioCode template
2-
.vscode/*
3-
!.vscode/settings.json
4-
!.vscode/tasks.json
5-
!.vscode/launch.json
6-
!.vscode/extensions.json
2+
.vscode
73
*.code-workspace
84

95
# Local History for Visual Studio Code

.gitleaks.toml

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[allowlist]
2+
description = "file allow lists"
3+
paths = [
4+
'''gitleaks.toml''',
5+
'''plugin-(.*?)-tool.cjs''',
6+
'''yarn-(.*?)(.cjs)''',
7+
]
8+
19
# ----- BEGIN Agora AppId -----
210
[[rules]]
311
id = "agora-appid"

ci/config/terra_config.yaml

-10
This file was deleted.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"ts",
1111
"types",
1212
"scripts",
13+
"!scripts/terra",
1314
"gulpfile.js",
1415
"CHANGELOG.md",
1516
"!**/__tests__"
@@ -136,6 +137,6 @@
136137
},
137138
"agora_electron": {
138139
"iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.1.1.22-build.1_DCG_Windows_Video_20231123_0644.zip",
139-
"iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.1.1.22-build.1_DCG_Mac_Video_20231123_0644.zip"
140+
"iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.1.1.124-build.1_DCG_Mac_Video_20231204_0201.zip"
140141
}
141142
}

scripts/terra/.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.terra
2+
node_modules
3+
4+
# Yarn
5+
.yarn/*
6+
!.yarn/patches
7+
!.yarn/plugins
8+
!.yarn/releases
9+
!.yarn/sdks
10+
!.yarn/versions

scripts/terra/.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18

scripts/terra/.yarn/releases/yarn-4.0.1.cjs

+893
Large diffs are not rendered by default.

scripts/terra/.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.0.1.cjs

scripts/terra/code_config.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
parsers:
2+
- name: LegacyCXXParser
3+
package: '@agoraio-extensions/terra-legacy-cxx-parser'
4+
args:
5+
includeHeaderDirs:
6+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include'
7+
parseFiles:
8+
include:
9+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/*.h'
10+
exclude:
11+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/AgoraRefPtr.h'
12+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/time_utils.h'
13+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/AgoraOptional.h'
14+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/AgoraRefPtr.h'
15+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/IAgoraH265Transcoder.h'
16+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/IAgoraMediaComponentFactory.h'
17+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/include/IAgoraParameter.h'
18+
customHeaders:
19+
- '@agoraio-extensions/terra_shared_configs:headers/rtc_4.1.1.22/custom_headers/*.h'
20+
language: ts
21+
definesMacros:
22+
- __ELECTRON__
23+
legacyRenders:
24+
- TsInterfaceRender
25+
- TsImplRender
26+

scripts/terra/comment_config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
renderers:
2+
- name: IrisDocRenderer
3+
package: '@agoraio-extensions/terra_shared_configs'
4+
args:
5+
language: ts
6+
fmtConfig: fmt_ts.yaml
7+
exportFilePath: ../../ts/AgoraSdk.ts
8+
templateUrl: https://github.com/AgoraIO/agora_doc_source/releases/download/master-build/electron_ng_json_template_en.json

scripts/terra/generate-code.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
set -x
4+
5+
MY_PATH=$(realpath $(dirname "$0"))
6+
PROJECT_ROOT=$(realpath ${MY_PATH}/../..)
7+
8+
npm exec terra -- run \
9+
--config ${PROJECT_ROOT}/scripts/terra/code_config.yaml \
10+
--output-dir=${PROJECT_ROOT}/ts/Private
11+
12+
cd ${PROJECT_ROOT}
13+
14+
npm run build:ts-interface
15+
16+
npm run lint -- --fix

scripts/terra/generate-comment.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
set -x
4+
5+
MY_PATH=$(realpath $(dirname "$0"))
6+
PROJECT_ROOT=$(realpath ${MY_PATH}/../..)
7+
8+
npm exec terra -- run \
9+
--config ${PROJECT_ROOT}/scripts/terra/comment_config.yaml \
10+
--output-dir=${PROJECT_ROOT}/ts/Private
11+
12+
cd ${PROJECT_ROOT}
13+
14+
npm run lint -- --fix

scripts/terra/package.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "terra",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "MIT",
11+
"devDependencies": {
12+
"@types/node": "^20.6.0"
13+
},
14+
"dependencies": {
15+
"@agoraio-extensions/terra": "[email protected]:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra",
16+
"@agoraio-extensions/terra-core": "[email protected]:AgoraIO-Extensions/terra.git#commit=5dd8149d5ab9f3b472b7715916b6217f9745f066&workspace=terra-core",
17+
"@agoraio-extensions/terra-legacy-cxx-parser": "[email protected]:AgoraIO-Extensions/terra-legacy-cxx-parser.git#commit=5455afd2c5e29013d9a3cb8d06150c162450a5ed",
18+
"@agoraio-extensions/terra_shared_configs": "[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=ea5b0574dace3a434ad87dbeac2d43a5b62ef636",
19+
"ts-node": "^10.9.1",
20+
"typescript": "^5.1.6"
21+
},
22+
"packageManager": "[email protected]"
23+
}

0 commit comments

Comments
 (0)