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
2 changes: 1 addition & 1 deletion .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#android -c sccache --show-stats
run: nix develop --no-update-lock-file .#android -c ./scripts/ci/sccache-stats.sh

- name: Collect Android release checksums
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#android -c sccache --show-stats
run: nix develop --no-update-lock-file .#android -c ./scripts/ci/sccache-stats.sh

- name: Upload Android fake signed PR artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # was v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/desktop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#ci -c sccache --show-stats
run: nix develop --no-update-lock-file .#ci -c ./scripts/ci/sccache-stats.sh

- name: Collect macOS release checksums
run: |
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#desktop-linux -c sccache --show-stats
run: nix develop --no-update-lock-file .#desktop-linux -c ./scripts/ci/sccache-stats.sh

- name: Collect Linux release checksums
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/desktop-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#ci -c sccache --show-stats
run: nix develop --no-update-lock-file .#ci -c ./scripts/ci/sccache-stats.sh

- name: Upload macOS PR Build
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # was v4
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#desktop-linux -c sccache --show-stats
run: nix develop --no-update-lock-file .#desktop-linux -c ./scripts/ci/sccache-stats.sh

- name: Upload Linux PR Builds
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # was v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#${{ matrix.nix_shell }} -c sccache --show-stats
run: nix develop --no-update-lock-file .#${{ matrix.nix_shell }} -c ./scripts/ci/sccache-stats.sh

- name: Collect desktop release checksums
run: |
Expand Down Expand Up @@ -434,7 +434,7 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#android -c sccache --show-stats
run: nix develop --no-update-lock-file .#android -c ./scripts/ci/sccache-stats.sh

- name: Collect Android release checksums
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ jobs:

- name: Show sccache stats
if: always()
run: nix develop --no-update-lock-file .#ci -c sccache --show-stats
run: nix develop --no-update-lock-file .#ci -c ./scripts/ci/sccache-stats.sh
6 changes: 6 additions & 0 deletions docs/repository-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ job trusts its runner with the selected environment's secrets. PR builds have
no signing credentials and retain their existing branch-scoped caches. No
persistent vendor disks or Docker builders are configured by these workflows.

Research's Unix compiler-cache statistics use `scripts/ci/sccache-stats.sh`,
which shares the build's cache configuration. In Actions the sccache socket
lives under `RUNNER_TEMP`, so separate Nix shells reach the same server despite
their different `TMPDIR` values. Cache archive restoration and compiler hits
remain separate measurements.

## macOS runners and Apple toolchain

Research desktop/iOS builds, iOS ONNX cache warming, Agent release-binary jobs
Expand Down
5 changes: 3 additions & 2 deletions scripts/ci/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ configure_sccache() {

case "${os}" in
darwin)
socket_root="${TMPDIR:-/tmp}"
# Nix creates a different TMPDIR for each workflow step.
socket_root="${RUNNER_TEMP:-${TMPDIR:-/tmp}}"
export SCCACHE_SERVER_UDS="${SCCACHE_SERVER_UDS:-${socket_root%/}/maple-sccache-${os}.sock}"
export SCCACHE_DIR="${SCCACHE_DIR:-${HOME}/Library/Caches/Mozilla.sccache}"
;;
Expand All @@ -127,7 +128,7 @@ configure_sccache() {
fi
;;
*)
socket_root="${TMPDIR:-/tmp}"
socket_root="${RUNNER_TEMP:-${TMPDIR:-/tmp}}"
export SCCACHE_SERVER_UDS="${SCCACHE_SERVER_UDS:-${socket_root%/}/maple-sccache-${os}.sock}"
export SCCACHE_DIR="${SCCACHE_DIR:-${HOME}/.cache/sccache}"
;;
Expand Down
7 changes: 7 additions & 0 deletions scripts/ci/sccache-stats.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/_common.sh"

configure_sccache
exec sccache --show-stats
Loading