Skip to content

Commit 9c0b56d

Browse files
authored
Merge branch 'master' into electron-ci-builds
2 parents f5f9303 + 8a3bdd0 commit 9c0b56d

5 files changed

Lines changed: 85 additions & 68 deletions

File tree

.travis.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ addons:
1818
matrix:
1919
include:
2020
# Linux
21+
- os: linux
22+
compiler: clang
23+
env: NODE_VERSION="10"
24+
addons:
25+
apt:
26+
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
27+
packages: [ 'clang-3.5']
2128
- os: linux
2229
compiler: clang
2330
env: NODE_VERSION="9"
@@ -78,7 +85,13 @@ matrix:
7885
# OS X
7986
- os: osx
8087
compiler: clang
81-
env: NODE_VERSION="9" # node abi 58
88+
env: NODE_VERSION="5" COVERAGE=true PUBLISHABLE=false # node abi 47
89+
- os: osx
90+
compiler: clang
91+
env: NODE_VERSION="10" # node abi 64
92+
- os: osx
93+
compiler: clang
94+
env: NODE_VERSION="9" # node abi 59
8295
- os: osx
8396
compiler: clang
8497
env: NODE_VERSION="8" # node abi 57
@@ -134,8 +147,6 @@ matrix:
134147
env:
135148
global:
136149
- JOBS: "8"
137-
- secure: PifMOSnn+mWR1RUptXse+fLvWiTrzg0R/mazO7RWhXHWBKv0uAJ/qV3dI0GIRBLtjG10Iy+tT5RNh1TIbBzB9Y67wMcGvylUPG1+3EOKoBMEPnOD9AgCEQw4SOXfGPx0cq2N6ueSKieCgu1yKN9Wq7XCbE+zTk/DiRNIdLirVoo=
138-
- secure: cc4esJY1vPXL31IeumAJoKWDDO2BTGFiltwfO1jbTbiV7QT911QUjTUasxXIVpOaHNCpxSTyevPwwTWfzt2EtF92Lli+qhQ2bbzMiDSBZstSrHdAe62Ai2M1oYYUwk/0cABB/2nO9uRyYwITCxpTSNzZBrYhn3C29WqBhPeVDmM=
139150

140151
before_install:
141152
- export PUBLISHABLE=${PUBLISHABLE:-true}

appveyor.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
environment:
2-
node_pre_gyp_accessKeyId:
3-
secure: 7DrSVc5eIGtmMcki5H+iRft+Tk3MJTwDBQEUuJHWaQ4=
4-
node_pre_gyp_secretAccessKey:
5-
secure: 1amwJJw9fu0j6dXnc5KsAQbSYf7Cjw/dapT6OZWABa6nc52grkKeLQ+DGaOfQz8i
62
matrix:
73
- nodejs_version: 4
84
platform: x64
5+
msvs_toolset: 12
96
- nodejs_version: 4
107
platform: x86
8+
msvs_toolset: 12
119
- nodejs_version: 5
1210
platform: x64
1311
- nodejs_version: 5
@@ -28,6 +26,10 @@ environment:
2826
platform: x64
2927
- nodejs_version: 9
3028
platform: x86
29+
- nodejs_version: 10
30+
platform: x64
31+
- nodejs_version: 10
32+
platform: x86
3133
# electron
3234
- nodejs_version: 8
3335
platform: x64

