fix(NODE-6590): add build for x64 macos #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: [main] | |
workflow_dispatch: {} | |
workflow_call: {} | |
name: Build | |
jobs: | |
macos_and_windows: | |
strategy: | |
matrix: | |
os: [macos-latest, windows-2019, macOS] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16.20.1 | |
cache: "npm" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install zstd | |
run: npm run install-zstd | |
shell: bash | |
- name: install dependencies and compile | |
run: npm install --loglevel verbose && npm run prebuild | |
shell: bash | |
# # macOS arm64 builds are universal macOS binaries. We copy the arm64 build | |
# # into the location that prebuild expects for a x64 build so we can | |
# # install on both architectures. | |
# - name: copy universal macos binary to platform specific binaries | |
# if: ${{ matrix.os == 'macos-latest' }} | |
# shell: bash | |
# run: bash etc/make-macos-x64-build.sh | |
- id: upload | |
name: Upload prebuild | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.os }} | |
path: prebuilds/ | |
if-no-files-found: "error" | |
retention-days: 1 | |
compression-level: 0 | |
glibc: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
linux_arch: [s390x, arm64, amd64] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Run Buildx | |
run: | | |
docker buildx create --name builder --bootstrap --use | |
docker buildx build \ | |
--platform linux/${{ matrix.linux_arch }} \ | |
--build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \ | |
--build-arg="NODE_VERSION=16.20.1" \ | |
--output type=local,dest=./prebuilds,platform-split=false \ | |
-f ./.github/docker/Dockerfile.glibc \ | |
. | |
- id: upload | |
name: Upload prebuild | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-linux-glibc-${{ matrix.linux_arch }} | |
path: prebuilds/ | |
if-no-files-found: "error" | |
retention-days: 1 | |
compression-level: 0 | |
musl: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
linux_arch: [amd64, arm64] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Run Buildx | |
run: | | |
docker buildx create --name builder --bootstrap --use | |
docker --debug buildx build --progress=plain --no-cache \ | |
--platform linux/${{ matrix.linux_arch }} \ | |
--build-arg="PLATFORM=${{ matrix.linux_arch == 'arm64' && 'arm64v8' || matrix.linux_arch }}" \ | |
--build-arg="NODE_VERSION=16.20.1" \ | |
--output type=local,dest=./prebuilds,platform-split=false \ | |
-f ./.github/docker/Dockerfile.musl \ | |
. | |
- id: upload | |
name: Upload prebuild | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-linux-musl-${{ matrix.linux_arch }} | |
path: prebuilds/ | |
if-no-files-found: "error" | |
retention-days: 1 | |
compression-level: 0 |