Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

ci: save Rust caches only from main (#4101)

Francesco Bonacci464ac22fe13a
diff --git a/.github/workflows/ci-cua-driver-contract-clients.yml b/.github/workflows/ci-cua-driver-contract-clients.yml
index 89845b72c3..11176396c8 100644
--- a/.github/workflows/ci-cua-driver-contract-clients.yml
+++ b/.github/workflows/ci-cua-driver-contract-clients.yml
@@ -80,6 +80,7 @@ jobs:
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: actions/setup-node@v4
with:
node-version: "22"
@@ -138,6 +139,7 @@ jobs:
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Record Windows runner session
if: runner.os == 'Windows'
id: windows-session
@@ -213,6 +215,7 @@ jobs:
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install Linux build dependencies
run: |
if [[ -f /etc/apt/apt-mirrors.txt ]]; then
diff --git a/.github/workflows/ci-cua-driver-valgrind.yml b/.github/workflows/ci-cua-driver-valgrind.yml
index 20309e337c..f8a7703e57 100644
--- a/.github/workflows/ci-cua-driver-valgrind.yml
+++ b/.github/workflows/ci-cua-driver-valgrind.yml
@@ -39,6 +39,7 @@ jobs:
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Test Valgrind runner shutdown
run: python3 -m unittest -v scripts/ci/linux/test_run_valgrind_e2e.py
- name: Install Linux build and Memcheck dependencies
diff --git a/.github/workflows/ci-driver-mcp-candidate.yml b/.github/workflows/ci-driver-mcp-candidate.yml
index 82e32a056d..e490d81ce2 100644
--- a/.github/workflows/ci-driver-mcp-candidate.yml
+++ b/.github/workflows/ci-driver-mcp-candidate.yml
@@ -51,6 +51,7 @@ jobs:
with:
workspaces: "libs/cua-driver/rust -> target"
key: mcp-candidate
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install Linux build dependencies
if: runner.os == 'Linux'
run: |
diff --git a/.github/workflows/ci-rust-linux.yml b/.github/workflows/ci-rust-linux.yml
index 0e188b9971..b163a43276 100644
--- a/.github/workflows/ci-rust-linux.yml
+++ b/.github/workflows/ci-rust-linux.yml
@@ -73,6 +73,7 @@ jobs:
with:
workspaces: "libs/cua-driver/rust -> target"
key: arch-pacman
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build exact candidate and native package tests
working-directory: libs/cua-driver/rust
run: |
@@ -121,6 +122,7 @@ jobs:
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install Linux build dependencies
run: |
sudo apt-get update
diff --git a/.github/workflows/ci-rust-windows.yml b/.github/workflows/ci-rust-windows.yml
index 6b10a50eaa..3c2f064f8c 100644
--- a/.github/workflows/ci-rust-windows.yml
+++ b/.github/workflows/ci-rust-windows.yml
@@ -57,6 +57,7 @@ jobs:
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
+ save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Record Windows runner session
id: runner-session
shell: pwsh