Skip to content

Commit

Permalink
Update Node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed May 3, 2023
1 parent c4ed718 commit e516232
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -24,6 +28,7 @@ jobs:
- 14
- 16
- 18
- 20
fail-fast: false
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -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: |
Expand All @@ -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
Expand Down Expand Up @@ -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<class v8::ArrayBuffer> __cdecl v8::ArrayBuffer::New(class v8::Isolate *,class std::shared_ptr<class v8::BackingStore>)" (__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<class v8::Object>)" (?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 }}

0 comments on commit e516232

Please sign in to comment.