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

WIP: Arm support for Node #502

Closed
wants to merge 4 commits into from
Closed

WIP: Arm support for Node #502

wants to merge 4 commits into from

Conversation

birkskyum
Copy link
Member

No description provided.

@birkskyum birkskyum changed the title WIP: Node CI on macos-12-arm WIP: Arm support for Node Sep 23, 2022
@birkskyum
Copy link
Member Author

@jutaz , this is the problem at hand.

@jutaz
Copy link
Collaborator

jutaz commented Sep 23, 2022

Cool, I’ll take a look over the weekend, hopefully 👍

@acalcutt
Copy link
Collaborator

acalcutt commented Sep 23, 2022

I think arm was pretty much working in #459

i doesn't run in every version of node like the current workflow, so i doesn't have the node 14 issue.

@birkskyum
Copy link
Member Author

birkskyum commented Sep 23, 2022

My understanding of the problem is that it is possible to manually activate Rosetta 2 on the machine with arch -x86_64 zsh, then run nvm install 14 to install node with Rosetta 2, and that's it. It just doesn't work with the setup-node action. Basically this

@acalcutt
Copy link
Collaborator

acalcutt commented Sep 23, 2022

i could update to use 'macos-12-arm' and remove node 10 there.

@birkskyum
Copy link
Member Author

birkskyum commented Sep 23, 2022

@acalcutt , that would be great!

@acalcutt
Copy link
Collaborator

One positive is the workflow is less 'heavy'. It only runs on one node version per os instead of 3 node versions. It use the fact that one build makes multiple node abi versions, so it won't need to run on node 14 arm can't build on.

Downside

  • when using node-pre-gyp with the --target , it uses a abi_crosswalk.json file that is out of date. I had to make my own version of the package to support node 18. We may be able to change back to the officially one if they add node 18 support.
  • It is not tested for every node version, just the node version it builds on.

@birkskyum
Copy link
Member Author

birkskyum commented Sep 23, 2022

Is it possible for an m1 runner to make builds of 16 and 18 that can be used on x86 macs as well?

@acalcutt
Copy link
Collaborator

I tried to make a universal build like you suggested here https://stackoverflow.com/questions/65157483/macos-build-universal-binary-2-with-cmake, with "CMAKE_OSX_ARCHITECTURES=arm64;x86_64" but it was always missing compenents from the architecture it wasn't running on.

@acalcutt
Copy link
Collaborator

acalcutt commented Sep 23, 2022

FYI, I think I found that command needed quotes like

-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"

@birkskyum birkskyum closed this Sep 23, 2022
@birkskyum birkskyum deleted the node-ci-on-mac-arm branch January 11, 2023 18:40
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.

3 participants