Skip to content
TypeScript

ci(release): macOS arm64 stops compressing a pnpm store it cannot save (#31955)

Theo Browneb90e554e0a94
diff --git a/.github/actions/setup-ci-deps/action.yml b/.github/actions/setup-ci-deps/action.yml
index b4fe25fab83..e27a8c90fdf 100644
--- a/.github/actions/setup-ci-deps/action.yml
+++ b/.github/actions/setup-ci-deps/action.yml
@@ -13,6 +13,10 @@ inputs:
description: Arguments for `vp install`, such as filters. Empty installs the whole workspace.
required: false
default: ""
+ save-pnpm-store:
+ description: Set to "false" when a concurrent job with the same install args saves the pnpm store
+ required: false
+ default: "true"
runs:
using: composite
steps:
@@ -125,9 +129,11 @@ runs:
# A filtered install that started from the current full store adds nothing
# worth a second copy of it. A stacked PR, based on a branch other than the
# default, saves a ~1 GB store only its own reruns can read, so it only restores.
+ # Concurrent jobs with the same install args reserve one key, so the losers
+ # compress the store for nothing; all but one pass save-pnpm-store: false.
- name: Save pnpm store
if: >-
- inputs.install == 'true' &&
+ inputs.install == 'true' && inputs.save-pnpm-store == 'true' &&
(github.event_name != 'pull_request' || github.base_ref == github.event.repository.default_branch) &&
steps.pnpm_cache.outputs.cache-hit != 'true' &&
(steps.pnpm_store.outputs.namespace == 'full' ||
diff --git a/.github/workflows/release-desktop.yml b/.github/workflows/release-desktop.yml
index 3533a926dea..8056d08f438 100644
--- a/.github/workflows/release-desktop.yml
+++ b/.github/workflows/release-desktop.yml
@@ -77,6 +77,12 @@ on:
required: false
default: ""
type: string
+ # Whether this job saves the workspace pnpm store. Release's two Macs
+ # install the same store on the same runner type, so only one saves it.
+ save_pnpm_store:
+ required: false
+ default: true
+ type: boolean
version:
required: true
type: string
@@ -160,6 +166,7 @@ jobs:
uses: ./.github/actions/setup-ci-deps
with:
install-args: --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
+ save-pnpm-store: ${{ inputs.save_pnpm_store }}
env:
pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 55ebb88b367..9df801c108b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -653,6 +653,8 @@ jobs:
resource_key: darwin-arm64
cli_archive: true
launch_check: true
+ # desktop_mac_x64 saves the shared pnpm store; this job finishes last.
+ save_pnpm_store: false
desktop_mac_x64:
name: Desktop macOS x64