@@ -3,10 +3,30 @@ language: python
3
3
python :
4
4
- 2.7
5
5
6
+ sudo : false
7
+
8
+ cache :
9
+ apt : true
10
+ pip : true
11
+ directories :
12
+ - $HOME/.cache/pip
13
+ - $HOME/.local
14
+
15
+ addons :
16
+ apt :
17
+ sources :
18
+ - kalakris-cmake
19
+ - ubuntu-toolchain-r-test
20
+ packages :
21
+ - gfortran-4.9
22
+ - gfortran-5
23
+ - binutils
24
+ - cmake
25
+ - python-pip
26
+
6
27
# Build matrix: Run the three build systems and tests in parallel
7
28
env :
8
29
global :
9
- - DEPENDS="gfortran-4.9"
10
30
- CHECK_README_PROGS="yes"
11
31
matrix :
12
32
# CMake build with unit tests, no documentation, with coverage analysis
17
37
cd cmake-build &&
18
38
cmake -DCMAKE_BUILD_TYPE=COVERAGE .. &&
19
39
make -j 4 check"
20
- SPECIFIC_DEPENDS="cmake nodejs"
21
- JLINT="yes"
22
- DOCS="yes"
23
- FoBiS="no"
24
40
CODE_COVERAGE="yes"
25
41
26
42
# build with build.sh, make documentation, run unit tests and perform coverage analysis
27
43
- BUILD_SCRIPT="./build.sh --coverage --enable-unicode"
28
- SPECIFIC_DEPENDS="binutils"
29
- JLINT="no"
30
- DOCS="yes"
31
- FoBiS="yes"
32
44
CODE_COVERAGE="yes"
33
45
34
- # test scons build, no documentation or jsonlint, run unit tests
35
- - BUILD_SCRIPT="scons && scons test"
36
- SPECIFIC_DEPENDS=""
37
- JLINT="no"
38
- DOCS="no"
39
- FoBiS="no"
40
-
41
- before_install :
42
- - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
43
- - |
44
- if [[ $SPECIFIC_DEPENDS == *cmake* ]]; then
45
- sudo apt-add-repository -y ppa:kalakris/cmake
46
- fi
47
- - sudo apt-get update -qq
48
- - |
49
- if [[ $JLINT == [yY]* ]]; then
50
- curl -sL https://deb.nodesource.com/setup | sudo bash -x -
51
- fi
52
- - |
53
- if [[ $CHECK_README_PROGS == [yY]* ]]; then
54
- wget http://people.sc.fsu.edu/~jburkardt/f_src/f90split/f90split.f90
55
- fi
56
- - |
57
- if [[ $DOCS == [yY]* ]]; then
58
- export DEPENDS="$DEPENDS exuberant-ctags"
59
- fi
60
- - ulimit -s unlimited
61
-
62
46
install :
63
- - sudo apt-get install -y $SPECIFIC_DEPENDS $DEPENDS
64
- - |
65
- if [[ $JLINT == [yY]* ]]; then
66
- sudo npm install -g jsonlint
67
- fi
68
- - sudo ln -fs /usr/bin/gfortran-4.9 /usr/bin/gfortran && gfortran --version
69
- - sudo ln -fs /usr/bin/gcov-4.9 /usr/bin/gcov && gcov --version
70
47
- |
71
- if [[ $FoBiS == [yY]* ]]; then
72
- sudo -H pip install FoBiS.py && FoBiS.py --version
48
+ if [[ ! -d "$HOME/.local/bin" ]]; then
49
+ mkdir "$HOME/.local/bin"
73
50
fi
51
+ - export PATH="$HOME/.local/bin:$PATH"
52
+ - export FC=/usr/bin/gfortran-4.9
53
+ - ln -fs /usr/bin/gfortran-4.9 "$HOME/.local/bin/gfortran" && gfortran --version
54
+ - ls -l /usr/bin/gfortran-4.9
55
+ - ln -fs /usr/bin/gcov-4.9 "$HOME/.local/bin/gcov" && gcov --version
74
56
- |
75
- if [[ $DOCS == [yY]* ]]; then
76
- sudo -H pip install ford && ford --version
57
+ if ! which f90split; then
58
+ wget http://people.sc.fsu.edu/~jburkardt/f_src/f90split/f90split.f90 && \
59
+ gfortran -o f90split f90split.f90 && \
60
+ mv f90split "$HOME/.local/bin/" && \
61
+ rm f90split.f90
77
62
fi
63
+ - which FoBiS.py || (pip install FoBiS.py && FoBiS.py --version)
64
+ - which ford || (pip install ford && ford --version)
65
+ - which jsonlint || (pip install git+https://github.com/dmeranda/demjson.git && jsonlint --version)
66
+
67
+ before_script :
78
68
- |
79
69
if [[ $CHECK_README_PROGS == [yY]* ]]; then
80
- gfortran -o f90split f90split.f90 && \
81
- ./f90split README.md && \
70
+ f90split README.md && \
82
71
for f in example*.md; do
83
72
mv $f src/tests/jf_test_${f%.md}.f90
84
73
done
85
- rm f90split.f90 f90split
86
74
fi
87
75
88
76
script :
@@ -91,7 +79,10 @@ script:
91
79
92
80
after_success :
93
81
- cd $TRAVIS_BUILD_DIR
94
- - if [[ $CODE_COVERAGE == [yY]* ]]; then bash <(curl -s https://codecov.io/bash) ; fi
82
+ - |
83
+ if [[ $CODE_COVERAGE == [yY]* ]]; then
84
+ bash <(curl -s https://codecov.io/bash)
85
+ fi
95
86
- git config --global user.name "TRAVIS-CI-for-$(git --no-pager show -s --format='%cn' $TRAVIS_COMMIT)"
96
87
- git config --global user.email "$(git --no-pager show -s --format='%ce' $TRAVIS_COMMIT)"
97
88
# broken for now# - ./deploy.sh #handles updating documentation for master branch as well as tags
0 commit comments