-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Allow overriding the iOS platform destination for RN E2E testing #54079
Allow overriding the iOS platform destination for RN E2E testing #54079
Conversation
Size Change: 0 B Total Size: 1.51 MB ℹ️ View Unchanged
|
@@ -1 +1 @@ | |||
2.7.5 | |||
2.7.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.
@@ -702,7 +702,6 @@ | |||
buildSettings = { | |||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |||
CLANG_ENABLE_MODULES = YES; | |||
CODE_SIGN_IDENTITY = "iPhone Developer"; |
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 is redundant. Removing it makes the project default to "Apple Developer" which is good enough for what we need here.
else | ||
# Run xcodebuild without piping the output | ||
eval "$XCODEBUILD_CMD" | ||
fi |
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 extracted the xcodebuild
call for two reasons:
- Allow overriding the
-destination
parameter - Use
xcbeautify
to parse the output to make local debugging easier
The current setup works because the resulting destination is unique in the CircleCI image. However, in the upcoming Buildkite setup the value does not work and `xcodebuild` tries to build using the VM as the destination, which fails. See https://buildkite.com/automattic/gutenberg-mobile/builds/7039#018a4555-02d8-4ce3-b463-b876b3e7a658/858-883 With an override-via-env-var in place, we'll be able to customize the destination used in CI without having to further update the code here.
Xcode sets 'Apple Developer' as the default, which is good enough for the kind of project that react-native-editor is.
Keep the logs cleaner.
e6895f3
to
ebe7487
Compare
That is the version supported by our CI. We could of course install a new one at runtime, but that adds 4 to 5 minutes to the build. Worth noting that version 2.7.4 and 2.7.5 both are past support. We ought to upgrade to version 3.x, but that's something we might want to do in a dedicated PR.
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.
LGTM! I've tested running the E2E tests locally and it worked as expected. 🚀
What?
The core change in this PR is adding an environment variable that can be set to change the
xcodebuild
-destination
parameter of one of the tests commands. This will unblock creating the bundle for SauceLabs on Buildkite, see wordpress-mobile/gutenberg-mobile#6134The other commits are tangential changes related to making the SauceLabs builds in CI possible or faster. Refer to the expanded commit messages for more details.
Why?
The context of these changes is that we are incrementally moving from CircleCI to Buildkite as the CI provider for
gutenberg-mobile
. Unfortunately, there are some implicit dependencies on the CI provider and between that and this repository in the automation scripts, which is why these changes are necessary.How?
Moved the
test:e2e:build-app:ios
command from a long inline string in thepackage.json
to a dedicated script and made it check the environment forRN_EDITOR_E2E_IOS_DESTINATION
to set the-destination
parameter.Testing Instructions
See wordpress-mobile/gutenberg-mobile#6138 which runs the gutenberg-mobile CI against this PR.
Testing Instructions for Keyboard
N.A.
Screenshots or screencast
N.A.