Skip to content

Commit aad4153

Browse files
committed
run.util.js: Test building with msvs 2022 and get AppVeyor to pass
Patch from https://github.com/mapbox/node-pre-gyp/pull/709.patch
1 parent fb68ff4 commit aad4153

2 files changed

Lines changed: 22 additions & 13 deletions

File tree

appveyor.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
os: Visual Studio 2015
1+
image: # http://www.appveyor.com/docs/appveyor-yml
2+
- Visual Studio 2022
23

34
environment:
4-
matrix:
5-
- nodejs_version: 10
6-
- nodejs_version: 12
7-
- nodejs_version: 14
5+
matrix: # https://github.com/nodejs/release#release-schedule
6+
- nodejs_version: 16
7+
- nodejs_version: 18
8+
- nodejs_version: 20
9+
- nodejs_version: 21
10+
11+
matrix: # TODO: Fix the `configures with unparsed options` tests and remove this allow_failures matrix.
12+
allow_failures:
13+
- nodejs_version: 20
14+
- nodejs_version: 21
815

916
platform:
1017
- x64
@@ -13,17 +20,19 @@ platform:
1320
shallow_clone: true
1421

1522
install:
16-
- ps: Install-Product node $env:nodejs_version $env:Platform
23+
- ps: Install-Product node $env:nodejs_version $env:platform
1724
- ps: Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
1825
- npm config get
1926
- node --version
2027
- npm --version
21-
- node -e "console.log(process.arch);"
22-
- IF /I "%PLATFORM%" == "x64" set PATH=C:\Python27-x64;%PATH%
23-
- IF /I "%PLATFORM%" == "x86" SET PATH=C:\python27;%PATH%
24-
- IF /I "%PLATFORM%" == "x64" CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
25-
- IF /I "%PLATFORM%" == "x86" CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
28+
- node -e "console.log(process.arch);" # 'x64' or 'ia32'
29+
# Python >= v3.12 requires node-gyp >= v10
30+
- IF /I "%PLATFORM%" == "x64" set PATH=C:\Python311-x64;%PATH%
31+
- IF /I "%PLATFORM%" == "x86" SET PATH=C:\python311;%PATH%
32+
- npm config list
2633
- npm ci
34+
- npm run update-crosswalk # To support newer versions of Node.js
35+
# - npm audit # TODO: Fix mapbox/node-pre-gyp#705 and enable this line
2736
- npm test
2837

2938
build: off

test/run.util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ function run(prog, command, args, app, opts, cb) {
5858
opts.cwd = path.join(__dirname, app.name);
5959
}
6060

61-
// Test building with msvs 2015 since that is more edge case than 2013
61+
// Test building with msvs 2022
6262
if (process.platform === 'win32') {
63-
final_cmd += ' --msvs_version=2015 ';
63+
final_cmd += ' --msvs_version=2022 ';
6464
}
6565

6666
// finish appending all arguments

0 commit comments

Comments
 (0)