Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

ci(rust): add Swatinem/rust-cache to build and linting jobs (#55207)

mendral-app[bot]39bcda1e32de
diff --git a/.github/workflows/ci-rust.yml b/.github/workflows/ci-rust.yml
index f390f1c4aae2..aab1a40b42a4 100644
--- a/.github/workflows/ci-rust.yml
+++ b/.github/workflows/ci-rust.yml
@@ -194,6 +194,13 @@ jobs:
- name: Install sccache
uses: ./.github/actions/setup-sccache
+ - name: Cache Rust dependencies
+ uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
+ with:
+ shared-key: 'v2-rust-ci'
+ workspaces: rust
+ save-if: ${{ github.ref == 'refs/heads/master' && !matrix.is_shadow }}
+
- name: Run cargo build
env:
# Use system OpenSSL instead of vendored to avoid assembly build issue (2026-01-13)
@@ -367,6 +374,13 @@ jobs:
- name: Install sccache
uses: ./.github/actions/setup-sccache
+ - name: Cache Rust dependencies
+ uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
+ with:
+ shared-key: 'v2-rust-ci'
+ workspaces: rust
+ save-if: ${{ github.ref == 'refs/heads/master' && !matrix.is_shadow }}
+
- name: Check format
run: cargo fmt -- --check