@@ -3,10 +3,30 @@ language: python
33python :
44 - 2.7
55
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+
627# Build matrix: Run the three build systems and tests in parallel
728env :
829 global :
9- - DEPENDS="gfortran-4.9"
1030 - CHECK_README_PROGS="yes"
1131 matrix :
1232 # CMake build with unit tests, no documentation, with coverage analysis
1737 cd cmake-build &&
1838 cmake -DCMAKE_BUILD_TYPE=COVERAGE .. &&
1939 make -j 4 check"
20- SPECIFIC_DEPENDS="cmake nodejs"
21- JLINT="yes"
22- DOCS="yes"
23- FoBiS="no"
2440 CODE_COVERAGE="yes"
2541
2642 # build with build.sh, make documentation, run unit tests and perform coverage analysis
2743 - BUILD_SCRIPT="./build.sh --coverage --enable-unicode"
28- SPECIFIC_DEPENDS="binutils"
29- JLINT="no"
30- DOCS="yes"
31- FoBiS="yes"
3244 CODE_COVERAGE="yes"
3345
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-
6246install :
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
7047 - |
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"
7350 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
7456 - |
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
7762 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 :
7868 - |
7969 if [[ $CHECK_README_PROGS == [yY]* ]]; then
80- gfortran -o f90split f90split.f90 && \
81- ./f90split README.md && \
70+ f90split README.md && \
8271 for f in example*.md; do
8372 mv $f src/tests/jf_test_${f%.md}.f90
8473 done
85- rm f90split.f90 f90split
8674 fi
8775
8876script :
@@ -91,7 +79,10 @@ script:
9179
9280after_success :
9381 - 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
9586 - git config --global user.name "TRAVIS-CI-for-$(git --no-pager show -s --format='%cn' $TRAVIS_COMMIT)"
9687 - git config --global user.email "$(git --no-pager show -s --format='%ce' $TRAVIS_COMMIT)"
9788# broken for now# - ./deploy.sh #handles updating documentation for master branch as well as tags
0 commit comments