Skip to content
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

Run CI against Xcode 12 beta #936

Merged
merged 4 commits into from
Aug 22, 2020
Merged

Run CI against Xcode 12 beta #936

merged 4 commits into from
Aug 22, 2020

Conversation

dflems
Copy link
Contributor

@dflems dflems commented Aug 18, 2020

Originally tried this in #909 / #917 but reverted because Spectre wouldn't build with Xcode 12b3. It does build with b4, but GitHub Actions doesn't support it yet (incoming with actions/runner-images#1409)

This PR will probably initially fail but once 12b4 (12A8179i) is deployed on GH, it should pass on re-run 🤞

@yonaskolb (cc @brentleyjones)

@yonaskolb
Copy link
Owner

I saw that spectre has a new release for Xcode 12. We should probably update to that

@dflems
Copy link
Contributor Author

dflems commented Aug 18, 2020

@yonaskolb Unfortunately, it seems that Spectre 0.9.1 doesn't compile with beta 4 :(

Since GitHub is upgrading soon, it would work in the short term but then start failing once they roll up to beta 4.

/path/to/XcodeGen/.build/checkouts/Spectre/Sources/Spectre/[email protected]:11:21: error: 'XCTIssueReference' is not implicitly convertible to 'XCTIssue'; did you mean to use 'as' to explicitly convert?
    testCase.record(issue)
                    ^
                          as XCTIssue

@dflems
Copy link
Contributor Author

dflems commented Aug 18, 2020

@yonaskolb Re-triggered. Looks like CI has 12A8179i installed now so xcodegen built fine, but now Carthage is failing when setting up the project fixtures -_-


EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS_1200=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS_$(XCODE_VERSION_MAJOR))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only set EXCLUDED_ARCHS if building with Xcode 12. It works around an issue where Carthage fails to create fat Simulator + Device binaries. For instance, creation of fat dylibs/archives fail because iphonesimulator builds targeting Apple silicon share the arm* archs with iphoneos. We'll probably need this workaround until Carthage supports xcframeworks or some other means of being able to build frameworks per-platform.

@dflems
Copy link
Contributor Author

dflems commented Aug 18, 2020

@yonaskolb Finally green after adding a workaround for Carthage 👍

The fixtures including Xcode-12+-only targets are now successfully building in CI.

@brentleyjones
Copy link
Collaborator

I heard that GitHub actions sometimes runs beta 4, but also sometimes runs beta 3 😕.

@dflems
Copy link
Contributor Author

dflems commented Aug 18, 2020

Oof. Then maybe we hold off until it's confirmed in the GH actions docs.

@dflems
Copy link
Contributor Author

dflems commented Aug 20, 2020

@yonaskolb @brentleyjones They merged actions/runner-images#1409 today, so I would assume the rollout is 100% complete for beta4 on GitHub Actions.

CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
CODE_SIGN_ENTITLEMENTS =
CODE_SIGNING_ALLOWED = NO
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything not related to Xcode 12, can we put in the actual spec? I'd like to have that as buildable as possible without custom xcodebuild args

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yonaskolb These were already explicit overrides in the script that built the fixtures. It made the command line a lot shorter to extract them to this xcconfig. They shouldn't go in the spec because they're only needed for CI builds (which does not have certs/profiles available to do code signing)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was able to replace:

xcodebuild ... CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"

with:

xcodebuild ... -xcconfig fixtures.xcconfig

and apply the xcode 12 overrides all in one shot

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right you are, apologies. My glance was too quick 😀

@yonaskolb yonaskolb merged commit b11d5d2 into yonaskolb:master Aug 22, 2020
@dflems dflems deleted the xcode12 branch August 24, 2020 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants