Cache Swift packages across CI runs (#998)
* Cache Swift packages across CI runs Add actions/cache for the SPM cloned source packages directory so subsequent runs skip fetching Sparkle, sentry-cocoa, swift-markdown-ui, posthog-ios, and NetworkImage from GitHub each time. - nightly/release: replace the no-op SwiftPM cache step with actions/cache + -clonedSourcePackagesDirPath on xcodebuild - ci/ci-macos-compat/test-e2e: add actions/cache before the existing resolve step, stop deleting the cache dir each run * Include runner in test-e2e cache key Consistent with ci-macos-compat.yml which uses matrix.os in the key.
This commit is contained in:
parent
380fc081f5
commit
c37ace5deb
5 changed files with 48 additions and 13 deletions
8
.github/workflows/test-e2e.yml
vendored
8
.github/workflows/test-e2e.yml
vendored
|
|
@ -151,11 +151,17 @@ jobs:
|
|||
- name: Clean DerivedData
|
||||
run: rm -rf ~/Library/Developer/Xcode/DerivedData/GhosttyTabs-*
|
||||
|
||||
- name: Cache Swift packages
|
||||
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
||||
with:
|
||||
path: .ci-source-packages
|
||||
key: spm-${{ inputs.runner || 'macos-15' }}-${{ hashFiles('GhosttyTabs.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
|
||||
restore-keys: spm-${{ inputs.runner || 'macos-15' }}-
|
||||
|
||||
- name: Resolve Swift packages
|
||||
run: |
|
||||
set -euo pipefail
|
||||
SOURCE_PACKAGES_DIR="$PWD/.ci-source-packages"
|
||||
rm -rf "$SOURCE_PACKAGES_DIR"
|
||||
mkdir -p "$SOURCE_PACKAGES_DIR"
|
||||
for attempt in 1 2 3; do
|
||||
if xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux-unit -configuration Debug \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue