Skip to content

Commit 435d2dc

Browse files
committed
ci: improve mint installation cache across branches
Signed-off-by: Alessandro Yuichi Okimoto <yuichijpn@gmail.com>
1 parent 37f944e commit 435d2dc

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/generate-xcode-project.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ on:
55

66
jobs:
77
generate-xcode-project:
8-
runs-on: macos-15-xlarge
8+
runs-on: macos-14
99
steps:
1010
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1111

12+
# Get macOS version for cache key
13+
- name: Get macOS version
14+
id: macos-version
15+
run: |
16+
VERSION=$(sw_vers -productVersion | cut -d. -f1,2)
17+
echo "version=$VERSION" >> $GITHUB_OUTPUT
18+
echo "Running on macOS $VERSION"
19+
1220
# Pre-cache mint packages directory
1321
- name: Cache Mint packages
1422
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
@@ -18,10 +26,10 @@ jobs:
1826
~/Library/Caches/Mint
1927
~/Library/Developer/Xcode/DerivedData
2028
~/.swiftpm
21-
key: ${{ runner.os }}-mint-packages-${{ hashFiles('**/Mintfile') }}-v4
29+
key: ${{ runner.os }}-${{ steps.macos-version.outputs.version }}-mint-packages-${{ hashFiles('**/Mintfile') }}-v1
2230
restore-keys: |
23-
${{ runner.os }}-mint-packages-${{ hashFiles('**/Mintfile') }}-
24-
${{ runner.os }}-mint-packages-
31+
${{ runner.os }}-${{ steps.macos-version.outputs.version }}-mint-packages-${{ hashFiles('**/Mintfile') }}-
32+
${{ runner.os }}-${{ steps.macos-version.outputs.version }}-mint-packages-
2533
2634
# Use setup-mint action with optimized settings
2735
- name: Setup Mint
@@ -30,7 +38,7 @@ jobs:
3038
bootstrap: true
3139
bootstrap-link: true
3240
use-cache: true
33-
cache-prefix: "mint-setup-v4"
41+
cache-prefix: "mint-setup-${{ steps.macos-version.outputs.version }}-v1"
3442
clean: true
3543

3644
- name: Generate XcodeProject

0 commit comments

Comments
 (0)