Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit a7116b4

Browse files
committed
Update Travis for handle N-API builds
Since N-API is a versioned API the binding code is specific to a particular version. In this case it's current N-API v3 which only ships in Node 10 at the moment. This means the binary only builds on Node 10, but runs on N-API enabled (and shimmed) Node versions. As a result we need to build the binaries upfront on Node 10 and share it across all test runs.
1 parent b2e7bcb commit a7116b4

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

.travis.yml

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,45 @@ language: node_js
33
compiler: gcc
44
sudo: false
55

6-
env:
7-
global:
8-
- SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true
6+
stages:
7+
- lint
8+
- build-binary
9+
- test
910

1011
jobs:
1112
include:
12-
- stage: test
13-
node_js: "10"
13+
- stage: lint
14+
node_js: "10.0"
1415
os: linux
15-
before_script: npm run lint || exit 1;
16-
after_success: npm run-script coverage;
17-
- stage: platform-test
18-
node_js: "lts/boron"
16+
script: npm run lint || exit 1;
17+
18+
- stage: build-binary
19+
node_js: "10.0"
1920
os: linux
20-
- stage: platform-test
21+
script: npm run-script build -f
22+
env: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true
23+
- node_js: "10.0"
24+
os: osx
25+
script: npm run-script build -f
26+
env: SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true
27+
28+
- stage: test
2129
node_js: "lts/boron"
30+
os: linux
31+
- node_js: "lts/boron"
2232
os: osx
23-
- stage: platform-test
24-
node_js: "lts/carbon"
33+
- node_js: "lts/carbon"
2534
os: linux
26-
- stage: platform-test
27-
node_js: "lts/carbon"
35+
- node_js: "lts/carbon"
2836
os: osx
29-
- stage: platform-test
30-
node_js: "9"
37+
- node_js: "9"
3138
os: linux
32-
- stage: platform-test
33-
node_js: "9"
39+
- node_js: "9"
3440
os: osx
35-
- stage: platform-test
36-
node_js: "10"
41+
- node_js: "10.0"
42+
os: linux
43+
after_success: npm run-script coverage;
44+
- node_js: "10.0"
3745
os: osx
3846

3947
addons:
@@ -79,6 +87,7 @@ cache:
7987
- $HOME/.node-gyp
8088
- $HOME/.npm
8189
- node_modules
90+
- vendor
8291

8392
notifications:
8493
webhooks:

0 commit comments

Comments
 (0)