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

Commit d7ce2f0

Browse files
committed
Use clang 3.8 during travis build
1 parent ef22f04 commit d7ce2f0

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

.travis.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo: false
1+
sudo: required
22

33
git:
44
depth: 10
@@ -7,12 +7,22 @@ language: node_js
77

88
node_js: 6
99

10-
env:
11-
- CC=clang CXX=clang++ npm_config_clang=1
12-
13-
script: npm test
10+
script: npm run test:noasmjs
1411

1512
notifications:
1613
email:
1714
on_success: never
1815
on_failure: change
16+
17+
env:
18+
- CXX=clang++-3.8
19+
20+
addons:
21+
apt:
22+
sources:
23+
- ubuntu-toolchain-r-test
24+
- llvm-toolchain-precise-3.8
25+
packages:
26+
- gcc-5
27+
- g++-5
28+
- clang-3.8

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
"build:browser": "npm run node-gyp configure build --asmjs=1",
1616
"test": "npm run build:all && npm run test:nobuild",
1717
"test:nobuild": "mocha --full-trace test/**/*.test.js",
18+
"test:noasmjs": "npm run build:native && TEST_ASMJS=0 mocha --full-trace test/**/*.test.js",
1819
"install": "npm run autogypi && npm run build:native && npm run install-browser",
19-
"install-browser": "test -e build/Release/nbind.js || which em++ 2>&1 > /dev/null && npm run build:browser",
20-
"prepublish": "npm run build:browser"
20+
"install-browser": "test -e build/Release/nbind.js || ! command -v emsdk 2>&1 > /dev/null || npm run build:browser",
21+
"prepublish": "[ \"$CI\" = true ] || npm run build:browser"
2122
},
2223
"author": "",
2324
"license": "MIT",

test/buffer-index.test.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,23 @@ const ReferenceBufferOffsetIndex = require('./reference-buffer-offset-index');
88
const randomSeed = require('random-seed');
99
const seed = 42; //randomSeed.create()(Number.MAX_SAFE_INTEGER);
1010

11-
[ {
11+
let passes = [];
12+
13+
passes.push({
1214

1315
name: 'native',
1416
Implementation: NativeBufferOffsetIndex
1517

16-
}, {
18+
});
19+
20+
if (!process.env.TEST_ASMJS || process.env.TEST_ASMJS !== '0') passes.push({
1721

1822
name: 'asmjs',
1923
Implementation: AsmjsBufferOffsetIndex
2024

21-
} ].forEach(({ name, Implementation }) => {
25+
});
26+
27+
passes.forEach(({ name, Implementation }) => {
2228

2329
describe('BufferOffsetIndex (' + name + ')', () => {
2430

0 commit comments

Comments
 (0)