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

iOS XCFramework distribution – Part 4: Upload to S3 #5769

Merged
merged 28 commits into from
Jun 13, 2023

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented May 12, 2023

Builds on top of #5738 , #5739 , and #5740 to upload a ZIP with the Gutenberg XCFrameworks on S3.

To test: Verify CI runs successfully, then download the tar.gz from https://d2twmm2nzpx3bg.cloudfront.net/Gutenberg-<commit sha1>.tar.gz

I had to introduce a number of other changes to actually get the XCFrameoworks to work in WordPress, so this PR ended up a bit bloated. Most noteworthy:

  • Changing the folder structure of the archive
  • Adding bundle/ios/App.js to the XCFramework resources

You can verify the integration in this test PR in WordPress iOS. Admittedly, in that build there are UI tests issues. They could be related to the XCFramework packaging, but not with the distribution via S3 itself.


PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented May 12, 2023

Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!

@mokagio mokagio changed the title Setup Ruby tooling and install CocoaPods WIP – Upload to S3 May 15, 2023
@mokagio mokagio force-pushed the mokagio/ios-xcframework-setup-part-3 branch from d634f16 to 62b0773 Compare May 15, 2023 12:46
@mokagio mokagio force-pushed the mokagio/ios-xcframework-setup-part-4 branch 3 times, most recently from a3baa3f to 017f2ef Compare May 16, 2023 09:26
@mokagio mokagio force-pushed the mokagio/ios-xcframework-setup-part-3 branch from 7be5928 to ae0e71e Compare May 17, 2023 02:24
@mokagio mokagio force-pushed the mokagio/ios-xcframework-setup-part-4 branch 2 times, most recently from f0f4395 to 1d76e80 Compare May 18, 2023 03:12
auto_prefix: false,
skip_if_exists: false
)
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could use Fastlane to generate the xcframeworks at this point. But I consider that an incremental refinement rather than a precondition for the S3 upload.

@mokagio mokagio changed the title WIP – Upload to S3 iOS XCFramework distribution – Part 4: Upload to S3 May 18, 2023
@mokagio mokagio force-pushed the mokagio/ios-xcframework-setup-part-4 branch 5 times, most recently from 3037a9b to 874412a Compare May 22, 2023 11:53
Base automatically changed from mokagio/ios-xcframework-setup-part-3 to trunk May 23, 2023 02:42
@mokagio mokagio force-pushed the mokagio/ios-xcframework-setup-part-4 branch 9 times, most recently from f2ca7eb to 8c5e024 Compare May 25, 2023 03:24
Comment on lines 58 to 77
- automattic/a8c-ci-toolkit#2.15.1
- automattic/a8c-ci-toolkit#2.16.0
- peakon/git-shallow-clone#v0.0.1:
depth: 1
agents:
queue: mac
env:
IMAGE_ID: xcode-14.2
IMAGE_ID: xcode-14.3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These updates were not required by the changes in the PR. I did them just to stay up to date.

echo "--- :arrow_down: Download iOS JS bundle"
buildkite-agent artifact download bundle/ios/App.js .

echo "--- :rubygems: Setting up Gems"
cd ./ios-xcframework
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could have left the cd at the start of the script and downloaded the artifact in .., but it seemed convoluted.

// Linking a static library that was built with -gmodules, but the module cache was not found.
// Redistributable static libraries should never be built with module debugging enabled.
// The debug experience will be degraded due to incomplete debug information.
CLANG_ENABLE_MODULE_DEBUGGING = NO;
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 change was part of the previous PR. For it to be here, I must have messed up a git rebase resulting in that commit not landing in trunk.

mokagio and others added 22 commits June 13, 2023 12:21
The React Native iOS runtime needs this file, albeit converted as a
`jsbundle`.

The Jetpack and WordPress iOS setup currently use `App.js` and converts
it to a `jsbundle` file in a build phase run script. For the moment
we'll stick with that approach, looking at possible refinements later
on.
We no longer need those binaries as we took a different approach to
adding RN in other apps.

See https://github.com/woocommerce/WooCommerce-Shared
No reason other than to avoid the update prompt when running locally
Co-authored-by: Jeremy Massel <[email protected]>
Co-authored-by: Jeremy Massel <[email protected]>
This will allow us to change a single line to add namespace on S3
This will make it easier to browse the bucket.
See #5769 (comment)
Turns out reading files from within an ERB require some gotchas which
make the code less clear.

See
#5769 (comment)
@mokagio mokagio force-pushed the mokagio/ios-xcframework-setup-part-4 branch from 7d64263 to e63075c Compare June 13, 2023 02:24
@mokagio mokagio enabled auto-merge June 13, 2023 02:24
@oguzkocer
Copy link
Contributor

@jkmassel @oguzkocer I don't think the bucket we're using here is the same as the one for the Android counterpart, but maybe this is something you have thought about already?

Yeap, it's a different bucket.

@mokagio mokagio dismissed jkmassel’s stale review June 13, 2023 03:41

@jkmassel Dismissing to unblock merge. Changes have been addressed. If there's anything I missed, I'll followup.

@mokagio mokagio merged commit 76559a6 into trunk Jun 13, 2023
@mokagio mokagio deleted the mokagio/ios-xcframework-setup-part-4 branch June 13, 2023 03:41
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.

4 participants