-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
macOS arm64 build #8
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,38 @@ jobs: | |
with: | ||
name: node${{ matrix.target-node }}-macos-x64 | ||
path: dist/* | ||
|
||
macos-arm64: | ||
runs-on: macos-11.0 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target-node: [14, 16, 18, 19] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: latest | ||
|
||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
|
||
- run: yarn install --ignore-engines | ||
|
||
- run: yarn start --node-range node${{ matrix.target-node }} --arch arm64 --output dist | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this work? Is it actually compiling the node binary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's what the scripts in this package do. As far as I remember. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that script coming from the https://github.com/actions/setup-node/tree/main/src. I'm not super familiar with GitHub Actions, where can I find the source for what the actual script is? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.g. https://github.com/yao-pkg/pkg-fetch/blob/main/lib/build.ts, with the actual entry point defined in package.json. This entire repo is essentially a script/package to build and fetch patched node binaries suitable for pkg. |
||
|
||
- name: Check if binary is compiled | ||
id: check_file | ||
run: | | ||
(test -f dist/*.sha256sum && echo ::set-output name=EXISTS::true) || echo ::set-output name=EXISTS::false | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: steps.check_file.outputs.EXISTS == 'true' | ||
with: | ||
name: node${{ matrix.target-node }}-macos-arm64 | ||
path: dist/* |
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.
Use matrix.target-node
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 think that's only the node version that is used for running the build script and doesn't matter as long as its new enough to run it. No need to vary it per target-node.
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.
At least use 18/20 as it's the currently lts
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.
Yeah. Probably should update this for all the jobs.