@@ -3,25 +3,64 @@ language: python
3
3
python :
4
4
- 2.7
5
5
6
+ cache : apt
7
+
8
+ # Build matrix: Run the three build systems and tests in parallel
9
+ env :
10
+ global :
11
+ - DEPENDS=gfortran-4.9
12
+ matrix :
13
+ # CMake build with unit tests, no documentation
14
+ # Allow to fail for now until tests are fixed
15
+ - BUILD_SCRIPT="mkdir cmake-build && cd cmake-build && cmake -DROBODOC_SKIP_DOC_GEN:BOOL=TRUE .. && make -j 3 && (make test || true)"
16
+ SPECIFIC_DEPENDS="cmake nodejs"
17
+ JLINT="yes"
18
+ DOCS="no"
19
+ FoBiS="no"
20
+
21
+ # build with build.sh, make documentation, and do sniff test
22
+ - BUILD_SCRIPT="./build.sh && cd bin && ./json"
23
+ SPECIFIC_DEPENDS=""
24
+ JLINT="no"
25
+ DOCS="yes"
26
+ FoBiS="yes"
27
+
28
+ # test scons build, no documentation or jsonlint, sniff test
29
+ - BUILD_SCRIPT="scons && cd bin && ./json"
30
+ SPECIFIC_DEPENDS=""
31
+ JLINT="no"
32
+ DOCS="no"
33
+ FoBiS="no"
34
+
6
35
before_install :
7
- - sudo apt-add-repository --yes ppa:ubuntu-toolchain-r/test
8
- - sudo apt-get update
9
- - sudo apt-get install gfortran-4.9
10
- - sudo ln -fs /usr/bin/gfortran-4.9 gfortran
11
- - sudo pip install FoBiS.py
12
- - wget http://rfsber.home.xs4all.nl/Robo/robodoc-4.99.41.tar.gz
13
- - gunzip robodoc-4.99.41.tar.gz
14
- - tar -xvf robodoc-4.99.41.tar
15
- - cd robodoc-4.99.41
16
- - ./configure
17
- - make
18
- - cd $TRAVIS_BUILD_DIR
19
- - export PATH="$TRAVIS_BUILD_DIR/robodoc-4.99.41/Source:$PATH"
20
- - export PATH=".:$PATH"
21
-
22
- before_script :
23
- - ./build.sh
36
+ - sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
37
+ - ([[ $SPECIFIC_DEPENDS == *cmake* ]] &&
38
+ sudo apt-add-repository -y ppa:kalakris/cmake) ||
39
+ [[ $SPECIFIC_DEPENDS != *cmake* ]]
40
+ - ([[ $JLINT == [yY]* ]] &&
41
+ curl -sL https://deb.nodesource.com/setup | sudo bash - ) ||
42
+ ([[ $JLINT != [yY]* ]] && sudo apt-get update -qq)
43
+ - ([[ $DOCS == [yY]* ]] &&
44
+ wget http://rfsber.home.xs4all.nl/Robo/robodoc-4.99.41.tar.gz) ||
45
+ [[ $DOCS != [yY]* ]]
46
+
47
+ install :
48
+ - sudo apt-get install -y $SPECIFIC_DEPENDS $DEPENDS
49
+ - ([[ $JLINT == [yY]* ]] &&
50
+ sudo npm install -g jsonlint)
51
+ || [[ $JLINT != [yY]* ]]
52
+ - sudo ln -fs /usr/bin/gfortran-4.9 /usr/bin/gfortran && gfortran --version
53
+ - ([[ $FoBiS == [yY]* ]] &&
54
+ sudo pip install FoBiS.py && FoBiS.py --version) ||
55
+ [[ $FoBiS != [yY]* ]]
56
+ - ([[ $DOCS == [yY]* ]] &&
57
+ tar -xzvf robodoc-4.99.41.tar.gz &&
58
+ cd robodoc-4.99.41 &&
59
+ ./configure && make -j 3 && cd $TRAVIS_BUILD_DIR &&
60
+ export PATH="$TRAVIS_BUILD_DIR/robodoc-4.99.41/Source:$PATH") ||
61
+ [[ $DOCS != [yY]* ]]
62
+
24
63
25
64
script :
26
- - cd bin
27
- - ./json
65
+ - echo $BUILD_SCRIPT
66
+ - echo $BUILD_SCRIPT | bash -
0 commit comments