-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (44 loc) · 4.15 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
49
dist: Xenial
sudo: required
language: c++
before_script:
- wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxWidgets-3.1.1.tar.bz2
- tar jxf wxWidgets-3.1.1.tar.bz2
- cd wxWidgets-3.1.1
- ./configure --prefix=$HOME/wx-3.1.1 --enable-shared=no --enable-stl=yes --enable-debug=no --with-gtk=2 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --without-libjbig --without-liblzma --without-gtkprint --with-libnotify=no --with-libmspack=no --with-gnomevfs=no --with-opengl=yes --with-sdl=no --with-cxx=11
- make -j2 all install
- sudo ln -s $HOME/wx-3.1.1/bin/wx-config /usr/local/bin/wx-config-3
- user=$(echo $TRAVIS_REPO_SLUG | sed 's,/.*$,,')
- (cd ../ && pwd)
# - export GTEST=/home/travis/build/$user/googletest
- export LKDIR=/home/travis/build/$user/lk
- export WEXDIR=/home/travis/build/$user/wex
- export SSCDIR=/home/travis/build/$user/ssc
- export SAMNTDIR=/home/travis/build/$user/SAM
- if [[ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]]; then export BRANCH_NAME=$TRAVIS_BRANCH; else export BRANCH_NAME=$TRAVIS_PULL_REQUEST_BRANCH; fi
- git clone --depth=1 https://github.com/google/googletest /home/travis/build/$user/googletest
- git clone --depth=1 --branch=$BRANCH_NAME https://github.com/$user/lk $LKDIR; if [[ $? != "0" ]]; then git clone --depth=1 --branch="develop" https://github.com/$user/lk $LKDIR; fi
- git clone --depth=1 --branch=$BRANCH_NAME https://github.com/$user/wex $WEXDIR; if [[ $? != "0" ]]; then git clone --depth=1 --branch="develop" https://github.com/$user/wex $WEXDIR; fi
- git clone --depth=1 --branch=$BRANCH_NAME https://github.com/$user/ssc $SSCDIR; if [[ $? != "0" ]]; then git clone --depth=1 --branch="develop" https://github.com/$user/ssc $SSCDIR; fi
script:
- export PATH=$PATH:$HOME/wx-3.1.1/bin
- mkdir $LKDIR/build && cd $LKDIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build . -j 4 --target lk
- mkdir $WEXDIR/build && cd $WEXDIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build . -j 4 --target wex
- mkdir $SSCDIR/build && cd $SSCDIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DSAM_SKIP_TESTS=1 -DSAM_SKIP_TOOLS=1 -DSAMAPI_EXPORT=0 && cmake --build . -j 4 --target ssc
- mkdir $SAMNTDIR/build && cd $SAMNTDIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DSAMAPI_EXPORT=0 && make -j 4
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then results="1"; nohup xvfb-run $SAMNTDIR"/build/deploy/linux_64/SAM.bin" no_sam_file $SAMNTDIR"/build/deploy/test_script_ow.lk" &>/dev/null & while [[ $results != "0" ]]; do sleep 60; lines=$(wc -l $SAMNTDIR/build/test_results_linux64.csv | cut -d' ' -f1); echo $lines; grep -i final_configuration_eof $SAMNTDIR/build/test_results_linux64.csv; results=$?; done; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then python $SAMNTDIR/test/compare_lk_test_output.py $SAMNTDIR/test_results_linux64.csv $SAMNTDIR/build/test_results_linux64.csv false; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then python $SAMNTDIR/test/compare_lk_test_output.py $SAMNTDIR/test_results_win64.csv $SAMNTDIR/build/test_results_linux64.csv true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then results="1"; Xvfb :1337 & export DISPLAY=:1337 & $SAMNTDIR"/build/SAM.app/Contents/MacOS/SAM" no_sam_file $SAMNTDIR"/build/SAM.app/Contents/test_script_ow.lk"&>/dev/null & while [[ $results != "0" ]]; do sleep 60; lines=$(wc -l $SAMNTDIR/build/SAM.app/test_results_osx64.csv | cut -f1 -d "/"); echo $lines; grep -i final_configuration_eof $SAMNTDIR/build/SAM.app/test_results_osx64.csv; results=$?; done; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python $SAMNTDIR/test/compare_lk_test_output.py $SAMNTDIR/test_results_osx64.csv $SAMNTDIR/build/SAM.app/test_results_osx64.csv false; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then python $SAMNTDIR/test/compare_lk_test_output.py $SAMNTDIR/test_results_win64.csv $SAMNTDIR/build/SAM.app/test_results_osx64.csv true; fi
install:
- sudo apt-get install -y libwebkitgtk-dev libgtk2.0-dev libgl1-mesa-dev mesa-common-dev freeglut3-dev libcurl4-openssl-dev libc6
branches:
only:
- master
- develop
- MHK
- patch
- wind_pruf
- Command_line_script