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: blobless or shallow checkouts where history isn't needed; pnpm store cache (CUA-3134) (#6394)

cua-agents[bot]13c3725377da
diff --git a/.github/workflows/ci-check-docs-links.yml b/.github/workflows/ci-check-docs-links.yml
index fe98043d8b..3c85a7e96f 100644
--- a/.github/workflows/ci-check-docs-links.yml
+++ b/.github/workflows/ci-check-docs-links.yml
@@ -52,7 +52,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
- fetch-depth: 0
persist-credentials: false
- name: Test the linter
@@ -62,6 +61,10 @@ jobs:
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
+ # One file from the base commit is all this needs: fetch that commit
+ # without history or blobs (the repository is public, so the single
+ # blob is fetched anonymously on demand) instead of the full history.
+ git fetch --quiet --depth=1 --filter=blob:none origin "$BASE_SHA" || true
args=()
if git show "$BASE_SHA:docs/code-block-baseline.json" > "$RUNNER_TEMP/base-baseline.json" 2>/dev/null; then
args=(--baseline-base "$RUNNER_TEMP/base-baseline.json")
@@ -85,16 +88,18 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
+ - name: Install pnpm
+ uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
+
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
-
- - name: Install pnpm
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
+ cache: pnpm
+ cache-dependency-path: docs/pnpm-lock.yaml
- name: Install dependencies
- run: pnpm install
+ run: pnpm install --frozen-lockfile --prefer-offline
working-directory: docs
- name: Test link checker regression fixtures
diff --git a/.github/workflows/ci-check-docs.yml b/.github/workflows/ci-check-docs.yml
index 32eeb06899..21156faa32 100644
--- a/.github/workflows/ci-check-docs.yml
+++ b/.github/workflows/ci-check-docs.yml
@@ -130,10 +130,12 @@ jobs:
run:
shell: bash
steps:
- # The generators read release tags to record the documented version.
+ # The generators read release tags to record the documented version, so
+ # they need history and tags but not every old file's contents.
- uses: actions/checkout@v4
with:
fetch-depth: 0
+ filter: blob:none
persist-credentials: false
# The cua SDK generators build cua-sdk, cua-spaces-ffi and cua-bindgen
# in debug; with the restored cache that fills the hosted runner's disk
diff --git a/.github/workflows/ci-cua-proto.yml b/.github/workflows/ci-cua-proto.yml
index 73e6054551..a26a0ddb49 100644
--- a/.github/workflows/ci-cua-proto.yml
+++ b/.github/workflows/ci-cua-proto.yml
@@ -49,8 +49,10 @@ jobs:
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
- # buf breaking compares against the merge base with the base branch.
+ # buf breaking compares against the merge base with the base branch,
+ # so it needs history; it does not need every file's contents up front.
fetch-depth: 0
+ filter: blob:none
- name: Install buf
uses: bufbuild/buf-action@85aebf73123b5c15fd5528aaecbf9129cddf7fa7 # v1.6.0
with:
diff --git a/.github/workflows/ci-cua-spaces-web.yml b/.github/workflows/ci-cua-spaces-web.yml
index 72c08a40c9..57ec4caff9 100644
--- a/.github/workflows/ci-cua-spaces-web.yml
+++ b/.github/workflows/ci-cua-spaces-web.yml
@@ -74,6 +74,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
+ # pnpm's store, keyed on both lockfiles (pnpm is installed above).
+ cache: pnpm
+ cache-dependency-path: |
+ apps/cua-spaces-web/pnpm-lock.yaml
+ apps/cua-spaces-desktop/pnpm-lock.yaml
- name: Install (web UI, Electron shell)
run: |
(cd apps/cua-spaces-web && pnpm install --ignore-workspace --frozen-lockfile)
@@ -137,6 +142,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
+ # pnpm's store, keyed on both lockfiles (pnpm is installed above).
+ cache: pnpm
+ cache-dependency-path: |
+ apps/cua-spaces-web/pnpm-lock.yaml
+ apps/cua-spaces-desktop/pnpm-lock.yaml
- name: Install
run: |
(cd apps/cua-spaces-web && pnpm install --ignore-workspace --frozen-lockfile)