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

Commit a9ba52c

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 a9ba52c

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

.travis.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,39 @@ 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
1414
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"
15+
script: npm run lint || exit 1;
16+
17+
- stage: build-binary
1918
os: linux
20-
- stage: platform-test
19+
script: npm run-script build -f
20+
- os: osx
21+
script: npm run-script build -f
22+
23+
- stage: test
2124
node_js: "lts/boron"
22-
os: osx
23-
- stage: platform-test
24-
node_js: "lts/carbon"
2525
os: linux
26-
- stage: platform-test
27-
node_js: "lts/carbon"
26+
- node_js: "lts/boron"
2827
os: osx
29-
- stage: platform-test
30-
node_js: "9"
28+
- node_js: "lts/carbon"
3129
os: linux
32-
- stage: platform-test
33-
node_js: "9"
30+
- node_js: "lts/carbon"
3431
os: osx
35-
- stage: platform-test
36-
node_js: "10"
32+
- node_js: "9"
33+
os: linux
34+
- node_js: "9"
3735
os: osx
36+
- os: linux
37+
- os: osx
38+
after_success: npm run-script coverage;
3839

3940
addons:
4041
apt:
@@ -79,6 +80,7 @@ cache:
7980
- $HOME/.node-gyp
8081
- $HOME/.npm
8182
- node_modules
83+
- vendor
8284

8385
notifications:
8486
webhooks:

0 commit comments

Comments
 (0)