Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix build/release CI #148

Merged
merged 12 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 26 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
branches:
- '**'
jobs:
build_x86_64:
name: Build x86_64
build_x86_64_legacy_nodejs:
name: Build x86_64 (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11, macos-12, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [12, 13, 14, 15, 16, 17]
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -26,20 +26,25 @@ jobs:
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_x86_64_node_ge_18:
name: Build x86_64 node >= 18
build_x86_64:
name: Build x86_64
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [18, 19]
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [18, 20, 21]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -56,14 +61,14 @@ jobs:
run: npm run build

build_musl_x86_64:
name: Build x86_64(musl)
name: Build x86_64 (musl)
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node }}-alpine
strategy:
fail-fast: false
matrix:
node: [12, 13, 14, 15, 16, 17, 18, 19]
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
steps:
- name: Setup env with Node v${{ matrix.node }}
run: |
Expand All @@ -79,14 +84,14 @@ jobs:
- name: Package prebuild
run: npm run build

build_aarch64:
name: Prebuild aarch64
build_aarch64_legacy_nodejs:
name: Prebuild aarch64 (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
node: [12, 13, 14, 15, 16, 17]
os: [ubuntu-20.04, ubuntu-22.04]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -101,17 +106,17 @@ jobs:

- name: Package prebuild
run: |
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
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_node_ge_18:
name: Prebuild aarch64 node >= 18
build_aarch64:
name: Prebuild aarch64
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
node: [18, 19]
node: [18, 20, 21]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -126,18 +131,18 @@ jobs:

- name: Package prebuild
run: |
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
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_musl_aarch64:
name: Prebuild aarch64(musl)
name: Prebuild aarch64 (musl)
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node }}-alpine
strategy:
fail-fast: false
matrix:
node: [12, 13, 14, 15, 16, 17, 18, 19]
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
steps:
- name: Setup env with Node v${{ matrix.node }}
run: |
Expand Down
47 changes: 26 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on:
release:
types: [published]
jobs:
build_x86_64:
name: Prebuild x86_64
build_x86_64_legacy_nodejs:
name: Prebuild x86_64 (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11, macos-12, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [12, 13, 14, 15, 16, 17]
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -20,6 +20,11 @@ jobs:
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

Expand All @@ -33,14 +38,14 @@ jobs:
with:
path: 'build/stage/**/*.tar.gz'

build_x86_64_node_ge_18:
name: Build x86_64 node >= 18
build_x86_64:
name: Prebuild x86_64
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [18, 19]
os: [macos-11, macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019]
node: [18, 20, 21]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -64,14 +69,14 @@ jobs:
path: 'build/stage/**/*.tar.gz'

build_musl_x86_64:
name: Prebuild x86_64(musl)
name: Prebuild x86_64 (musl)
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node }}-alpine
strategy:
fail-fast: false
matrix:
node: [12, 13, 14, 15, 16, 17, 18, 19]
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
steps:
- name: Setup env with Node v${{ matrix.node }}
run: |
Expand All @@ -94,14 +99,14 @@ jobs:
with:
path: 'build/stage/**/*.tar.gz'

build_aarch64:
name: Prebuild aarch64
build_aarch64_legacy_nodejs:
name: Prebuild aarch64 (legacy Node.js)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
node: [12, 13, 14, 15, 16, 17]
os: [ubuntu-20.04, ubuntu-22.04]
node: [12, 13, 14, 15, 16, 17, 19]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -116,7 +121,7 @@ jobs:

- name: Package prebuild
run: |
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
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

- name: Upload prebuild asset
Expand All @@ -126,14 +131,14 @@ jobs:
with:
path: 'build/stage/**/*.tar.gz'

build_aarch64_node_ge_18:
name: Prebuild aarch64 node >= 18
build_aarch64:
name: Prebuild aarch64
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
node: [18, 19]
node: [18, 20, 21]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -148,7 +153,7 @@ jobs:

- name: Package prebuild
run: |
sudo apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
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

- name: Upload prebuild asset
Expand All @@ -159,14 +164,14 @@ jobs:
path: 'build/stage/**/*.tar.gz'

build_musl_aarch64:
name: Prebuild aarch64(musl)
name: Prebuild aarch64 (musl)
runs-on: ubuntu-latest
container:
image: node:${{ matrix.node }}-alpine
strategy:
fail-fast: false
matrix:
node: [12, 13, 14, 15, 16, 17, 18, 19]
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]
steps:
- name: Setup env with Node v${{ matrix.node }}
run: |
Expand Down
Loading