Skip to content
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
39 changes: 36 additions & 3 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ permissions:

env:
CARGO_TERM_COLOR: always
# sccache caches rustc invocations across runs. RUSTC_WRAPPER is exported
# only after the setup step verifies the GHA cache backend is reachable, so
# transient cache backend failures fall back to uncached rustc instead of
# failing the build.
SCCACHE_GHA_ENABLED: "true"
# Pinned commit for cpp-example-collection smoke build (https://github.com/livekit-examples/cpp-example-collection)
CPP_EXAMPLE_COLLECTION_REF: 46083ea4e5d3def8e44a53148c2c7800131efca0
# vcpkg binary caching for Windows
Expand Down Expand Up @@ -158,11 +163,39 @@ jobs:
if: matrix.name == 'macos-x64'
run: rustup target add x86_64-apple-darwin

# ---------- Setup sccache ----------
- name: Setup sccache
uses: mozilla-actions/sccache-action@054db53350805f83040bf3e6e9b8cf5a139aa7c9 # v0.0.7

- name: Enable sccache wrapping (probe first)
shell: bash
run: |
if sccache --start-server >/dev/null 2>&1; then
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "::notice::sccache enabled (RUSTC_WRAPPER=sccache)"
else
echo "::warning::sccache backend unreachable; building without compile cache this run"
fi

# ---------- Cache Cargo ----------
- name: Cache Cargo
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Cache cargo registry
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-registry-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-registry-

- name: Cache cargo target
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
workspaces: client-sdk-rust -> target
path: client-sdk-rust/target/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-target-

# ---------- Build environment setup ----------
- name: Set Linux build environment
Expand Down
37 changes: 33 additions & 4 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:

env:
CARGO_TERM_COLOR: always
# sccache caches rustc invocations across runs. RUSTC_WRAPPER is exported
# only after the setup step verifies the GHA cache backend is reachable, so
# transient cache backend failures fall back to uncached rustc instead of
# failing the build.
SCCACHE_GHA_ENABLED: "true"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-md
Expand Down Expand Up @@ -135,15 +140,39 @@ jobs:
if: matrix.name == 'macos-x64'
run: rustup target add x86_64-apple-darwin

# ---------- Setup sccache ----------
- name: Setup sccache
uses: mozilla-actions/sccache-action@054db53350805f83040bf3e6e9b8cf5a139aa7c9 # v0.0.7

- name: Enable sccache wrapping (probe first)
shell: bash
run: |
if sccache --start-server >/dev/null 2>&1; then
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "::notice::sccache enabled (RUSTC_WRAPPER=sccache)"
else
echo "::warning::sccache backend unreachable; building without compile cache this run"
fi

# ---------- Cache Cargo ----------
- name: Cache Cargo registry
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-${{ matrix.name }}-cargo-reg-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.name }}-cargo-reg-
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-registry-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-registry-

- name: Cache cargo target
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: client-sdk-rust/target/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-target-

# ---------- Build environment setup ----------
- name: Set Linux build environment
Expand Down
74 changes: 67 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ permissions:

env:
CARGO_TERM_COLOR: always
# sccache caches rustc invocations across runs. RUSTC_WRAPPER is exported
# only after the setup step verifies the GHA cache backend is reachable, so
# transient cache backend failures fall back to uncached rustc instead of
# failing the build.
SCCACHE_GHA_ENABLED: "true"
# vcpkg binary caching for Windows (mirrors builds.yml)
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-md
Expand Down Expand Up @@ -134,11 +139,39 @@ jobs:
if: matrix.name == 'macos-x64'
run: rustup target add x86_64-apple-darwin

# ---------- Setup sccache ----------
- name: Setup sccache
uses: mozilla-actions/sccache-action@054db53350805f83040bf3e6e9b8cf5a139aa7c9 # v0.0.7

- name: Enable sccache wrapping (probe first)
shell: bash
run: |
if sccache --start-server >/dev/null 2>&1; then
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "::notice::sccache enabled (RUSTC_WRAPPER=sccache)"
else
echo "::warning::sccache backend unreachable; building without compile cache this run"
fi

# ---------- Cache Cargo ----------
- name: Cache Cargo
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Cache cargo registry
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-registry-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-registry-

- name: Cache cargo target
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
workspaces: client-sdk-rust -> target
path: client-sdk-rust/target/
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.name }}-cargo-target-

# ---------- Build environment setup ----------
- name: Set Linux build environment
Expand Down Expand Up @@ -303,12 +336,39 @@ jobs:
with:
toolchain: stable

# ---------- Setup sccache ----------
- name: Setup sccache
uses: mozilla-actions/sccache-action@054db53350805f83040bf3e6e9b8cf5a139aa7c9 # v0.0.7

- name: Enable sccache wrapping (probe first)
shell: bash
run: |
if sccache --start-server >/dev/null 2>&1; then
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
echo "::notice::sccache enabled (RUSTC_WRAPPER=sccache)"
else
echo "::warning::sccache backend unreachable; building without compile cache this run"
fi

# ---------- Cache Cargo ----------
- name: Cache Cargo
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- name: Cache cargo registry
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-coverage-cargo-registry-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-coverage-cargo-registry-

- name: Cache cargo target
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
workspaces: client-sdk-rust -> target
key: coverage
path: client-sdk-rust/target/
key: ${{ runner.os }}-coverage-cargo-target-${{ hashFiles('client-sdk-rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-coverage-cargo-target-

# ---------- Build environment setup ----------
- name: Set build environment
Expand Down
Loading