cloudformation/ci.template.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
var cf = require('@mapbox/cloudfriend');
2+
var package_json = require('../package.json')
3+
4+
module.exports = {
5+
AWSTemplateFormatVersion: '2010-09-09',
6+
Description: 'user for publishing to s3://mapbox-node-binary/' + package_json.name,
7+
Resources: {
8+
User: {
9+
Type: 'AWS::IAM::User',
10+
Properties: {
11+
Policies: [
12+
{
13+
PolicyName: 'list',
14+
PolicyDocument: {
15+
Statement: [
16+
{
17+
Action: ['s3:ListBucket'],
18+
Effect: 'Allow',
19+
Resource: 'arn:aws:s3:::mapbox-node-binary',
20+
Condition : {
21+
StringLike : {
22+
"s3:prefix": [ package_json.name + "/*"]
23+
}
24+
}
25+
}
26+
]
27+
}
28+
},
29+
{
30+
PolicyName: 'publish',
31+
PolicyDocument: {
32+
Statement: [
33+
{
34+
Action: ['s3:DeleteObject', 's3:GetObject', 's3:GetObjectAcl', 's3:PutObject', 's3:PutObjectAcl'],
35+
Effect: 'Allow',
36+
Resource: 'arn:aws:s3:::mapbox-node-binary/' + package_json.name + '/*'
37+
}
38+
]
39+
}
40+
}
41+
]
42+
}
43+
},
44+
AccessKey: {
45+
Type: 'AWS::IAM::AccessKey',
46+
Properties: {
47+
UserName: cf.ref('User')
48+
}
49+
}
50+
},
51+
Outputs: {
52+
AccessKeyId: {
53+
Value: cf.ref('AccessKey')
54+
},
55+
SecretAccessKey: {
56+
Value: cf.getAtt('AccessKey', 'SecretAccessKey')
57+
}
58+
}
59+
};

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@
3737
"url": "git://github.com/mapbox/node-sqlite3.git"
3838
},
3939
"dependencies": {
40-
"nan": "~2.9.2",
41-
"node-pre-gyp": "~0.9.0"
40+
"nan": "~2.10.0",
41+
"node-pre-gyp": "~0.10.0"
4242
},
4343
"bundledDependencies": [
4444
"node-pre-gyp"
4545
],
4646
"devDependencies": {
47+
"@mapbox/cloudfriend": "^1.9.0",
4748
"aws-sdk": "2.x",
4849
"eslint": "3.5.0",
49-
"mocha": "3.x"
50+
"mocha": "^5.2.0"
5051
},
5152
"scripts": {
5253
"prepublishOnly": "npm ls",

scripts/build-appveyor.bat

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,20 @@ SET EL=0
44

55
ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66

7-
IF /I "%msvs_toolset%"=="" ECHO msvs_toolset unset, defaulting to 12 && SET msvs_toolset=12
8-
SET NODE_MAJOR=%nodejs_version:~0,1%
9-
IF %NODE_MAJOR% GTR 4 ECHO detected node v5, forcing msvs_toolset 14 && SET msvs_toolset=14
7+
IF /I "%msvs_toolset%"=="" ECHO msvs_toolset unset, defaulting to 14 && SET msvs_toolset=14
8+
IF /I "%msvs_version%"=="" ECHO msvs_version unset, defaulting to 2015 && SET msvs_version=2015
109

1110
SET PATH=%CD%;%PATH%
12-
SET msvs_version=2013
13-
IF "%msvs_toolset%"=="14" SET msvs_version=2015
1411
IF NOT "%NODE_RUNTIME%"=="" SET "TOOLSET_ARGS=%TOOLSET_ARGS% --runtime=%NODE_RUNTIME%"
1512
IF NOT "%NODE_RUNTIME_VERSION%"=="" SET "TOOLSET_ARGS=%TOOLSET_ARGS% --target=%NODE_RUNTIME_VERSION%"
1613

17-
1814
ECHO APPVEYOR^: %APPVEYOR%
1915
ECHO nodejs_version^: %nodejs_version%
2016
ECHO platform^: %platform%
2117
ECHO msvs_toolset^: %msvs_toolset%
2218
ECHO msvs_version^: %msvs_version%
2319
ECHO TOOLSET_ARGS^: %TOOLSET_ARGS%
2420

25-
2621
ECHO activating VS command prompt
2722
:: NOTE this call makes the x64 -> X64
2823
IF /I "%platform%"=="x64" ECHO x64 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" amd64
@@ -35,58 +30,14 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
3530
ECHO using MSBuild^: && CALL msbuild /version && ECHO.
3631
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
3732

38-
3933
ECHO downloading/installing node
40-
::only use Install-Product when using VS2013
41-
::IF /I "%APPVEYOR%"=="True" IF /I "%msvs_toolset%"=="12" powershell Install-Product node $env:nodejs_version $env:Platform
42-
::TESTING:
43-
::always install (get npm matching node), but delete installed programfiles node.exe afterwards for VS2015 (using custom node.exe)
44-
IF /I "%APPVEYOR%"=="True" GOTO APPVEYOR_INSTALL
45-
GOTO SKIP_APPVEYOR_INSTALL
46-
47-
:APPVEYOR_INSTALL
4834
IF /I "%platform%"=="x64" powershell Install-Product node $env:nodejs_version x64
4935
IF /I "%platform%"=="x86" powershell Install-Product node $env:nodejs_version x86
5036
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
5137

52-
ECHO node major version^: %NODE_MAJOR%
53-
IF %NODE_MAJOR% GTR 0 ECHO node version greater than zero, not updating npm && GOTO SKIP_APPVEYOR_INSTALL
54-
5538
powershell Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
5639
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
5740

58-
:SKIP_APPVEYOR_INSTALL
59-
IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED
60-
IF %NODE_MAJOR% GTR 4 GOTO NODE_INSTALLED
61-
62-
63-
::custom node for VS2015
64-
SET ARCHPATH=
65-
IF "%platform%"=="X64" (SET ARCHPATH=x64/)
66-
IF "%platform%"=="x64" (SET ARCHPATH=x64/)
67-
SET NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11/v%nodejs_version%/%ARCHPATH%node.exe
68-
ECHO downloading node^: %NODE_URL%
69-
powershell Invoke-WebRequest "${env:NODE_URL}" -OutFile node.exe
70-
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
71-
72-
ECHO deleting node ...
73-
SET NODE_EXE_PRG=%ProgramFiles%\nodejs\node.exe
74-
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
75-
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
76-
IF EXIST "%ProgramFiles%\nodejs" ECHO copy custom node.exe to %ProgramFiles%\nodejs\ && COPY node.exe "%ProgramFiles%\nodejs\"
77-
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
78-
79-
SET NODE_EXE_PRG=%ProgramFiles(x86)%\nodejs\node.exe
80-
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
81-
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
82-
IF EXIST "%ProgramFiles(x86)%\nodejs" ECHO copy custom node.exe to %ProgramFiles(x86)%\nodejs\ && COPY node.exe "%ProgramFiles(x86)%\nodejs\"
83-
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
84-
85-
ECHO delete node.exe in current directory && DEL node.exe
86-
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
87-
88-
:NODE_INSTALLED
89-
9041
ECHO available node.exe^:
9142
call where node
9243
ECHO available npm^:
@@ -116,9 +67,6 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
11667
IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SET ERRORLEVEL=1 && GOTO ERROR
11768
ECHO ===== where npm puts stuff END ============
11869

119-
120-
IF "%nodejs_version:~0,1%"=="0" CALL npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
121-
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
12270
IF "%nodejs_version:~0,1%"=="4" CALL npm install node-gyp@3.x
12371
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
12472
IF "%nodejs_version:~0,1%"=="5" CALL npm install node-gyp@3.x
@@ -149,10 +97,6 @@ CALL npm test
14997
ECHO ==========================================
15098
ECHO ==========================================
15199
ECHO ==========================================
152-
ECHO using iojs, not checking test result!!!!!!!!!
153-
ECHO ==========================================
154-
ECHO ==========================================
155-
ECHO ==========================================
156100

157101
GOTO NPM_TEST_FINISHED
158102

0 commit comments

Comments
 (0)