From f79b7a3585146d5228734bc405cf3d1a0b744a34 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Fri, 6 Sep 2024 08:14:58 +0200 Subject: [PATCH] fix: use macos-13/14 runner (#40) --- .github/workflows/build-macos.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index caf40945..f894ee6f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -6,7 +6,7 @@ on: jobs: macos-x64: - runs-on: macos-11.0 + runs-on: macos-13 strategy: fail-fast: false @@ -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 @@ -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 @@ -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 @@ -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