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

fix: use macos-13/14 runner #40

Merged
merged 14 commits into from
Sep 6, 2024
29 changes: 26 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
macos-x64:
runs-on: macos-11.0
runs-on: macos-13

strategy:
fail-fast: false
Expand All @@ -24,6 +24,13 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18

- name: Check arch is x64
run: |
if [[ $(uname -m) != "x86_64" ]]; then
echo "This job should run on x64 architecture"
exit 1
fi

- run: yarn install --ignore-engines

Expand All @@ -33,6 +40,8 @@ jobs:
pip install setuptools

- run: yarn start --node-range node${{ matrix.target-node }} --output dist
env:
MAKE_JOB_COUNT: 2 # prevent to run out of memory

- name: Check if binary is compiled, skip if download only
id: check_file
Expand All @@ -47,7 +56,7 @@ jobs:
path: dist/*

macos-arm64:
runs-on: macos-11.0
runs-on: macos-13 # macos-14 is arm64: https://github.com/actions/runner-images#available-images but not working

strategy:
fail-fast: false
Expand All @@ -66,15 +75,29 @@ jobs:
with:
node-version: 18

- name: Check arch is x64 # arm64
run: |
if [[ $(uname -m) != "x86_64" ]]; then
echo "This job should run on x64 architecture"
exit 1
fi

- run: yarn install --ignore-engines


# add missing distutils package to python 3.12
- name: Install distutils
run: |
pip install setuptools
if [[ ${{ matrix.target-node }} == 18 ]]; then
pip install setuptools
else
brew install python-setuptools
fi

- run: yarn start --node-range node${{ matrix.target-node }} --arch arm64 --output dist
env:
MAKE_JOB_COUNT: 2 # prevent to run out of memory
# uncomment the following lines to build x64
CC: clang -arch arm64
CXX: clang++ -arch arm64
CC_host: clang
Expand Down