-
Notifications
You must be signed in to change notification settings - Fork 50
Use Swift 5.4 for Windows job on GitHub Actions #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
@compnerd would you have a moment to have a look? |
.github/workflows/tests_mac.yaml
Outdated
pull_request: | ||
branches: "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed
pull_request: | |
branches: "*" | |
pull_request: |
.github/workflows/tests_ubuntu.yaml
Outdated
pull_request: | ||
branches: "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pull_request: | |
branches: "*" | |
pull_request: |
.github/workflows/tests_windows.yaml
Outdated
pull_request: | ||
branches: "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pull_request: | |
branches: "*" | |
pull_request: |
Package.swift
Outdated
@@ -24,7 +24,7 @@ let package = Package( | |||
targets: ["Benchmark"]) | |||
], | |||
dependencies: [ | |||
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"), | |||
.package(url: "https://github.com/apple/swift-argument-parser", from: "0.4.4"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split this out into a separate change please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looked like old version of SAP could fail to build with Swift 5.4 on Windows for some reason. But I've reverted the update in Package.swift
and Package.resolved
for now as you've requested. Curious to see if CI passes on Windows without updating the SAP dependency. Could you approve it for another CI run? I'm not able to trigger it with a sole push.
Ah, I wonder if its the MSVCRT -> CRT renaming that you are referring to. I think that we could just do something like: #if os(Windows)
#if canImport(CRT)
import CRT
#else
import MSVCRT
#endif
#endif |
As far as I understand, this was fixed in the latest version of SAP, the current locked version fails to build on Windows with these kind of errors:
Would you like me to bring back the SAP update to this PR to fix that? |
I've confirmed in my fork https://github.com/MaxDesiatov/swift-benchmark/pull/2 that it won't build with the old snapshot currently used in this repository. So I think that SAP update and CI update to Swift 5.4 should be included in this same PR for CI to be all green, unless I'm missing something? |
It can be made to work - s-a-p uses |
I totally agree, but I'm still a bit confused as to how to land these two changes in separate PRs and to keep their respective CI status green at the same time. For now I'm bringing back the update to s-a-p version, but keeping it as a separate commit. That would preserve the separation after merge if you don't squash it. Ready for review and a CI run. |
I was thinking that we could inject a |
Thanks! Would it be possible to tag a new version so that other libraries targeting Windows could depend on that instead of the |
@regexident I see you've tagged the previous release, would you be able to tag a new one with this change included? |
@MaxDesiatov I did? On mobile right now so can't check, but I doubt it since I'm just a random contributor like you. 😄 |
@MaxDesiatov I've tagged 0.1.1; I didn't see a reason for any thing bigger in terms of a version bump, the only change was for newer Swift releases on WIndows. |
Fantastic, thanks! 0.1.1 works perfectly fine for this 👍 |
Oh, interesting. I stand corrected then. 😅 |
I've updated the Windows job on GitHub Actions to use a release build of Swift 5.4, and also updated the dependency in
Package.swift
andPackage.resolved
.Additionally, all GitHub Actions triggers were updated to prevent jobs from running twice on pull requests created from branches in the same repositories.