Skip to content

Commit a408d10

Browse files
addaleaxjasongin
authored andcommitted
Set up CI services
1 parent 22416e8 commit a408d10

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
language: c++
2+
compiler:
3+
- clang
4+
- gcc
5+
env:
6+
- TRAVIS_NODE_VERSION="4"
7+
- TRAVIS_NODE_VERSION="6"
8+
- TRAVIS_NODE_VERSION="7"
9+
os:
10+
- linux
11+
- osx
12+
matrix:
13+
fast_finish: true
14+
sudo: false
15+
cache:
16+
directories:
17+
- node_modules
18+
- $HOME/.npm
19+
addons:
20+
apt:
21+
sources:
22+
- ubuntu-toolchain-r-test
23+
packages:
24+
- g++-4.9
25+
before_install:
26+
- echo "$TRAVIS_NODE_VERSION"
27+
- export "PATH=./node_modules/.bin:$PWD/node_modules/.bin:$HOME/.local/bin:$PATH"
28+
# coveralls
29+
- pip install --user cpp-coveralls
30+
# compilers
31+
- if [ "$CXX" = "g++" -a "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="g++-4.9" CC="gcc-4.9" AR="gcc-ar-4.9" RANLIB="gcc-ranlib-4.9" NM="gcc-nm-4.9" ; fi
32+
- if [ "$CXX" = "clang++" ]; then export NPMOPT=--clang=1 ; fi
33+
# node versions
34+
- rm -rf ~/.nvm
35+
- git clone --branch v0.33.2 https://github.com/creationix/nvm.git ~/.nvm
36+
- source ~/.nvm/nvm.sh
37+
- nvm install "$TRAVIS_NODE_VERSION"
38+
- node --version
39+
- export CFLAGS="$CFLAGS -O3 --coverage" LDFLAGS="$LDFLAGS --coverage"
40+
- echo "CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
41+
install:
42+
- npm install $NPMOPT
43+
script:
44+
- npm test $NPMOPT
45+
after_success:
46+
- cpp-coveralls --gcov-options '\-lp' --build-root test/build --exclude test

appveyor.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# https://www.appveyor.com/docs/lang/nodejs-iojs/#testing-under-multiple-versions-of-nodejs-or-iojs
2+
environment:
3+
fast_finish: true
4+
matrix:
5+
- nodejs_version: "7"
6+
- nodejs_version: "4"
7+
- nodejs_version: "6"
8+
9+
platform:
10+
- x86
11+
- x64
12+
13+
install:
14+
- ps: Install-Product node $env:nodejs_version $env:platform
15+
- node -p process.arch
16+
- node -p process.version
17+
18+
test_script:
19+
- npm test
20+
21+
build: off
22+
23+
version: "{build}"
24+
25+
cache:
26+
- node_modules

0 commit comments

Comments
 (0)