From e5162327a0219b71420d6899f9fde03ffad4e261 Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Wed, 3 May 2023 16:45:28 +0200 Subject: [PATCH] Update Node versions --- .github/workflows/build.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a4d7f7c..13d951b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,10 @@ on: types: - released +env: + NODE_BUILD_CMD: npx --no-install prebuild -r node -t 14.0.0 -t 16.0.0 -t 18.0.0 -t 20.0.0 + ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -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 + jobs: test: @@ -24,6 +28,7 @@ jobs: - 14 - 16 - 18 + - 20 fail-fast: false name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -35,6 +40,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + - name: Update node-gyp on Node 14 if: ${{ matrix.os == 'windows-latest' && matrix.node == '14' }} run: | @@ -43,8 +49,8 @@ jobs: $NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle" cd $NodeModulesPath npm install node-gyp@9.x - - name: Update node-gyp on Node 16 and 18 - if: ${{ matrix.os == 'windows-latest' && ( matrix.node == '16' || matrix.node == '18' ) }} + - name: Update node-gyp on Node 16+ + if: ${{ matrix.os == 'windows-latest' && matrix.node != '14' }} shell: powershell run: | npm install --global node-gyp@latest @@ -90,13 +96,18 @@ jobs: with: node-version: 18 - run: npm install --ignore-scripts - - run: npx --no-install prebuild -r node -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 -u ${{ secrets.GH_TOKEN }} + - run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GH_TOKEN }} # Prebuilding for Electron 13+ on Windows fails with # win_delay_load_hook.cc # conversions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class v8::Local __cdecl v8::ArrayBuffer::New(class v8::Isolate *,class std::shared_ptr)" (__imp_?New@ArrayBuffer@v8@@SA?AV?$Local@VArrayBuffer@v8@@@2@PEAVIsolate@2@V?$shared_ptr@VBackingStore@v8@@@std@@@Z) referenced in function "void __cdecl node_tree_sitter::InitConversions(class v8::Local)" (?InitConversions@node_tree_sitter@@YAXV?$Local@VObject@v8@@@v8@@@Z) [D:\a\node-tree-sitter\node-tree-sitter\build\tree_sitter_runtime_binding.vcxproj] - if: matrix.os != 'windows-latest' - run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 -u ${{ secrets.GH_TOKEN }} + run: | + ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GH_TOKEN }} # - if: matrix.os == 'windows-latest' - # run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32 -u ${{ secrets.GH_TOKEN }} + # run: | + # ${{ env.NODE_BUILD_CMD }} --arch ia32 -u ${{ secrets.GH_TOKEN }} + # ${{ env.ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GH_TOKEN }} - if: matrix.os == 'macos-latest' - run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch arm64 -u ${{ secrets.GH_TOKEN }} + run: | + ${{ env.NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GH_TOKEN }} + ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GH_TOKEN }}