@@ -17,13 +17,19 @@ jobs:
1717 strategy :
1818 matrix :
1919 os :
20- # - ubuntu-latest
21- # - macos-latest
22- - windows-2019
20+ - ubuntu-latest
21+ - macos-latest
22+ - windows-latest
2323 node :
2424 - 14
2525 - 16
2626 - 18
27+ # These fail with a useless error message
28+ exclude :
29+ - os : windows-latest
30+ node : 16
31+ - os : windows-latest
32+ node : 18
2733 fail-fast : false
2834 name : Testing Node ${{ matrix.node }} on ${{ matrix.os }}
2935 runs-on : ${{ matrix.os }}
4248 $NodeDirPath = Split-Path $WhereNode -Parent
4349 $NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
4450 cd $NodeModulesPath
45- npm install node-gyp@8 .x
51+ npm install node-gyp@9 .x
4652 - run : npm install
4753 - run : npm test
4854
5258 os :
5359 - ubuntu-latest
5460 - macos-latest
55- - windows-2019
61+ - windows-latest
5662 fail-fast : false
5763 name : Prebuild on ${{ matrix.os }}
5864 runs-on : ${{ matrix.os }}
6672 node-version : 18
6773 - run : npm install --ignore-scripts
6874 - 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
69- - run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0
70- - if : matrix.os == 'windows-latest'
71- run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32
75+ # Prebuilding for Electron 13+ on Windows fails with
76+ # win_delay_load_hook.cc
77+ # 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]
78+ - if : matrix.os != 'windows-latest'
79+ run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0
80+ # - if: matrix.os == 'windows-latest'
81+ # run: npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch ia32
7282 - if : matrix.os == 'macos-latest'
7383 run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 --arch arm64
7484
8696 with :
8797 node-version : 18
8898 registry-url : https://registry.npmjs.org
89- - run : npm publish
99+ - run : npm publish --access public
90100 env :
91101 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
92102
96106 os :
97107 - ubuntu-latest
98108 - macos-latest
99- - windows-2019
109+ - windows-latest
100110 fail-fast : false
101111 name : Prebuild on ${{ matrix.os }}
102112 runs-on : ${{ matrix.os }}
@@ -109,18 +119,14 @@ jobs:
109119 - uses : actions/setup-node@v3
110120 with :
111121 node-version : 18
112- - name : Update node-gyp
113- if : ${{ matrix.os == 'windows-latest' && matrix.node == '14' }}
114- run : |
115- $WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
116- $NodeDirPath = Split-Path $WhereNode -Parent
117- $NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
118- cd $NodeModulesPath
119- 120122 - run : npm install --ignore-scripts
121123 - 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 }}
122- - run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 -u ${{ secrets.GH_TOKEN }}
123- - if : matrix.os == 'windows-latest'
124- 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 }}
124+ # Prebuilding for Electron 13+ on Windows fails with
125+ # win_delay_load_hook.cc
126+ # 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]
127+ - if : matrix.os != 'windows-latest'
128+ run : npx --no-install prebuild -r electron -t 21.0.0 -t 22.0.0 -t 23.0.0 -u ${{ secrets.GH_TOKEN }}
129+ # - if: matrix.os == 'windows-latest'
130+ # 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 }}
125131 - if : matrix.os == 'macos-latest'
126132 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 }}
0 commit comments