forked from stan-dev/rstan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (64 loc) · 2.48 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
sudo: required
dist: trusty
services:
- docker
cache:
apt: true
ccache: true
directories:
- $HOME/.ccache
- $HOME/.m2
language: r
pandoc: false
os:
- linux
- osx
env:
global:
- STAN_BRANCH=develop
- STAN_MATH_BRANCH=develop
matrix:
- CXX_OLEVEL=2 RCPP_VER=cran CXX=clang++
matrix:
allow_failures:
- env: CXX_OLEVEL=0 RCPP_VER=cran
- env: CXX_OLEVEL=3 RCPP_VER=github
- compiler: gcc
before_install:
- 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('inline', 'Rcpp', 'coda', 'BH', 'RcppEigen', 'RInside', 'RUnit', 'ggplot2', 'gridExtra'), 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
- R CMD build StanHeaders/
- R CMD INSTALL `find StanHeaders*.tar.gz`
- if [[ $TRAVIS_OS_NAME = 'osx' ]] ; then sudo sudo /usr/texbin/tlmgr install verbatimbox readarray ifnextok multirow fancyvrb url titlesec booktabs; fi
- if [[ $TRAVIS_OS_NAME = "osx" ]] ; then brew install ccache; brew link ccache; fi
- echo "CXX = `which ccache` `R CMD config CXX`" >> ./rstan/R_Makevars
- echo "CXXFLAGS = `R CMD config CXXFLAGS` -pedantic -g0" >> ./rstan/R_Makevars
- export CLANG_EXTRA_ARG=""
- if [[ $CXX = "clang++" ]] ; then export CLANG_EXTRA_ARG=" -Qunused-arguments -fcolor-diagnostics " ; fi
- if [[ $RCPP_VER = 'github' ]]; then R -q -e "options(repos = getCRANmirrors()[1,'URL']); library(devtools); install_github('Rcpp', 'Rcppcore')"; fi
- echo ${CXX}
- echo ${CLANG_EXTRA_ARG}
- sed -i.bak "s/ g++/ ${CXX}${CLANG_EXTRA_ARG}/" ./rstan/R_Makevars
- sed -i.bak "s/O[0-3]/O$CXX_OLEVEL/" ./rstan/R_Makevars
- rm ./rstan/R_Makevars.bak
- more ./rstan/R_Makevars
- mkdir -p ~/.R/; cat ./rstan/R_Makevars > ~/.R/Makevars
- more ~/.R/Makevars
notifications:
email:
# recipients:
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