Start using Github Actions#53
Conversation
45a3b78 to
ecc937f
Compare
| switch self { | ||
| case .iOS_12: | ||
| return "platform=iOS Simulator,OS=12.2,name=iPad Pro (12.9-inch) (3rd generation)" | ||
| return "platform=iOS Simulator,OS=12.4,name=iPad Pro (12.9-inch) (3rd generation)" |
There was a problem hiding this comment.
GitHub actions has different simulators pre-installed than Travis did, so we update them as part of this PR
| enum Platform: String, CaseIterable, CustomStringConvertible { | ||
| case iOS_12 | ||
| case iOS_13 | ||
| case iOS_14 |
There was a problem hiding this comment.
while I was here I added support for testing on iOS 14. I should add iOS 15 too but... for another day
eb60ecf to
239eaf0
Compare
|
|
||
| try execute(commandPath: "/usr/bin/swift", arguments: ["package", "generate-xcodeproj", "--output=generated/"]) | ||
|
|
||
| // The generate-xcodeproj command has a bug where the test deployment target is above the minimum deployment target for the project. Fix it with sed. |
There was a problem hiding this comment.
this is absurd, but it works.
| @@ -0,0 +1,24 @@ | |||
| #!/bin/bash -l | |||
There was a problem hiding this comment.
This is very similar to a file with the same name in Valet. Thank you @NickEntin for figuring out this absurdity.
There was a problem hiding this comment.
Haha these two lines took me so long to figure out:
.../Xcode_11.7.app/.../iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime ...
.../Xcode_10.3.app/.../iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime ...
Because, you know, why not mix things up
0f6bb62 to
69fdb06
Compare
| - bash <(curl -s https://codecov.io/bash) -J '^CADCacheAdvance$' -D .build/derivedData/macOS_10_15 -t 8344b011-6b2a-4b3d-a573-eaf49684318e | ||
|
|
||
| - osx_image: xcode11.2 | ||
| env: ACTION="swift-package";PLATFORMS="watchOS_5,watchOS_6"; |
There was a problem hiding this comment.
note that we are no longer testing on watchOS 5. Github Actions requires support for Xcode 10 in order to get access to a watchOS 5 simulator. Not worth the effort to support that old an Xcode version when we've never seen a failure specific to watchOS, let alone watchOS 5.
69fdb06 to
082c375
Compare
| on: | ||
| push: | ||
| branches: | ||
| - main |
There was a problem hiding this comment.
Smart, I might want to incorporate this into SwiftInspector to reduce usage of CI on PRs
| pod-lint: | ||
| name: Pod Lint | ||
| runs-on: macOS-10.15 | ||
| steps: |
There was a problem hiding this comment.
Interesting approach, I've went with the approach of setting things once and then executing multiple steps rather than having multiple jobs. Both approaches work but this needs to checkout and bundle install multiple times which feels wasteful?
There was a problem hiding this comment.
I'll take another look at SwiftInspector. I'm down to make this more efficient, but I'm also not paying for the inefficiency here. Can be a future pass.
There was a problem hiding this comment.
I actually went ahead and took a look, it's possible to have dependent jobs which I think would be the best of both worlds https://docs.github.com/en/actions/using-workflows/advanced-workflow-features#creating-dependent-jobs
There was a problem hiding this comment.
Doesn't look like the needs API makes the dependent jobs run on the same machine per #55 😞
|
|
||
| try execute(commandPath: "/usr/bin/swift", arguments: ["package", "generate-xcodeproj", "--output=generated/"]) | ||
|
|
||
| // The generate-xcodeproj command has a bug where the test deployment target is above the minimum deployment target for the project. Fix it with sed. |
Resolves #51. This migration was heavily inspired by square/Valet#256
All the new jobs have been listed as required, and the Travis CI job has been removed entirely:
