Skip to content

Commit

Permalink
feat: macOS arm64 build (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
segevfiner committed Oct 27, 2023
1 parent ac13005 commit 8f8986f
Showing 1 changed file with 45 additions and 5 deletions.
50 changes: 45 additions & 5 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
target-node: [14, 16, 18, 19]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Use Node.js 14
uses: actions/setup-node@v1
- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18

- run: yarn install --ignore-engines

Expand All @@ -34,8 +34,48 @@ jobs:
run: |
(test -f dist/*.sha256sum && echo ::set-output name=EXISTS::true) || echo ::set-output name=EXISTS::false
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: steps.check_file.outputs.EXISTS == 'true'
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@v4

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18

- run: yarn install --ignore-engines

- run: yarn start --node-range node${{ matrix.target-node }} --arch arm64 --output dist
env:
CC: clang -arch arm64
CXX: clang++ -arch arm64
CC_host: clang
CXX_host: clang++

- 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@v3
if: steps.check_file.outputs.EXISTS == 'true'
with:
name: node${{ matrix.target-node }}-macos-arm64
path: dist/*

0 comments on commit 8f8986f

Please sign in to comment.