Skip to content

Commit 1d229ba

Browse files
Build explicit Ubuntu versions, add Ubuntu 22.04 support (#229)
Adjust Linux release to build against explicit Ubuntu 22.04 and 24.04 runners instead of ubuntu-latest, and publish explicit release artifacts. Old "linux" artifact repackaged from 24.04 to maintain backwards-compatibility.
1 parent b5caa3b commit 1d229ba

3 files changed

Lines changed: 79 additions & 18 deletions

File tree

‎.github/workflows/builds.yml‎

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,20 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
include:
35-
- os: ubuntu-latest
36-
name: linux-x64
35+
- os: ubuntu-22.04
36+
name: ubuntu-22.04-x64
37+
build_cmd: ./build.sh release-examples
38+
build_dir: build-release
39+
- os: ubuntu-22.04-arm
40+
name: ubuntu-22.04-arm64
41+
build_cmd: ./build.sh release-examples
42+
build_dir: build-release
43+
- os: ubuntu-24.04
44+
name: ubuntu-24.04-x64
3745
build_cmd: ./build.sh release-examples
3846
build_dir: build-release
3947
- os: ubuntu-24.04-arm
40-
name: linux-arm64
48+
name: ubuntu-24.04-arm64
4149
build_cmd: ./build.sh release-examples
4250
build_dir: build-release
4351
- os: macos-26-xlarge
@@ -166,9 +174,9 @@ jobs:
166174
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
167175
with:
168176
path: client-sdk-rust/target/
169-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
177+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
170178
restore-keys: |
171-
${{ runner.os }}-${{ matrix.name }}-cargo-target-
179+
${{ matrix.os }}-${{ matrix.name }}-cargo-target-
172180
173181
# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
174182
# artifacts in webrtc-sys are not compatible across those bumps.
@@ -208,7 +216,7 @@ jobs:
208216
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
209217
with:
210218
path: client-sdk-rust/target/
211-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
219+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
212220

213221
- name: Save vcpkg binary cache
214222
if: runner.os == 'Windows' && steps.cache-vcpkg-binary.outputs.cache-hit != 'true'
@@ -328,6 +336,28 @@ jobs:
328336
${{ matrix.build_dir }}/bin/
329337
retention-days: 7
330338

339+
- name: Upload deprecated linux-x64 alias artifact
340+
if: matrix.name == 'ubuntu-24.04-x64'
341+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
342+
with:
343+
name: livekit-sdk-linux-x64
344+
path: |
345+
${{ matrix.build_dir }}/lib/
346+
${{ matrix.build_dir }}/include/
347+
${{ matrix.build_dir }}/bin/
348+
retention-days: 7
349+
350+
- name: Upload deprecated linux-arm64 alias artifact
351+
if: matrix.name == 'ubuntu-24.04-arm64'
352+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
353+
with:
354+
name: livekit-sdk-linux-arm64
355+
path: |
356+
${{ matrix.build_dir }}/lib/
357+
${{ matrix.build_dir }}/include/
358+
${{ matrix.build_dir }}/bin/
359+
retention-days: 7
360+
331361
# ---------- Cleanup ----------
332362
- name: Clean after build (best-effort)
333363
if: always()

‎.github/workflows/make-release.yml‎

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
include:
27-
- os: ubuntu-latest
28-
name: linux-x64
27+
- os: ubuntu-22.04
28+
name: ubuntu-22.04-x64
29+
generator: Ninja
30+
- os: ubuntu-22.04-arm
31+
name: ubuntu-22.04-arm64
32+
generator: Ninja
33+
- os: ubuntu-24.04
34+
name: ubuntu-24.04-x64
2935
generator: Ninja
3036
- os: ubuntu-24.04-arm
31-
name: linux-arm64
37+
name: ubuntu-24.04-arm64
3238
generator: Ninja
3339
- os: macos-26-xlarge
3440
name: macos-arm64
@@ -157,14 +163,16 @@ jobs:
157163
restore-keys: |
158164
${{ runner.os }}-${{ matrix.name }}-cargo-registry-
159165
166+
# Compiled target/ artifacts are glibc-bound and must not restore across
167+
# Ubuntu major versions (e.g. 24.04 → 22.04 → GLIBC_2.39 not found).
160168
- name: Cache cargo target
161169
id: cache-cargo-target
162170
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
163171
with:
164172
path: client-sdk-rust/target/
165-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
173+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
166174
restore-keys: |
167-
${{ runner.os }}-${{ matrix.name }}-cargo-target-
175+
${{ matrix.os }}-${{ matrix.name }}-cargo-target-
168176
169177
# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
170178
# artifacts in webrtc-sys are not compatible across those bumps.
@@ -413,15 +421,30 @@ jobs:
413421
echo "Artifacts downloaded:"
414422
ls -la
415423
416-
# Create tar.gz for Linux and macOS
417-
for platform in linux-x64 linux-arm64 macos-arm64 macos-x64; do
424+
# Create tar.gz for Ubuntu and macOS
425+
for platform in ubuntu-22.04-x64 ubuntu-22.04-arm64 ubuntu-24.04-x64 ubuntu-24.04-arm64 macos-arm64 macos-x64; do
418426
dirName="livekit-sdk-${platform}-${VERSION}"
419427
if [[ -d "${dirName}" ]]; then
420428
echo "Creating archive for ${platform}..."
421429
tar -czf "${{ github.workspace }}/release-assets/${dirName}.tar.gz" "${dirName}"
422430
echo "Created: ${dirName}.tar.gz"
423431
fi
424432
done
433+
434+
# Deprecated compatibility aliases for existing Linux release consumers.
435+
# Repack the Ubuntu 24.04 artifacts so their extracted directory
436+
# retains the legacy Linux name.
437+
for pair in "ubuntu-24.04-x64:linux-x64" "ubuntu-24.04-arm64:linux-arm64"; do
438+
src="livekit-sdk-${pair%%:*}-${VERSION}"
439+
dst="livekit-sdk-${pair#*:}-${VERSION}"
440+
if [[ -d "${src}" ]]; then
441+
cp -R "${src}" "${dst}"
442+
tar -czf "${{ github.workspace }}/release-assets/${dst}.tar.gz" "${dst}"
443+
echo "Created compatibility archive: ${dst}.tar.gz"
444+
else
445+
echo "WARNING: Skipping compatibility archive; ${src} was not downloaded."
446+
fi
447+
done
425448
426449
# Create zip for Windows
427450
dirName="livekit-sdk-windows-x64-${VERSION}"

‎.github/workflows/tests.yml‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,17 @@ jobs:
139139
fail-fast: false
140140
matrix:
141141
include:
142-
- os: ubuntu-latest
143-
name: linux-x64
142+
- os: ubuntu-22.04
143+
name: ubuntu-22.04-x64
144+
e2e-testing: true
145+
- os: ubuntu-22.04-arm
146+
name: ubuntu-22.04-arm64
147+
e2e-testing: true
148+
- os: ubuntu-24.04
149+
name: ubuntu-24.04-x64
144150
e2e-testing: true
145151
- os: ubuntu-24.04-arm
146-
name: linux-arm64
152+
name: ubuntu-24.04-arm64
147153
e2e-testing: true
148154
- os: macos-26-xlarge
149155
name: macos-arm64
@@ -261,14 +267,16 @@ jobs:
261267
restore-keys: |
262268
${{ runner.os }}-${{ matrix.name }}-cargo-registry-
263269
270+
# Compiled target/ artifacts are glibc-bound and must not restore across
271+
# Ubuntu major versions (e.g. 24.04 → 22.04 → GLIBC_2.39 not found).
264272
- name: Restore cargo target
265273
id: cache-cargo-target
266274
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
267275
with:
268276
path: client-sdk-rust/target/
269-
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
277+
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
270278
restore-keys: |
271-
${{ runner.os }}-${{ matrix.name }}-cargo-target-
279+
${{ matrix.os }}-${{ matrix.name }}-cargo-target-
272280
273281
# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
274282
# artifacts in webrtc-sys are not compatible across those bumps.

0 commit comments

Comments
 (0)