forked from stan-dev/rstan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (80 loc) · 2.93 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
sudo: true
dist: trusty
# services:
# - docker
cache:
apt: true
ccache: true
packages: true
directories:
- $HOME/.ccache
- $HOME/.m2
language: r
env:
global:
- STAN_BRANCH=master
- STAN_MATH_BRANCH=master
- MAKEFLAGS="-j 2"
matrix:
include:
- os: osx
osx_image: xcode9.4
env:
- CC=clang
- CXX=clang++
# - os: osx
# osx_image: xcode9.4
# env:
# - MATRIX_EVAL="brew cask uninstall oclint && brew install gcc@8; xcode-select --install; CC=gcc-7 ; CXX=g++-7 "
# works on Precise and Trusty
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
packages:
- clang-6.0
# - gcc-8
# - g++-8
env:
# - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
before_install:
- eval "${MATRIX_EVAL}"
- echo -e "#\x21/bin/sh\n\$1 &\nPROCESS=\"\$!\"\nwhile :\ndo\n RESULT=\`ps -p \${PROCESS} -o comm=\`" > wait4.sh
- echo -e " if [ -z \"\${RESULT}\" ]; then\n wait \${PROCESS}; exit \$?\n else\n echo \"-\"; sleep 10\n fi\ndone\nexit \$?" >> wait4.sh
# - more wait4.sh
- echo -e "Package\x3A mnb_bnm" > DESCRIPTION
- chmod 755 wait4.sh
before_script:
- Rscript -e "install.packages(c('loo', 'inline', 'Rcpp', 'coda', 'BH', 'RcppEigen', 'RInside', 'RUnit', 'ggplot2', 'gridExtra', 'knitr', 'rmarkdown', 'pkgbuild'), repos='http://cran.rstudio.com')"
- git config -f .gitmodules submodule.stan.branch ${STAN_BRANCH}
- git config -f .gitmodules submodule.StanHeaders/inst/include/mathlib.branch ${STAN_MATH_BRANCH}
- git submodule update --remote
- if [[ $TRAVIS_OS_NAME = 'osx' ]] ; then sudo tlmgr update --self; fi
- if [[ $TRAVIS_OS_NAME = 'osx' ]] ; then sudo tlmgr install verbatimbox readarray ifnextok multirow fancyvrb url titlesec booktabs; fi
- if [[ $TRAVIS_OS_NAME != 'osx' ]] ; then tlmgr install verbatimbox readarray ifnextok; fi
- if [[ $TRAVIS_OS_NAME = "osx" ]] ; then brew install ccache; brew link ccache; fi
- echo "CXX = $CXX" >> ./rstan/R_Makevars
- echo "CXX14 = $CXX" >> ./rstan/R_Makevars
- echo "CXX14FLAGS = `R CMD config CXXFLAGS` -pedantic -g0 -fPIC" >> ./rstan/R_Makevars
- export CLANG_EXTRA_ARG=""
- if [[ $CXX =~ clang.* ]] ; then export CLANG_EXTRA_ARG=" -Qunused-arguments -fcolor-diagnostics " ; fi
- echo ${CXX} --version
- echo ${CLANG_EXTRA_ARG}
# - more ./rstan/R_Makevars
- mkdir -p ~/.R/; cat ./rstan/R_Makevars > ~/.R/Makevars
# - more ~/.R/Makevars
- R CMD build StanHeaders/
- R CMD INSTALL `find StanHeaders*.tar.gz`
notifications:
email:
# recipients:
# - stan-buildbot@googlegroups.com
on_success: change
on_failure: always
script:
- cd rstan
- R -q -e "library(Rcpp); sessionInfo()"
- ../wait4.sh "make install" && cd tests && R -q -f runRunitTests.R