-
Notifications
You must be signed in to change notification settings - Fork 263
Enhance the build script to support building and testing on Darwin #97
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
This seems reasonable to me. I had always intended this script to be a stop gap until swift-pm was read enough to build all the things on all the platforms. Hopefully the script is a step toward unifying build logic and will help when that day comes. |
@@ -184,29 +257,34 @@ def main(args=sys.argv[1:]): | |||
delegates building or testing XCTest to a sub-parser and its corresponding | |||
function. | |||
""" | |||
strategy = DarwinStrategy if platform.system() == 'Darwin' else LinuxStrategy |
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.
I've actually never tried building corelibs-xctest on FreeBSD (on my todo list), but I imagine it should succeed using the LinuxStrategy
. However, I've been told that it's something of a faux pas to refer to FreeBSD as Linux. Could we rename this to UnixStrategy
or GenericUnixStrategy
? This would match the naming scheme of Swift's toolchains.
Big +1 from me! This looks fantastic. 💯 I imagine this will continue working with the current Swift |
Thanks for the feedback, guys! I'll make the suggested adjustments the next time I'm at a dev workstation, which won't be until mid-week I expect. Then once this goes in I'll see about updating the main Swift build script to unconditionally call into this one, with little or no platform branching. Meanwhile, the interface here hasn't changed, so there shouldn't be any build breakage. |
* Build and test are performed using `xcodebuild` actions, as the Swift build-script-impl script has been doing in the past * Installation is not supported on Darwin * Uses the strategy pattern to isolate platform branching logic
8f83a1c
to
09dbfc1
Compare
Alright, I've made the updates now. @parkera @mike-ferris-apple could you request a test run when you have a second? |
@swift-ci please test |
Green! Merging now. |
Follow-up: swiftlang/swift#2259 |
As discussed in swiftlang/swift#2137, we are getting the feeling that we should move build script logic for Darwin out of Swift's build-script-impl and into XCTest's own build script to reduce churn and enable better CI feedback. This PR is a first step towards making that happen.
xcodebuild
actions, as the Swiftbuild-script-impl script has been doing in the past