forked from eclipse-sumo/sumo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (24 loc) · 1.38 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
language: c++
os:
- linux
- osx
compiler:
- gcc
- clang
env:
- TOOLCHAIN=autotools
- TOOLCHAIN=cmake
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libxerces-c-dev autoconf automake libtool libfox-1.6-dev libgl1-mesa-dev libglu1-mesa-dev libgdal-dev libproj-dev libgtest-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install xerces-c fox; fi
script:
- if [[ "$CXX" == "clang++" ]]; then export CXXFLAGS="$CXXFLAGS -stdlib=libc++"; export LDFLAGS="$LDFLAGS -stdlib=libc++"; fi
- if [[ "$TOOLCHAIN" == "autotools" ]]; then autoreconf -i && ./configure; fi
- if [[ "$TOOLCHAIN" == "cmake" ]]; then mkdir cmake-build && cd cmake-build && cmake ..; fi
- make -j4
- sudo make install
- make examples
- export SUMO_HOME=`pwd`
- cd docs/examples;_PWD=`pwd`;ls | while read i; do if [[ "$i" == "tools" ]]; then continue;fi;EXEC=$i;echo $i;cd $i;find . -type d | while read j;do echo $j;count=(`ls -1 $j/test.* 2>/dev/null | wc -l`);if [ $count != 0 ];then $_PWD/../../bin/$EXEC $j/test.*;SUCCESS=$?;if [ $SUCCESS != 0 ]; then echo "An error occured";exit $SUCCESS;fi;fi;done;SUCCESS=$?;if [ $SUCCESS != 0 ]; then exit $SUCCESS ;fi;cd $_PWD;done;SUCCESS=$?;if [ $SUCCESS != 0 ]; then exit $SUCCESS;fi