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

Commit bc5d71e

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

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,17 @@
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",
2425
"devDependencies": {
2526
"mocha": "^3.1.2",
26-
"random-seed": "^0.3.0"
27+
"random-seed": "^0.3.0",
28+
"segfault-handler": "^1.0.0"
2729
},
2830
"dependencies": {
2931
"autogypi": "^0.2.2",

test/buffer-index.test.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
11
require('segfault-handler').registerHandler()
22

33
const assert = require('assert')
4-
const NativeBufferOffsetIndex = require('../src/entry-node');
5-
const AsmjsBufferOffsetIndex = require('../src/entry-browser');
64
const ReferenceBufferOffsetIndex = require('./reference-buffer-offset-index');
75

86
const randomSeed = require('random-seed');
97
const seed = 42; //randomSeed.create()(Number.MAX_SAFE_INTEGER);
108

11-
[ {
9+
let passes = [];
10+
11+
passes.push({
1212

1313
name: 'native',
14-
Implementation: NativeBufferOffsetIndex
14+
Implementation: require('../src/entry-node')
15+
16+
});
1517

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

1820
name: 'asmjs',
19-
Implementation: AsmjsBufferOffsetIndex
21+
Implementation: require('../src/entry-browser')
22+
23+
});
2024

21-
} ].forEach(({ name, Implementation }) => {
25+
passes.forEach(({ name, Implementation }) => {
2226

2327
describe('BufferOffsetIndex (' + name + ')', () => {
2428

0 commit comments

Comments
 (0)