Skip to content

Commit

Permalink
feat: macos arm prebuilts
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Jul 29, 2024
1 parent 8f52fa0 commit d8e2973
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 12 deletions.
62 changes: 56 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
node: [18, 20, 21, 22]
steps:
- name: Checkout repository
Expand Down Expand Up @@ -84,8 +84,8 @@ jobs:
- name: Package prebuild
run: npm run build

build_aarch64_legacy_nodejs:
name: Prebuild aarch64 (legacy Node.js)
build_aarch64_legacy_nodejs_linux:
name: Prebuild aarch64 Linux (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -109,8 +109,8 @@ jobs:
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
build_aarch64:
name: Prebuild aarch64
build_aarch64_linux:
name: Prebuild aarch64 Linux
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -134,6 +134,56 @@ jobs:
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-pre-gyp --target_arch=arm64 configure build package
build_aarch64_legacy_nodejs_mac:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-13-xlarge, macos-14]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install dependencies
run: npm install --build-from-source

- name: Package prebuild
run: npm run build

build_aarch64_mac:
name: Prebuild aarch64 macOS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-13-xlarge, macos-14]
node: [18, 20, 21, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm install --build-from-source

- name: Package prebuild
run: npm run build

build_musl_aarch64:
name: Prebuild aarch64 (musl)
runs-on: ubuntu-latest
Expand Down
76 changes: 70 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022]
node: [18, 20, 21, 22]
steps:
- name: Checkout repository
Expand Down Expand Up @@ -99,8 +99,8 @@ jobs:
with:
path: 'build/stage/**/*.tar.gz'

build_aarch64_legacy_nodejs:
name: Prebuild aarch64 (legacy Node.js)
build_aarch64_legacy_nodejs_linux:
name: Prebuild aarch64 Linux (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -131,8 +131,8 @@ jobs:
with:
path: 'build/stage/**/*.tar.gz'

build_aarch64:
name: Prebuild aarch64
build_aarch64_linux:
name: Prebuild aarch64 Linux
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -163,6 +163,70 @@ jobs:
with:
path: 'build/stage/**/*.tar.gz'

build_aarch64_legacy_nodejs_mac:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-13-xlarge, macos-14]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install dependencies
run: npm install --build-from-source

- name: Package prebuild
run: npm run build

- name: Upload prebuild asset
uses: icrawl/action-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: 'build/stage/**/*.tar.gz'

build_aarch64_mac:
name: Prebuild aarch64 macOS
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-13-xlarge, macos-14]
node: [18, 20, 21, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm install --build-from-source

- name: Package prebuild
run: npm run build

- name: Upload prebuild asset
uses: icrawl/action-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: 'build/stage/**/*.tar.gz'

build_musl_aarch64:
name: Prebuild aarch64 (musl)
runs-on: ubuntu-latest
Expand Down

0 comments on commit d8e2973

Please sign in to comment.