diff --git a/.github/workflows/ci-darwin-arm64v8.yml b/.github/workflows/ci-darwin-arm64v8.yml new file mode 100644 index 00000000..ef95728a --- /dev/null +++ b/.github/workflows/ci-darwin-arm64v8.yml @@ -0,0 +1,27 @@ +name: CI (MacStadium) +on: + - push + - pull_request +jobs: + CI: + runs-on: macos-m1 + defaults: + run: + shell: /usr/bin/arch -arch arm64e /bin/bash -l {0} + steps: + - name: Dependencies + uses: actions/setup-node@v2 + with: + node-version: 16 + architecture: arm64 + - name: Checkout + uses: actions/checkout@v2 + - name: Install + run: npm install --build-from-source --unsafe-perm + - name: Test + run: npm test + - name: Prebuild + if: startsWith(github.ref, 'refs/tags/') + env: + prebuild_upload: ${{ secrets.GITHUB_TOKEN }} + run: npx prebuild --runtime napi --target 5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6db02916..b1bbeb6d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +name: CI (GitHub) on: - push - pull_request diff --git a/docs/install.md b/docs/install.md index 0d9c1816..597de0bb 100644 --- a/docs/install.md +++ b/docs/install.md @@ -18,12 +18,13 @@ Ready-compiled sharp and libvips binaries are provided for use with Node.js v10+ on the most common platforms: * macOS x64 (>= 10.13) +* macOS ARM64 * Linux x64 (glibc >= 2.17, musl >= 1.1.24) * Linux ARM64 (glibc >= 2.29, musl >= 1.1.24) * Windows x64 * Windows x86 -An ~7.5MB tarball containing libvips and its most commonly used dependencies +An ~7MB tarball containing libvips and its most commonly used dependencies is downloaded via HTTPS and stored within `node_modules/sharp/vendor` during `npm install`. This provides support for the @@ -31,7 +32,6 @@ JPEG, PNG, WebP, AVIF, TIFF, GIF (input) and SVG (input) image formats. The following platforms have prebuilt libvips but not sharp: -* macOS ARM64 * Linux ARMv6 * Linux ARMv7 (glibc >= 2.28) * Windows ARM64 diff --git a/install/libvips.js b/install/libvips.js index e294fb00..7a83393e 100644 --- a/install/libvips.js +++ b/install/libvips.js @@ -24,6 +24,7 @@ const minimumGlibcVersionByArch = { const hasSharpPrebuild = [ 'darwin-x64', + 'darwin-arm64', 'linux-arm64', 'linux-x64', 'linuxmusl-x64',