realm-js
realm-js copied to clipboard
CI - M1 Setup
The Realm JS team needs an M1 self-hosted runner in order to properly ensure Realm JS functions on an M1. This ticket will be used to track what is needed to be configured on this machine:
- homebrew
- ccache
- cmake
- watchman
- ios-deploy
- android build environment
- ios build environment
- nvm
- ??? anything else ???
The Kotlin team will only be using the M1 for building and testing things specifically for the M1, so by the looks of it we only need ccache, cmake and XCode right now.
I'm slightly concerned about how we handle different versions though, e.g. Kotlin has checks and limits on what versions of cmake we can use, since their versions have various breaking changes. Right now we are using 3.22.1
. So maybe we need to find a pattern where multiple versions can be installed and then setup on the PATH
I'm not sure I understand the need for all those items on the list. To be clear, the intention is to run macOS tests on the M1 runner, not build anything native or run any mobile platform tests. Can you clarify the need for the software listed above and make sure to remove anything that is not strictly necessary.
I would recommend against homebrew - the self-hosted builders are not ephemeral and we should be able to provision what we need ahead of time instead of installing things during the build.
@cmelchior CMake is backwards-compatible so you really shouldn’t need to keep multiple versions around. If you’ve had issues with compatibility please ping me and I’ll be happy to help you solve them so you aren’t dependent on a set of CMake versions.
@nirinchev I’m not sure about Kotlin, but the JS tests on Node.js and React Native sadly require ability to build the test application on the same machine it runs on and the cost of splitting building and running tests across CI machines is not trivial.
Yeah, building the tests on the machine is fine, but we've already built the native binaries there, so I imagine we'd only need node and whatever RN needs to build an application.
I have updated the description, and software on the list should make it possible to build for node.js.
ccache/cmake/nvm should be available from the runner now. Homebrew is installed, but the github runner doesn't have permission to install things.
Unfortunately the Kotlin buildsystem also requires the Android SDK, even though it is building for Mac
@kneth What's the status of this and what's missing (if anything)?
@bmunkholm
- From this comment, JS is probably ready to try it
- According to this comment it is still unclear if Kotlin is ready
I had clarified in slack that "android SDK" means "platform tools", which are available - so for both I'm waiting for feedback.
This has been added last week: https://github.com/realm/realm-dart/issues/1104
A new requirement is CocoaPods (didn't find a new issue for that) which needs some discussion.