Build WebRTC Audio DSP for FFM #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build WebRTC Audio DSP for FFM | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install depot_tools | |
| shell: powershell | |
| run: | | |
| Invoke-WebRequest -Uri "https://storage.googleapis.com/chrome-infra/depot_tools.zip" -OutFile depot_tools.zip | |
| Expand-Archive -Path depot_tools.zip -DestinationPath depot_tools | |
| echo "$pwd\depot_tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| echo "DEPOT_TOOLS_WIN_TOOLCHAIN=0" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Fetch WebRTC Source | |
| shell: cmd | |
| run: | | |
| mkdir webrtc_build | |
| cd webrtc_build | |
| fetch --nohooks webrtc | |
| cd src | |
| gclient sync | |
| - name: Inject C Wrapper and GN Targets | |
| run: | | |
| # 假设你的 ipynb 脚本保存在仓库根目录下的 scripts 文件夹中 | |
| # 如果你更倾向于直接将 ipynb 转换为 py 运行,可以在此处使用 jupyter-nbconvert | |
| pip install nbconvert | |
| jupyter nbconvert --to script scripts/generate_webrtc_wrapper.ipynb | |
| python scripts/generate_webrtc_wrapper.py | |
| working-directory: ${{ github.workspace }} | |
| - name: Compile WebRTC DLL | |
| shell: cmd | |
| run: | | |
| cd webrtc_build\src | |
| set GN_ARGS=target_os="win" is_debug=false is_component_build=false rtc_include_tests=false rtc_build_examples=false rtc_build_tools=false rtc_enable_video=false rtc_enable_protobuf=false rtc_use_x11=false rtc_include_ilbc=false rtc_include_opus=false rtc_include_internal_audio_device=false | |
| call gn gen out/Release "--args=%GN_ARGS%" | |
| call ninja -C out/Release webrtc_ffm | |
| - name: Upload Output Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: webrtc-ffm-windows | |
| path: | | |
| webrtc_build/src/out/Release/webrtc_ffm.dll | |
| webrtc_build/src/ffm_wrapper/webrtc_ffm.h |