-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add use of a Swift Package to test caching
https://bugs.swift.org/browse/SR-11760 might be caused by the loss of fractional timestamps. actions/toolkit#475 should store fractional timestamps as part of the cache, but has not been merged yet. I expect the cache to not reduce the runtime currently.
- Loading branch information
1 parent
2f8312f
commit 6edc828
Showing
5 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test SwiftPM Cache | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
run_xcutils: | ||
name: Run xcutils select --print-versions | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
xcode: ["11.5"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Select Xcode ${{ matrix.xcode }} | ||
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app | ||
|
||
- name: Cache SwiftPM | ||
uses: actions/cache@v2 | ||
with: | ||
path: .build | ||
key: ${{ runner.os }}-xcode_${{ matrix.xcode }}-swiftpm-ci-deps-${{ github.workspace }}-${{ hashFiles('Package.resolved') }} | ||
restore-keys: | | ||
${{ runner.os }}-xcode_${{ matrix.xcode }}-swiftpm-ci-deps-${{ github.workspace }} | ||
- name: Run Tests | ||
run: swift run --configuration release --skip-update xcutils select --print-versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "swift-argument-parser", | ||
"repositoryURL": "https://github.com/apple/swift-argument-parser", | ||
"state": { | ||
"branch": null, | ||
"revision": "223d62adc52d51669ae2ee19bdb8b7d9fd6fcd9c", | ||
"version": "0.0.6" | ||
} | ||
}, | ||
{ | ||
"package": "Version", | ||
"repositoryURL": "https://github.com/mxcl/Version.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "200046c93f6d5d78a6d72bfd9c0b27a95e9c0a2b", | ||
"version": "1.2.0" | ||
} | ||
}, | ||
{ | ||
"package": "xcutils", | ||
"repositoryURL": "https://github.com/JosephDuffy/xcutils.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "0454a5dd89b680a841ada3138cd90f6c606b2d28", | ||
"version": "0.1.0" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// swift-tools-version:5.2 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "CIDependencies", | ||
platforms: [ | ||
.macOS(.v10_10), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/JosephDuffy/xcutils.git", from: "0.1.0"), | ||
], | ||
targets: [ | ||
.target(name: "CIDependencies") | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// An empty file to make this a valid target |