Skip to content

Commit

Permalink
updates to travis matrix (mapbox#372)
Browse files Browse the repository at this point in the history
* updates to travis matrix

* add v10 to appveyor

* 6,8,9,10

* add abi 64 files for windows

* add some logs for appveyor

* use default NPM versions

* explicitly install npm versions

* EQU

* install after npm version switch

* use npm v2

* npm v2 for node v10

* remove consoles

* please appveyor, let me shotgun debug successfully

* try using cwd
  • Loading branch information
mapsam committed May 1, 2018
1 parent f4fd511 commit fe293f2
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 15 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ addons:

env:
matrix:
- NODE_VERSION="6" RETIRE=true
- NODE_VERSION="4"
- NODE_VERSION="5"
- NODE_VERSION="7"
- NODE_VERSION="6"
- NODE_VERSION="8"
- NODE_VERSION="9"
- NODE_VERSION="10"

before_install:
- if [[ $(uname -s) == 'Linux' ]]; then
Expand Down
9 changes: 2 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ os: Visual Studio 2015

environment:
matrix:
- nodejs_version: 4
- nodejs_version: 6
- nodejs_version: 8
- nodejs_version: 9
- nodejs_version: 10

platform:
- x64
Expand All @@ -17,9 +17,6 @@ install:
- ps: Install-Product node $env:nodejs_version $env:Platform
- ps: Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
- npm config get
# upgrade node-gyp to dodge https://github.com/mapbox/node-pre-gyp/issues/209#issuecomment-307641388
# and allow make node 4.x x86 builds work
- IF "%nodejs_version:~0,1%" EQU "4" npm install node-gyp@3.x
- node --version
- npm --version
- node -e "console.log(process.arch);"
Expand All @@ -28,10 +25,8 @@ install:
- 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
- npm install
# workaround https://github.com/mapbox/node-pre-gyp/issues/300#issuecomment-328179994
- IF "%nodejs_version:~0,1%" GEQ "6" npm install npm@2 -g
- npm test

build: off
test: off
deploy: off
deploy: off
38 changes: 35 additions & 3 deletions test/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ var apps = [
'binding/app1.lib',
'binding/app1.map',
'binding/app1.node'
],
'node-v64': [
'binding/app1.exp',
'binding/app1.iobj',
'binding/app1.ipdb',
'binding/app1.lib',
'binding/app1.map',
'binding/app1.node'
]
}
}
Expand Down Expand Up @@ -71,7 +79,15 @@ var apps = [
'node-pre-gyp-test-app2/app2.ipdb',
'node-pre-gyp-test-app2/app2.lib',
'node-pre-gyp-test-app2/app2.map',
'node-pre-gyp-test-app2/app2.node'
'node-pre-gyp-test-app2/app2.node'
],
'node-v64': [
'node-pre-gyp-test-app2/app2.exp',
'node-pre-gyp-test-app2/app2.iobj',
'node-pre-gyp-test-app2/app2.ipdb',
'node-pre-gyp-test-app2/app2.lib',
'node-pre-gyp-test-app2/app2.map',
'node-pre-gyp-test-app2/app2.node'
]
}
}
Expand All @@ -95,6 +111,14 @@ var apps = [
[localVer, 'app3.lib'].join('/'),
[localVer, 'app3.map'].join('/'),
[localVer, 'app3.node'].join('/'),
],
'node-v64': [
[localVer, 'app3.exp'].join('/'),
[localVer, 'app3.iobj'].join('/'),
[localVer, 'app3.ipdb'].join('/'),
[localVer, 'app3.lib'].join('/'),
[localVer, 'app3.map'].join('/'),
[localVer, 'app3.node'].join('/'),
]
}
}
Expand Down Expand Up @@ -130,6 +154,14 @@ var apps = [
'lib/app8.lib',
'lib/app8.map',
'lib/app8.node'
],
'node-v64': [
'lib/app8.exp',
'lib/app8.iobj',
'lib/app8.ipdb',
'lib/app8.lib',
'lib/app8.map',
'lib/app8.node'
]
}
}
Expand Down Expand Up @@ -161,7 +193,7 @@ test(app.name + ' passes --nodedir down to node-gyp via node-pre-gyp ' + app.arg
});
});

// NOTE: currently fails with npm v3.x on windows (hench downgrade in appveyor.yml)
// NOTE: currently fails with npm v3.x on windows (hence downgrade in appveyor.yml)
test(app.name + ' passes --nodedir down to node-gyp via npm' + app.args, function(t) {
run('npm', 'install', '--build-from-source --nodedir=invalid-value', app, {}, function(err,stdout,stderr) {
t.ok(err, 'Expected command to fail');
Expand Down Expand Up @@ -338,7 +370,7 @@ apps.forEach(function(app) {
if (app.files[process.platform].hasOwnProperty(nodever)) {
files = app.files[process.platform][nodever];
} else if (app.files[process.platform].hasOwnProperty('base')) {
files = app.files[process.platform].base;
files = app.files[process.platform].base;
} else {
files = app.files[process.platform];
}
Expand Down
2 changes: 1 addition & 1 deletion test/run.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function run(prog,command,args,app,opts,cb) {

// unless explicitly provided, lets execute the command inside the app specific directory
if (!opts.cwd) {
final_cmd += ' -C ' + path.join(__dirname,app.name);
opts.cwd = path.join(__dirname,app.name);
}
// avoid breakage when compiling with clang++ and node v0.10.x
// This is harmless to add for other versions and platforms
Expand Down

0 comments on commit fe293f2

Please sign in to comment.