From 65dae9a088976949650c60ce759960733dcc0485 Mon Sep 17 00:00:00 2001 From: max <40643627+quotentiroler@users.noreply.github.com> Date: Mon, 9 Feb 2026 12:40:58 -0800 Subject: [PATCH] ci: add SwiftPM cache, fix Mintlify frontmatter (#12863) * ci: add SwiftPM cache to macOS job, fix action description * ci: fix frontmatter, remove DerivedData cache --- .github/actions/setup-node-env/action.yml | 4 ++-- .github/workflows/ci.yml | 8 ++++++++ docs/ci.md | 7 +++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-node-env/action.yml b/.github/actions/setup-node-env/action.yml index 71af716405..5fa4f6728b 100644 --- a/.github/actions/setup-node-env/action.yml +++ b/.github/actions/setup-node-env/action.yml @@ -1,7 +1,7 @@ name: Setup Node environment description: > - Checkout with submodule retry, install Node 22, pnpm, optionally Bun, - and run pnpm install. Used by CI gates and test jobs. + Initialize submodules with retry, install Node 22, pnpm, optionally Bun, + and run pnpm install. Requires actions/checkout to run first. inputs: node-version: description: Node.js version to install. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a463de8fb..b6caa9680e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -443,6 +443,14 @@ jobs: swiftlint --config .swiftlint.yml swiftformat --lint apps/macos/Sources --config .swiftformat + - name: Cache SwiftPM + uses: actions/cache@v4 + with: + path: ~/Library/Caches/org.swift.swiftpm + key: ${{ runner.os }}-swiftpm-${{ hashFiles('apps/macos/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-swiftpm- + - name: Swift build (release) run: | set -euo pipefail diff --git a/docs/ci.md b/docs/ci.md index da09a3f1b2..4fa9579c91 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -1,6 +1,6 @@ --- title: CI Pipeline -description: How the OpenClaw CI pipeline works and why jobs are ordered the way they are. Latest changes: Feb 09, 2026 +description: How the OpenClaw CI pipeline works and why jobs are ordered the way they are. --- # CI Pipeline @@ -128,12 +128,15 @@ The analysis skips: `node_modules`, `dist`, `vendor`, `.git`, `coverage`, The `setup-node-env` composite action (`.github/actions/setup-node-env/`) handles the shared setup boilerplate: -- Submodule checkout with retry (5 attempts) +- Submodule init/update with retry (5 attempts, exponential backoff) - Node.js 22 setup - pnpm via corepack + store cache - Optional Bun install - `pnpm install` with retry +The `macos` job also caches SwiftPM packages (`~/Library/Caches/org.swift.swiftpm`) +to speed up dependency resolution. + This eliminates ~40 lines of duplicated YAML per job. ## Push vs PR Behavior