From d8e29737d30048a723065323ca0fd328c89d82f6 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 29 Jul 2024 11:05:01 +0300 Subject: [PATCH 1/4] feat: macos arm prebuilts --- .github/workflows/build.yml | 62 +++++++++++++++++++++++++--- .github/workflows/release.yml | 76 ++++++++++++++++++++++++++++++++--- 2 files changed, 126 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1d2eff..2303070 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9a663a..0da9f44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 From 9b473de020daa5336df3efcafff0911bb2b43b46 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 29 Jul 2024 11:12:19 +0300 Subject: [PATCH 2/4] chore: drop invalid runners and windows-2022 from legacy node --- .github/workflows/build.yml | 8 ++++---- .github/workflows/release.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2303070..9fdf696 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] + 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 @@ -43,7 +43,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] + os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] node: [18, 20, 21, 22] steps: - name: Checkout repository @@ -139,7 +139,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13-xlarge, macos-14] + os: [macos-14] node: [12, 13, 14, 15, 16, 17, 19] steps: - name: Checkout repository @@ -167,7 +167,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13-xlarge, macos-14] + os: [macos-14] node: [18, 20, 21, 22] steps: - name: Checkout repository diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0da9f44..4fa7f62 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] + 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 @@ -44,7 +44,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-12, macos-13, macos-14-large, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] + os: [macos-12, macos-13, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] node: [18, 20, 21, 22] steps: - name: Checkout repository @@ -168,7 +168,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13-xlarge, macos-14] + os: [macos-14] node: [12, 13, 14, 15, 16, 17, 19] steps: - name: Checkout repository @@ -203,7 +203,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-13-xlarge, macos-14] + os: [macos-14] node: [18, 20, 21, 22] steps: - name: Checkout repository From 63fc2a6301ac2471cf0862e748784b6b29b882d4 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 29 Jul 2024 11:16:23 +0300 Subject: [PATCH 3/4] chore: add in a name to the legacy flow --- .github/workflows/build.yml | 1 + .github/workflows/release.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fdf696..fc47352 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,6 +135,7 @@ jobs: 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fa7f62..c56e62d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -164,6 +164,7 @@ jobs: 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 From 673f3decb7004f1afc9cc1c9ae35e723eb0d5f18 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Mon, 29 Jul 2024 11:26:06 +0300 Subject: [PATCH 4/4] chore: remove node 12-15 from legacy arm (they don't come with arm versions) --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc47352..2744c55 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,7 +141,7 @@ jobs: fail-fast: false matrix: os: [macos-14] - node: [12, 13, 14, 15, 16, 17, 19] + node: [16, 17, 19] steps: - name: Checkout repository uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c56e62d..a8655e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -170,7 +170,7 @@ jobs: fail-fast: false matrix: os: [macos-14] - node: [12, 13, 14, 15, 16, 17, 19] + node: [16, 17, 19] steps: - name: Checkout repository uses: actions/checkout@v3