Skip to content
Open
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
47 changes: 41 additions & 6 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux-x64
- os: ubuntu-22.04
name: ubuntu-22.04-x64
build_cmd: ./build.sh release-examples
build_dir: build-release
- os: ubuntu-22.04-arm
name: ubuntu-22.04-arm64
build_cmd: ./build.sh release-examples
build_dir: build-release
- os: ubuntu-24.04
name: ubuntu-24.04-x64
build_cmd: ./build.sh release-examples
build_dir: build-release
- os: ubuntu-24.04-arm
name: linux-arm64
name: ubuntu-24.04-arm64
build_cmd: ./build.sh release-examples
build_dir: build-release
- os: macos-26-xlarge
Expand Down Expand Up @@ -161,14 +169,19 @@ jobs:
# step that runs AFTER the "Clean after build" cleanup wipes target/debug
# and target/release, which is why the old cache was always ~empty. The
# restore/save split lets us snapshot the populated target/ before cleanup.
#
# Key on matrix.os (runner image), not runner.os. runner.os is just
# "Linux" for both ubuntu-22.04 and ubuntu-24.04, and restored
# build-scripts / .so files from a newer glibc host fail with
# GLIBC_2.39 not found on the older image.
- name: Restore cargo target
id: cache-cargo-target
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: client-sdk-rust/target/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-target-
${{ matrix.os }}-${{ matrix.name }}-cargo-target-

# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
# artifacts in webrtc-sys are not compatible across those bumps.
Expand Down Expand Up @@ -208,7 +221,7 @@ jobs:
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: client-sdk-rust/target/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}

- name: Save vcpkg binary cache
if: runner.os == 'Windows' && steps.cache-vcpkg-binary.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -328,6 +341,28 @@ jobs:
${{ matrix.build_dir }}/bin/
retention-days: 7

- name: Upload deprecated linux-x64 alias artifact
if: matrix.name == 'ubuntu-24.04-x64'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: livekit-sdk-linux-x64
path: |
${{ matrix.build_dir }}/lib/
${{ matrix.build_dir }}/include/
${{ matrix.build_dir }}/bin/
retention-days: 7

- name: Upload deprecated linux-arm64 alias artifact
if: matrix.name == 'ubuntu-24.04-arm64'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: livekit-sdk-linux-arm64
path: |
${{ matrix.build_dir }}/lib/
${{ matrix.build_dir }}/include/
${{ matrix.build_dir }}/bin/
retention-days: 7

# ---------- Cleanup ----------
- name: Clean after build (best-effort)
if: always()
Expand Down
40 changes: 33 additions & 7 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux-x64
- os: ubuntu-22.04
name: ubuntu-22.04-x64
generator: Ninja
- os: ubuntu-22.04-arm
name: ubuntu-22.04-arm64
generator: Ninja
- os: ubuntu-24.04
name: ubuntu-24.04-x64
generator: Ninja
- os: ubuntu-24.04-arm
name: linux-arm64
name: ubuntu-24.04-arm64
generator: Ninja
- os: macos-26-xlarge
name: macos-arm64
Expand Down Expand Up @@ -157,14 +163,17 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-registry-

# Key on matrix.os (runner image), not runner.os — see builds.yml.
# Compiled target/ artifacts are glibc-bound and must not restore across
# Ubuntu major versions (e.g. 24.04 → 22.04 → GLIBC_2.39 not found).
- name: Cache cargo target
id: cache-cargo-target
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: client-sdk-rust/target/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-target-
${{ matrix.os }}-${{ matrix.name }}-cargo-target-

# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
# artifacts in webrtc-sys are not compatible across those bumps.
Expand Down Expand Up @@ -413,15 +422,21 @@ jobs:
echo "Artifacts downloaded:"
ls -la

# Create tar.gz for Linux and macOS
for platform in linux-x64 linux-arm64 macos-arm64 macos-x64; do
# Create tar.gz for Ubuntu and macOS
for platform in ubuntu-22.04-x64 ubuntu-22.04-arm64 ubuntu-24.04-x64 ubuntu-24.04-arm64 macos-arm64 macos-x64; do
dirName="livekit-sdk-${platform}-${VERSION}"
if [[ -d "${dirName}" ]]; then
echo "Creating archive for ${platform}..."
tar -czf "${{ github.workspace }}/release-assets/${dirName}.tar.gz" "${dirName}"
echo "Created: ${dirName}.tar.gz"
fi
done

# Deprecated compatibility aliases for existing Linux release consumers.
cp "${{ github.workspace }}/release-assets/livekit-sdk-ubuntu-24.04-x64-${VERSION}.tar.gz" \
"${{ github.workspace }}/release-assets/livekit-sdk-linux-x64-${VERSION}.tar.gz"
cp "${{ github.workspace }}/release-assets/livekit-sdk-ubuntu-24.04-arm64-${VERSION}.tar.gz" \
"${{ github.workspace }}/release-assets/livekit-sdk-linux-arm64-${VERSION}.tar.gz"
Comment on lines +435 to +439

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Compatibility Linux download unpacks into a differently named folder than before

