-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (42 loc) · 1.94 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
language: cpp
compiler:
# - gcc
- clang
os:
- linux
- osx
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq update; fi
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq install rake bison git gperf g++-4.8 libev-dev libevent-dev libjansson-dev libjemalloc-dev libxml2-dev libssl-dev zlib1g-dev; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi; fi
# OSX
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew tap homebrew/dupes; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install openssl libev libevent zlib; fi
- curl -L git.io/nodebrew | perl - setup
- export PATH=$HOME/.nodebrew/current/bin:$PATH
- git clone https://github.com/h2o/qrintf.git
- cd qrintf
- sudo make install PREFIX=/usr/local
- cd ..
- nodebrew install-binary 5.2.0
- nodebrew use 5.2.0
- npm install -g mocha
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then rvm use 2.2; fi
- git clone https://github.com/mruby/mruby.git
- cd mruby
- cp -f ../build_config.rb .
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export CXXFLAGS="-I/usr/local/opt/libev/include"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export CFLAGS="-I/usr/local/opt/libev/include -I/usr/local/opt/openssl/include"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export LDFLAGS="-L/usr/local/lib -L/usr/local/opt/openssl/lib"; fi
- rake
- cd ..
- rake
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export CXX="g++-4.8 -std=c++11"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export CC=gcc; fi
- npm install node-ffi/node-ffi#gh-241
- mocha --reporter spec --timeout 15000