Skip to content

Commit 41bcffc

Browse files
author
Lucas Nelaupe
committed
Setup carthage cache
1 parent 4a75f0a commit 41bcffc

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/swift.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,15 @@ jobs:
5151

5252
steps:
5353
- uses: actions/[email protected]
54-
- name: Bootstrap
55-
run: carthage bootstrap --cache-builds
54+
- uses: actions/cache@v1
55+
id: carthage-cache
56+
with:
57+
path: Carthage
58+
key: carthage-${{ hashFiles('**/Cartfile.resolved') }}
59+
- name: Checkout
60+
if: steps.carthage-cache.outputs.cache-hit != 'true'
61+
run: |
62+
carthage bootstrap --cache-builds
5663
- name: Build
5764
run: carthage build --no-skip-current --cache-builds;
5865

@@ -62,8 +69,15 @@ jobs:
6269

6370
steps:
6471
- uses: actions/[email protected]
72+
- uses: actions/cache@v1
73+
id: carthage-cache
74+
with:
75+
path: Carthage
76+
key: carthage-${{ hashFiles('**/Cartfile.resolved') }}
6577
- name: Checkout
66-
run: carthage bootstrap --platform mac --cache-builds
78+
if: steps.carthage-cache.outputs.cache-hit != 'true'
79+
run: |
80+
carthage bootstrap --platform mac --cache-builds
6781
- name: Build
6882
run: xcodebuild -project "SwiftQueue.xcodeproj" -scheme "SwiftQueue macOS" -destination "arch=x86_64" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test -enableCodeCoverage YES | xcpretty
6983
- uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)