The compatibility Linux download is produced by copying the Ubuntu 24.04 archive file (cp at .github/workflows/make-release.yml:436-439) instead of repacking it, so anyone who unzips it now gets a folder with an unexpected name and their scripts stop finding the files.
Impact: Existing automation that downloads the Linux release and expects the old folder name breaks silently on the next release, defeating the purpose of the compatibility alias.

Archive top-level directory name mismatch in alias creation

Previously the loop created livekit-sdk-linux-x64-${VERSION}.tar.gz by running tar -czf ... livekit-sdk-linux-x64-${VERSION}, so the archive's single top-level entry was livekit-sdk-linux-x64-${VERSION}/.

Now the alias is a byte-for-byte copy of livekit-sdk-ubuntu-24.04-x64-${VERSION}.tar.gz, whose top-level entry is livekit-sdk-ubuntu-24.04-x64-${VERSION}/. Only the file name matches the old convention; the extracted directory does not. Same for the arm64 alias.

A fix is to create the alias by tarring the downloaded artifact directory under the legacy name, e.g. copying/renaming artifacts/livekit-sdk-ubuntu-24.04-x64-${VERSION} to livekit-sdk-linux-x64-${VERSION} before tarring, or using tar --transform to rewrite the leading path component.

Suggested change
# Deprecated compatibility aliases for existing Linux release consumers.
cp "${{ github.workspace }}/release-assets/livekit-sdk-ubuntu-24.04-x64-${VERSION}.tar.gz" \
"${{ github.workspace }}/release-assets/livekit-sdk-linux-x64-${VERSION}.tar.gz"
cp "${{ github.workspace }}/release-assets/livekit-sdk-ubuntu-24.04-arm64-${VERSION}.tar.gz" \
"${{ github.workspace }}/release-assets/livekit-sdk-linux-arm64-${VERSION}.tar.gz"
# Deprecated compatibility aliases for existing Linux release consumers.
# Repack (not copy) so the extracted top-level directory keeps the legacy name.
for pair in "ubuntu-24.04-x64:linux-x64" "ubuntu-24.04-arm64:linux-arm64"; do
src="livekit-sdk-${pair%%:*}-${VERSION}"
dst="livekit-sdk-${pair#*:}-${VERSION}"
if [[ -d "${src}" ]]; then
cp -r "${src}" "${dst}"
tar -czf "${{ github.workspace }}/release-assets/${dst}.tar.gz" "${dst}"
rm -rf "${dst}"
fi
done
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +435 to +439

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Release publishing aborts if an Ubuntu 24.04 build archive is missing

The compatibility Linux downloads are created without first checking that the Ubuntu 24.04 archives exist (cp at .github/workflows/make-release.yml:436-439), so if either is absent the whole release step stops and no assets are published at all.
Impact: A single missing Linux build turns a partial release into no release, including the macOS and Windows assets that were built fine.

Unguarded cp under `set -e` semantics

Every other archive creation in this step is guarded by if [[ -d "${dirName}" ]], so a missing artifact is skipped. GitHub runs shell: bash steps with -eo pipefail, so a failing cp aborts the step before the Windows zip is created and before softprops/action-gh-release runs.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.


# Create zip for Windows
dirName="livekit-sdk-windows-x64-${VERSION}"
Expand All @@ -441,6 +456,17 @@ jobs:
name: v${{ steps.version.outputs.version }}
draft: true
files: ${{ github.workspace }}/release-assets/*
body: |
## Linux assets

Prefer the explicit Ubuntu assets:

- `livekit-sdk-ubuntu-22.04-x64`
- `livekit-sdk-ubuntu-22.04-arm64`
- `livekit-sdk-ubuntu-24.04-x64`
- `livekit-sdk-ubuntu-24.04-arm64`

`livekit-sdk-linux-x64` and `livekit-sdk-linux-arm64` are deprecated aliases of the Ubuntu 24.04 builds and will be removed in a future release.
generate_release_notes: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,17 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: linux-x64
- os: ubuntu-22.04
name: ubuntu-22.04-x64
e2e-testing: true
- os: ubuntu-22.04-arm
name: ubuntu-22.04-arm64
e2e-testing: true
- os: ubuntu-24.04
name: ubuntu-24.04-x64
e2e-testing: true
- os: ubuntu-24.04-arm
name: linux-arm64
name: ubuntu-24.04-arm64
e2e-testing: true
- os: macos-26-xlarge
name: macos-arm64
Expand Down Expand Up @@ -261,14 +267,17 @@ jobs:
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-registry-

# Key on matrix.os (runner image), not runner.os — see builds.yml.
# Compiled target/ artifacts are glibc-bound and must not restore across
# Ubuntu major versions (e.g. 24.04 → 22.04 → GLIBC_2.39 not found).
- name: Restore cargo target
id: cache-cargo-target
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: client-sdk-rust/target/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
key: ${{ matrix.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-target-
${{ matrix.os }}-${{ matrix.name }}-cargo-target-

# restore-keys can hydrate target/ from a prior submodule SHA. cxxbridge
# artifacts in webrtc-sys are not compatible across those bumps.
Expand Down
Loading