Skip to content

Commit

Permalink
feat: macos arm prebuilts (#160)
Browse files Browse the repository at this point in the history
* feat: macos arm prebuilts

* chore: drop invalid runners and windows-2022 from legacy node

* chore: add in a name to the legacy flow

* chore: remove node 12-15 from legacy arm (they don't come with arm versions)
  • Loading branch information
vladfrangu authored Oct 16, 2024
1 parent 8f52fa0 commit 31da49d
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 12 deletions.
63 changes: 57 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, ubuntu-20.04, ubuntu-22.04, windows-2019]
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, 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,57 @@ 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:
name: Prebuild aarch64 macOS (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14]
node: [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-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
77 changes: 71 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, ubuntu-20.04, ubuntu-22.04, windows-2019]
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, 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,71 @@ jobs:
with:
path: 'build/stage/**/*.tar.gz'

build_aarch64_legacy_nodejs_mac:
name: Prebuild aarch64 macOS (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14]
node: [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-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 31da49d

Please sign in to comment.