-
Notifications
You must be signed in to change notification settings - Fork 7
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
Set up CI for bob / rn compatibility matrix and handle non-standard codegen output dirs #163
Conversation
Quick drive by, I know it's in draft, just a quick note to say: This is stunning. It's going to be so helpful. Thank you. |
I think this is in a state where it can be reviewed now. I thought a bit about adding further dimensions to the test matrix such as org-scoped vs. non-org-scoped package name and standard vs. custom codegen output paths. However, these would make the number of combinations and CI jobs soar. Instead I just used bob version, RN version and platform for the test matrix dimensions and always use an org-scoped package name and custom codegen output paths. The thinking there is that if e.g. the job succeeds with custom codegen paths, it is likely to also succeed with the default ones whereas the opposite is not true. The jobs currently all fail because of #161. I would suggest to also run the workflow on PRs (as it is configured right now) but to not make it block the PR. This can be achieved by tweaking the required status checks in the repository settings. |
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 really nice. Thank you.
I will let you be the arbiter of ordering you land it in. Getting it all in order with #161 may need the build to break for a little bit, but I'm okay with that.
I thought a bit about adding further dimensions to the test matrix such as org-scoped vs. non-org-scoped package name and standard vs. custom codegen output paths. However, these would make the number of combinations and CI jobs soar.
Yes, agreed. There are some lighter weight checks in test-turbo-modules.sh
which might be worth separating out in another PR. These just make sure the identifiers inn the ubrn generated files match those in the builder-bob versions.
@@ -1,4 +1,5 @@ | |||
[![CI](https://github.com/jhugman/uniffi-bindgen-react-native/actions/workflows/ci.yml/badge.svg)](https://github.com/jhugman/uniffi-bindgen-react-native/actions/workflows/ci.yml) | |||
[![build-bob compatibility](https://github.com/jhugman/uniffi-bindgen-react-native/actions/workflows/compat.yml/badge.svg)](https://github.com/jhugman/uniffi-bindgen-react-native/actions/workflows/compat.yml) |
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.
😻
error "No available iOS simulator found" | ||
fi | ||
|
||
xcodebuild -workspace "${IOS_NAME}Example.xcworkspace" -scheme "${IOS_NAME}Example" -configuration Debug -destination "id=$udid" || error "Failed to build iOS example" |
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.
Oh, I see how you're getting rid of IOS_NAME now.
if [ -f "$PKG_JSON_MIXIN" ] ; then | ||
jq -s '.[0] * .[1]' ./package.json "$PKG_JSON_MIXIN" > ./package.json.new | ||
mv ./package.json.new ./package.json | ||
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.
Neat.
bob-version: | ||
- 0.42.2 | ||
- 0.42.3 | ||
- latest | ||
rn-version: | ||
- 0.76.0 | ||
- latest |
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 love this.
Thanks. I guess since this is fairly well isolated, I'll let it sit for a while in hopes that I can figure out #165 and then merge both together. |
fn default() -> Self { | ||
Self { | ||
ios: default_ios_codegen_output_dir(), | ||
android: default_android_codegen_output_dir(), |
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.
It feels slightly awkward having to pass in the default values here and in the serde
macros. But I think we need to do it this way to account for either the whole object missing or only one of its fields?
@jhugman I've merged the other PR into this one after addressing your feedback from there. Sorry for the multi-PR spam. 🙈 |
Hm, I'm unsure why the integration tests are failing now. 🤔
It's failing on this line but I haven't actually touched that part. |
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.
No description provided.