Closed finestructure closed 4 years ago
To summarise, I think our options are:
swift build
if xcodebuild
failedI think 4. could be an option if we know it’s close - i.e. in Xcode 12. However, that seems unlikely, since Xcode 12b2 is also failing.
Option 3. isn’t great, as it complicates the build further and increases run times for every failed build (which are many). We could/should limit this to macOS, which might help here. Or turn it around, run swift build
first and then xcodebuild
? Not sure if there are risks of false positives or if there are even gains to be expected.
Re 2.: Given the SSWG minimal requirements for sandbox level projects and above, there’s an argument to be made to fast-path the projects from the Swift Server Ecosystem Index and report them supporting latest macOS/Linux.
So, given that we're going to need a swift build
path through the builder tool in order to support Linux builds I think the best option is to simply add another column to our build permutations table.
We currently have:
When we add Linux support, we will then need something like this:
Given that we'll already have the command structure for building packages with swift build
at that point, I think we could justify adding one more column:
To give an opinion on all these, I'd place them in this order from my favourite, to least favourite:
- Try
swift build
ifxcodebuild
failed
Except, I wouldn't do it conditionally. Let's just run one more build for everything as I mention above.
- Somehow pass in explicit settings (via a metadata file for instance, or plain special casing of certain packages)
Yep, I think this may potentially be necessary for some real edge cases that we have yet to see, but I bet they're in there somewhere.
- Short-circuit certain packages we know are problematic but where we agree to accept an upstream signal
I'm happy to short circuit packages, but this does weaken the feature in that the matrix is no longer only showing build results, but build results and special cases.
- Wait for the Xcode build fix
This could be a long time coming.
Just triggered via
post build macos (spm):
url: ${base_url}/api/packages/${package}/trigger-builds
method: POST
headers:
Authorization: Bearer ${builder_token}
body:
json:
buildTool: spm
platform:
name: macos
version: "x86_64"
swiftVersion:
major: 5
minor: 2
patch: 4
validation:
status: 200
and all three refs are passing now:
https://staging.swiftpackageindex.com/mongodb/mongo-swift-driver/builds
I’ll retrigger the rest as part of a full rebuild asap.
The issue is that xcodebuild currently fails to pick up
cSettings
The fix is to either pass the settings explicitly to
xcodebuild
:or to build via
swift build