From 6317726c701a39bd9419f089b744bbb74724e3ff Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Wed, 21 Jun 2023 20:58:13 +0100 Subject: [PATCH] Prebuild for more recent Node/Electron versions --- .github/workflows/build.yml | 32 ++++++++++++++++++++++---------- binding.gyp | 23 ++++++++++++++++++----- package.json | 2 +- 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 211fb8cc..d4468557 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ on: - master env: - NODE_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --strip - ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip + NODE_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 -t 20.0.0 --strip + ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 5.0.0 -t 6.0.0 -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 --strip jobs: @@ -19,8 +19,8 @@ jobs: matrix: os: - windows-2019 - - ubuntu-latest - macos-latest + - ubuntu-latest node: - 10 - 12 @@ -47,9 +47,9 @@ jobs: strategy: matrix: os: - - ubuntu-latest - windows-2019 - macos-latest + - ubuntu-latest node: - 10 - 12 @@ -67,6 +67,18 @@ jobs: node: 12 - os: macos-latest node: 14 + # Similar issue but in this case the error is more direct: + # + # #error "It looks like you are building this native module without + # using the right config.gypi. This normally means that you need to + # update electron-rebuild (>=3.2.8) or node-gyp (>=8.4.0) if you're + # building modules directly." + - os: ubuntu-latest + node: 10 + - os: ubuntu-latest + node: 12 + - os: ubuntu-latest + node: 14 fail-fast: false name: Prebuild with Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -81,12 +93,12 @@ jobs: node-version: ${{ matrix.node }} - run: npm install - if: matrix.os == 'windows-latest' - run: | - ${{ env.NODE_PREBUILD_CMD }} --arch ia32 - ${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32 + run: ${{ env.NODE_PREBUILD_CMD }} --arch ia32 + - if: matrix.os == 'windows-latest' + run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32 + - if: matrix.os == 'macos-latest' + run: ${{ env.NODE_PREBUILD_CMD }} --arch arm64 - if: matrix.os == 'macos-latest' - run: | - ${{ env.NODE_PREBUILD_CMD }} --arch arm64 - ${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64 + run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64 - run: ${{ env.NODE_PREBUILD_CMD }} - run: ${{ env.ELECTRON_PREBUILD_CMD }} diff --git a/binding.gyp b/binding.gyp index 2f509f59..9ec9457d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -19,18 +19,31 @@ "vendor/tree-sitter/lib/include", "