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.2.136 #1075

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
76 changes: 75 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
types: [ published ]

jobs:
build:
build-jenkins:
runs-on: ubuntu-latest
steps:
- name: Build
Expand All @@ -32,3 +32,77 @@ jobs:
curl -X POST -sS -D- -o/dev/null ${{secrets.JENKINS_BUILD_URL}} \
-H 'Content-Type: application/json' \
-d "{\"branch\": \"${{github.ref_name}}\", \"type\": \"${type}\"}"
build-windows:
if: ${{ inputs.type == 'demo' }}
strategy:
matrix:
arch: [ ia32, x64 ]
runs-on: windows-latest
env:
npm_config_arch: ${{ matrix.arch }}
npm_config_agora_electron_arch: ${{ matrix.arch }}
npm_config_agora_electron_sdk_arch: ${{ matrix.arch }}
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Build SDK
run: |
yarn totalBuild
yarn zipBuild
yarn link
- name: Build Example
run: |
yarn install
yarn link agora-electron-sdk
yarn dist:win --${{ matrix.arch }}
working-directory: example

- uses: actions/upload-artifact@v3
with:
name: AgoraRtcNgExample-win-${{ matrix.arch }}
path: |
example/dist/Agora-Electron-API-Example-*-win.zip
build-mac:
if: ${{ inputs.type == 'demo' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

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

- name: Build SDK
run: |
yarn totalBuild
yarn zipBuild
yarn link
- name: Build Example
run: |
yarn install
yarn link agora-electron-sdk
yarn dist:mac
env:
USE_HARD_LINKS: false
working-directory: example

- uses: actions/upload-artifact@v3
with:
name: AgoraRtcNgExample-mac
path: |
example/dist/Agora-Electron-API-Example-*-mac.zip
notification:
runs-on: ubuntu-latest
needs: [ build-windows, build-mac ]
steps:
- run: |
curl -X POST "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=${{ secrets.WECHAT_KEY }}" -d '{"msgtype":"text","text":{"content":"Electron Example:\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}}'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ $ npm install #or yarn
$ npm install --agora_electron_sdk_pre_built=false

# build 32 bit architecture on Windows
$ npm install --verbose --agora_electron_sdk_pre_built=false --agora_electron_sdk_arch=ia32
$ npm install --agora_electron_sdk_pre_built=false --agora_electron_sdk_arch=ia32

# build 64 bit architecture on Windows
$ npm install --verbose --agora_electron_sdk_pre_built=false --agora_electron_sdk_arch=x64
$ npm install --agora_electron_sdk_pre_built=false --agora_electron_sdk_arch=x64
```

## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/AgoraIO-Extensions/Electron-SDK/pulls)
Expand Down
6 changes: 3 additions & 3 deletions ci/electron-sdk-build-mac-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/
rm -rf node_modules
rm -rf sdk
rm -rf tmp
# npm install --verbose
# npm install
#
# Example 2
npm config set agora_electron_sdk_pre_built false
npm install --verbose
npm run totalBuild --verbose
npm install
npm run totalBuild
npm run zipBuild
npm config delete agora_electron_sdk_pre_built
#
Expand Down
8 changes: 4 additions & 4 deletions ci/electron-sdk-build-windows-release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ call npm config list
call npm config set agora_electron_sdk_pre_built false
if %1 == ia32 (
echo sdk_ia32
call npm install --verbose --agora_electron_sdk_arch=ia32
call npm run totalBuild --verbose --agora_electron_sdk_arch=ia32
call npm install --agora_electron_sdk_arch=ia32
call npm run totalBuild --agora_electron_sdk_arch=ia32
)
if %1 == x64 (
echo sdk_x64
call npm install --verbose --agora_electron_sdk_arch=x64
call npm run totalBuild --verbose --agora_electron_sdk_arch=x64
call npm install --agora_electron_sdk_arch=x64
call npm run totalBuild --agora_electron_sdk_arch=x64
)
call npm config delete agora_electron_sdk_pre_built

Expand Down
4 changes: 1 addition & 3 deletions ci/packager-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ packExample() {
export USE_HARD_LINKS=false
yarn dist:mac

pushd dist/mac
zip -ry $(pwd)/../../../${outterZipName} Agora-Electron-API-Example.app
popd
cp -f dist/Agora-Electron-API-Example-*.zip ../${outterZipName}
popd
}

Expand Down
37 changes: 21 additions & 16 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,35 @@
"start": "electron-webpack dev",
"compile": "electron-webpack",
"rebuild": "electron-rebuild -f -o ref-napi",
"dist": "yarn compile && electron-builder",
"dist:mac": "yarn dist --dir -c.compression=store -c.mac.identity=null",
"dist:win32": "yarn compile && electron-builder --publish never --win --ia32",
"dist:win64": "yarn compile && electron-builder --publish never --win --x64",
"switchEnv:win32": "cd .. && @powershell -NoProfile -ExecutionPolicy Unrestricted -Command ./ci/packager-win.ps1 1 switchEnv",
"switchEnv:win64": "cd .. && @powershell -NoProfile -ExecutionPolicy Unrestricted -Command ./ci/packager-win.ps1 2 switchEnv"
"dist": "npm run compile && electron-builder",
"dist:mac": "npm run dist -- --mac",
"dist:win": "npm run dist -- --win",
"dist:win32": "npm run dist:win -- --ia32",
"dist:win64": "npm run dist:win -- --x64"
},
"build": {
"asar": false,
"appId": "agora.io.ElectronApiExample",
"asar": true,
"asarUnpack": [
"node_modules/agora-electron-sdk"
],
"buildDependenciesFromSource": true,
"compression": "normal",
"productName": "Agora-Electron-API-Example",
"appId": "agora.io.ElectronApiExample",
"publish": [],
"files": [
"!*.log"
],
"mac": {
"target": [
"dir"
],
"type": "distribution",
"hardenedRuntime": true,
"entitlements": "assets/entitlements.mac.plist",
"entitlementsInherit": "assets/entitlements.mac.plist",
"gatekeeperAssess": false
"gatekeeperAssess": false,
"hardenedRuntime": true,
"identity": null,
"target": [
"zip"
],
"type": "distribution"
},
"dmg": {
"contents": [
Expand All @@ -52,10 +57,10 @@
]
},
"linux": {
"category": "Development",
"target": [
"AppImage"
],
"category": "Development"
]
},
"directories": {
"buildResources": "assets"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agora-electron-sdk",
"version": "4.2.2-build.134-rc.1",
"version": "4.2.2-build.136-rc.1",
"description": "agora-electron-sdk",
"main": "js/AgoraSdk",
"types": "types/AgoraSdk.d.ts",
Expand Down Expand Up @@ -134,7 +134,7 @@
"yuv-canvas": "1.2.6"
},
"agora_electron": {
"iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.2.2.134-build.1_DCG_Windows_Video_20230907_0345.zip",
"iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.2.2.134-build.1_DCG_Mac_Video_20230907_0345.zip"
"iris_sdk_win": "https://download.agora.io/sdk/release/iris_4.2.2.136-build.1_DCG_Windows_Video_20230922_0351.zip",
"iris_sdk_mac": "https://download.agora.io/sdk/release/iris_4.2.2.136-build.1_DCG_Mac_Video_20230922_0351.zip"
}
}