Skip to content

Commit 10f3580

Browse files
authored
chore: Upgrade libwebrtc to m137. (#696)
* chore: Upgrade libwebrtc to m137. * fix compile issue for linux. * fix. * Add g++ for aarch64 to Ubuntu dependencies * fix build for linux arm64. * Remove goma usage and switch to autoninja * fix android build. * fix build on linux arm64 for gcc. * Update Windows OS version in workflow configuration * Add GCC 14 installation steps for Ubuntu * Update webrtc-builds.yml * Change Windows OS to latest and add SDK installation * Update webrtc-builds.yml * Update webrtc-builds.yml * Update webrtc-builds.yml * Update webrtc-builds.yml * Update build_linux.sh * Update webrtc-builds.yml * Update webrtc-builds.yml * Update build_windows.cmd * cargo fmt. * Update build_windows.cmd * clean. * fix wgpu_room crash on macOS 26. * add lldb launch for wgpu_room. * Update GitHub Actions workflow for Windows and Python * Update webrtc-builds.yml * Update webrtc-builds.yml * bump version for webrtc libraries. * fix build for win arm64. * fix android ffi compile issue.
1 parent bda4a66 commit 10f3580

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+970
-431
lines changed

.github/workflows/webrtc-builds.yml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
matrix:
2727
target:
2828
- name: win
29-
os: windows-latest
29+
os: windows-2022
3030
cmd: .\build_windows.cmd
3131
arch: x64
3232

3333
- name: win
34-
os: windows-latest
34+
os: windows-2022
3535
cmd: .\build_windows.cmd
3636
arch: arm64
3737

@@ -104,17 +104,38 @@ jobs:
104104
echo "OutName: ${{ steps.setup.outputs.OUT }}"
105105
echo "OutZip: ${{ steps.setup.outputs.ZIP }}"
106106
107-
- uses: actions/checkout@v4
108-
with:
109-
submodules: true
110-
111-
- uses: actions/setup-python@v4
107+
- uses: actions/checkout@v5
108+
- uses: actions/setup-python@v5
112109

113110
- name: install setuptools (none-macOS)
114111
if: ${{ matrix.target.os != 'macos-latest' }}
115112
run: |
116113
pip3 install setuptools # pkg_resources is sometimes not found?
117114
115+
- name: Add GCC PPA and install GCC 14
116+
if: ${{ matrix.target.os == 'ubuntu-latest' }}
117+
run: |
118+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
119+
sudo apt update
120+
sudo apt install gcc-14 g++-14 g++-14-aarch64-linux-gnu -y
121+
122+
- name: Verify GCC 14 installation
123+
if: ${{ matrix.target.os == 'ubuntu-latest' }}
124+
run: |
125+
gcc-14 --version
126+
g++-14 --version
127+
aarch64-linux-gnu-g++-14 --version
128+
129+
- name: Set GCC 14 as default (optional)
130+
if: ${{ matrix.target.os == 'ubuntu-latest' }}
131+
run: |
132+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 140 --slave /usr/bin/g++ g++ /usr/bin/g++-14
133+
sudo update-alternatives --config gcc
134+
gcc --version
135+
sudo update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-gcc-14 140 --slave /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ /usr/bin/aarch64-linux-gnu-g++-14
136+
sudo update-alternatives --config aarch64-linux-gnu-gcc
137+
aarch64-linux-gnu-gcc --version
138+
118139
- name: Install linux dependencies
119140
if: ${{ matrix.target.os == 'ubuntu-latest' }}
120141
run: |
@@ -126,7 +147,7 @@ jobs:
126147
run: brew install ninja
127148

128149
- name: Install windows dependencies
129-
if: ${{ matrix.target.os == 'windows-latest' }}
150+
if: ${{ matrix.target.os == 'windows-2022' }}
130151
run: |
131152
Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/latest/download/ninja-win.zip" -OutFile ninja.zip
132153
Expand-Archive -Path ninja.zip -DestinationPath ${{ github.workspace }}\ninja
@@ -145,13 +166,13 @@ jobs:
145166
working-directory: webrtc-sys/libwebrtc
146167

147168
- name: Zip artifact (Unix)
148-
if: ${{ matrix.target.os != 'windows-latest' }}
169+
if: ${{ matrix.target.os != 'windows-2022' }}
149170
run: |
150171
cd webrtc-sys/libwebrtc
151172
zip ${{ github.workspace }}/${{ steps.setup.outputs.ZIP }} ${{ steps.setup.outputs.OUT }} -r
152173
153174
- name: Zip artifact (Windows)
154-
if: ${{ matrix.target.os == 'windows-latest' }}
175+
if: ${{ matrix.target.os == 'windows-2022' }}
155176
run: Compress-Archive -Path .\webrtc-sys\libwebrtc\${{ steps.setup.outputs.OUT }} -DestinationPath ${{ steps.setup.outputs.ZIP }}
156177

157178
- name: Upload artifacts

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "lldb",
6+
"request": "launch",
7+
"name": "wgpu_room(debug)",
8+
"program": "${workspaceFolder}/examples/target/debug/wgpu_room",
9+
"preLaunchTask": "build"
10+
}
11+
]
12+
}

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"type": "shell",
7+
"command": "cargo",
8+
"args": [
9+
"build"
10+
],
11+
"options": {
12+
"env": {
13+
// cd webrtc-sys/libwebrtc && ./build_macos.sh --arch arm64 --profile debug
14+
"LK_CUSTOM_WEBRTC": "${workspaceFolder}/webrtc-sys/libwebrtc/mac-arm64-debug"
15+
},
16+
"cwd": "${workspaceFolder}/examples"
17+
},
18+
"dependsOn": ["libwebrtc-build"]
19+
},
20+
{
21+
"label": "libwebrtc-build",
22+
"type": "shell",
23+
"command": "./build_macos.sh",
24+
"args": [
25+
"--arch", "arm64",
26+
"--profile", "debug"
27+
],
28+
"options": {
29+
"cwd": "${workspaceFolder}/webrtc-sys/libwebrtc"
30+
},
31+
}
32+
]
33+
}

0 commit comments

Comments
 (0)