Skip to content

Commit

Permalink
Get tests running on Windows + Node 16 and 18
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed Mar 22, 2023
1 parent 6a65d62 commit c4ed718
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ jobs:
- 14
- 16
- 18
exclude:
- os: windows-latest
node: 16
- os: windows-latest
node: 18
fail-fast: false
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -40,14 +35,20 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Update node-gyp
- name: Update node-gyp on Node 14
if: ${{ matrix.os == 'windows-latest' && matrix.node == '14' }}
run: |
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
$NodeDirPath = Split-Path $WhereNode -Parent
$NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
cd $NodeModulesPath
npm install node-gyp@8.x
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' ) }}
shell: powershell
run: |
npm install --global node-gyp@latest
- run: npm install
- run: npm test

Expand Down Expand Up @@ -76,6 +77,7 @@ jobs:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false
name: Prebuild on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: publish
Expand All @@ -86,19 +88,15 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 14
- name: Update node-gyp
if: ${{ matrix.os == 'windows-latest' && matrix.node == '14' }}
run: |
$WhereNode = Get-Command node | Select-Object -ExpandProperty Definition
$NodeDirPath = Split-Path $WhereNode -Parent
$NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle"
cd $NodeModulesPath
npm install node-gyp@8.x
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.GITHUB_TOKEN }}
- run: npx --no-install prebuild -r electron -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 -u ${{ secrets.GITHUB_TOKEN }}
- if: matrix.os == 'windows-latest'
run: npx --no-install prebuild -r electron -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 --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
- 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 }}
# 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 }}
# - 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 }}
- if: matrix.os == 'macos-latest'
run: npx --no-install prebuild -r electron -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 --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
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 comments on commit c4ed718

Please sign in to comment.