From af6aa8a690c44155bc68c0e988e58d9f3910a20e Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 1 Feb 2024 11:35:45 +0000 Subject: [PATCH] CI: Add macOS 14 (ARM64) Replaces runner previously and very kindly donated by MacStadium --- .github/workflows/ci.yml | 56 ++++++++-------------------------------- 1 file changed, 11 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af70ea09f..1a68a87b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,17 @@ jobs: nodejs_version: "^20.3.0" nodejs_version_major: 20 platform: darwin-x64 + - os: macos-14 + nodejs_arch: arm64 + nodejs_version: "^18.17.0" + nodejs_version_major: 18 + platform: darwin-arm64 + prebuild: true + - os: macos-14 + nodejs_arch: arm64 + nodejs_version: "^20.3.0" + nodejs_version_major: 20 + platform: darwin-arm64 - os: windows-2019 nodejs_arch: x86 nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10 @@ -193,48 +204,3 @@ jobs: npm_config_nodedir: emscripten prebuild_upload: ${{ secrets.GITHUB_TOKEN }} run: cd src && ln -s ../package.json && emmake npx prebuild --platform=emscripten --arch=wasm32 --strip=0 - macstadium-runner: - permissions: - contents: write - name: ${{ matrix.platform }} - Node.js ${{ matrix.nodejs_version_major }} ${{ matrix.prebuild && '- prebuild' }} - runs-on: macos-m1 - strategy: - fail-fast: false - matrix: - include: - - nodejs_arch: x64 - nodejs_version: "^18.17.0" - nodejs_version_major: 18 - platform: darwin-x64 - - nodejs_arch: arm64 - nodejs_version: "^18.17.0" - nodejs_version_major: 18 - platform: darwin-arm64 - prebuild: true - defaults: - run: - shell: /usr/bin/arch -arch arm64e /bin/bash -l {0} - steps: - - name: Dependencies (Node.js) - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.nodejs_version }} - architecture: ${{ matrix.nodejs_arch }} - - name: Checkout - uses: actions/checkout@v4 - - name: Install - run: npm install --build-from-source - - name: Test - run: npm test - - name: Test packaging - run: | - npm run package-from-local-build - npm pkg set "optionalDependencies.@img/sharp-${{ matrix.platform }}=file:./npm/${{ matrix.platform }}" - npm run clean - npm install --ignore-scripts - npm test - - name: Prebuild - if: matrix.prebuild && startsWith(github.ref, 'refs/tags/') - env: - prebuild_upload: ${{ secrets.GITHUB_TOKEN }} - run: cd src && ln -s ../package.json && npx prebuild