Skip to content

Commit

Permalink
run.util.js: Test building with msvs 2022 and get AppVeyor to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Nappa committed Apr 19, 2024
1 parent fb68ff4 commit aad4153
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
31 changes: 20 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
os: Visual Studio 2015
image: # http://www.appveyor.com/docs/appveyor-yml
- Visual Studio 2022

environment:
matrix:
- nodejs_version: 10
- nodejs_version: 12
- nodejs_version: 14
matrix: # https://github.com/nodejs/release#release-schedule
- nodejs_version: 16
- nodejs_version: 18
- nodejs_version: 20
- nodejs_version: 21

matrix: # TODO: Fix the `configures with unparsed options` tests and remove this allow_failures matrix.
allow_failures:
- nodejs_version: 20
- nodejs_version: 21

platform:
- x64
Expand All @@ -13,17 +20,19 @@ platform:
shallow_clone: true

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

build: off
Expand Down
4 changes: 2 additions & 2 deletions test/run.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function run(prog, command, args, app, opts, cb) {
opts.cwd = path.join(__dirname, app.name);
}

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

// finish appending all arguments
Expand Down

0 comments on commit aad4153

Please sign in to comment.