-
Notifications
You must be signed in to change notification settings - Fork 166
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
Supporting multiple versions of xcode #1964
Comments
More versions on single machines uses less bulid machines, which seems good, so perhaps the sudoers route is the way to go? Also, old xcodes are only used for LTS lines that are rarely built, keeping the machines around for rare use isn't efficient. Note that xcode selection (as you'd guess from needing to be root) is global, so only one built at a time could run on a machine... but maybe its like that already, its not good to have parallel builds on the same machine. |
I think it's safe to assume a single build will occur on a machine at one time. To be safe we should probably have a default version that is always set at the end of a run regardless of what happens, because there are numerous jobs that use the osx machines other than standard test builds, like citgm and libuv, it'd be annoying for them to have one compiler for one run and another for the next. We could create a sudoers special-case for xcode-select, we already do that on some hosts that use Docker to switch environments, giving narrow access to a certain command build/ansible/roles/jenkins-worker/tasks/partials/docker-host.yml Lines 34 to 38 in ee7d97f
More machines will be a bigger problem, so we should try and solve this for single machines. We need to handle this for release builds too. |
How do we get the multiple versions of xcode onto these machines? We currently have to resort to this abomination for older versions already https://github.com/nodejs/build/blob/master/ansible/roles/package-upgrade/files/install-xcode.sh, only George has experience with that one, so I guess one of us needs to upskill here, upgrade it for 10.9, 10.10, and get ansible to do the multiple-versions thing. |
If we are going the sudoers and less machines route, then @AshCripps is going to take a shot at figuring this out. He's not in the buildwg yet, not even a node collaborator, but he's working on our team and once he's made enough contributions to demonstrate his usefulness, we'll nominate him. |
oh, awesome, help managing our macstadium setup is certainly something we're in need of |
Old versions of xcode can be found here - https://developer.apple.com/download/more/ You can scroll through the list select just the command line tools options and grab the link from there. The link can be curled in the same way as is done in install-xcode.sh build/ansible/roles/package-upgrade/files/install-xcode.sh Lines 29 to 34 in 9735105
Just need to update the script to install the versions of xcode we want. Made a first pass at editing select-compiler.sh - #1967 I have discovered on my local machine that xcode8 does not run on mojave so we would have to be more selective on which machines run older node version builds as newer os's cannot run some older versions of xcode |
We'd want to install 2 or more versions on the same machine. It might make sense to have ansible select which ones to install based on the osx version. Ideally we could set a list of each OSX version that would control which xcode versions would be installed. We would then use the selector script to build each Node.js version on machines with the right osx/xcode combinations. |
don't know if it's helpful but @cclauss just shared this with me: https://blog.macstadium.com/blog/catalina-released-and-live-on-orka |
Unfortunately, MacStadium does not yet appear to support macOS 10.15 Catalina (scroll down to Choose your OS). Given that MacStadium are the source of Macs for both Node.js Jenkins and GitHub Actions CI and given that neither CircleCI nor Travis CI currently support Catalina I am currently out of options to test the current release of macOS. |
Conversation on getting recent OS X hosts running in macstadium is #1732 |
We don't want to do this anymore, we want to always build on a current Xcode, specifically, a current enough one to do notarization, so while experimentation was done on using xcode-select to choose an Xcode version based on the release line, that turned out to be a dead end. |
From disscusion here: nodejs/node#29493 (comment)
What is the opinion on multple xcode version?
From a bit of research you can use xcode-select to change versions inside select-compiler.sh but this requires sudo root to do so which the iojs user on the build machines does not have.
This gives two options:
or
The text was updated successfully, but these errors were encountered: