forked from eclipse/upm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (48 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
43
44
45
46
47
48
language: cpp
env:
global:
- MRAA_ROOT=/tmp/mraa
- MRAA_BUILD=$MRAA_ROOT/build
- UPM_ROOT=$TRAVIS_BUILD_DIR
- UPM_BUILD=$UPM_ROOT/build
- JAVA_HOME=/usr/lib/jvm/java-8-oracle
matrix:
- NODE010=true
- NODE012=true
- NODE4=true
- NODE5=true
compiler:
- clang
- gcc
install:
- sudo add-apt-repository --yes ppa:rosmo/swig3.0.7
- sudo apt-get update -qq
- sudo apt-get install -y --force-yes -qq swig3.0 git
- sudo ln -s /usr/bin/swig3.0 /usr/bin/swig
- sudo update-java-alternatives -s java-8-oracle
before_script:
# Turn off JAVA SWIG for clang++, use 4.8 for all g++ builds
- if [ "$CC" == "gcc" ]; then export BUILDJAVA=ON; export CC=gcc-4.8; export CXX=g++-4.8; else export BUILDJAVA=OFF; fi
- if [ "${NODE012}" ]; then nvm install 0.12; fi
- if [ "${NODE4}" ]; then nvm install 4.1; fi
- if [ "${NODE5}" ]; then nvm install 5; fi
# Handle 0.10 NODE_ROOT_DIR differently than other versions
- if [ -z ${NODE010} ]; then export NODE_ROOT_DIR="/home/travis/.nvm/versions/node/`nvm version`"; else export NODE_ROOT_DIR=/home/travis/.nvm/v0.10.36; fi
script:
# Build/install MRAA
- echo "CC=$CC BUILDJAVA=$BUILDJAVA NODE010=$NODE010 NODE012=$NODE012 NODE4=$NODE4 NODE5=$NODE5 NODE_ROOT_DIR=$NODE_ROOT_DIR"
- git clone https://github.com/intel-iot-devkit/mraa.git $MRAA_ROOT
- mkdir -p $MRAA_BUILD && cd $_ && cmake -DBUILDSWIGJAVA=$BUILDJAVA -DBUILDSWIGNODE=OFF -DBUILDSWIGPYTHON=ON -DFIRMATA=ON -DENABLEEXAMPLES=OFF $MRAA_ROOT
- sudo make install
- sudo ldconfig
# Build/install UPM
- cd $UPM_ROOT && mkdir $UPM_BUILD && cd $_ && cmake -DNODE_ROOT_DIR:PATH="${NODE_ROOT_DIR}" -DBUILDSWIGJAVA=$BUILDJAVA -DBUILDEXAMPLES=ON -DBUILDTESTS=ON -DBUILDFTI=ON .. && sudo make install && sudo ldconfig && ctest --output-on-failure -E examplenames_js
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
packages:
- cmake
- cmake-data
- g++-4.8