forked from Mouse-Imaging-Centre/RMINC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (71 loc) · 2.32 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
matrix:
include:
- os: linux
dist: xenial
script: |
R CMD build .
R CMD INSTALL RMINC*.tar.gz
R CMD check --as-cran --no-install RMINC*.tar.gz
cat RMINC.Rcheck/00check.log
Rscript -e "\
testr <- devtools::test(); \
testr <- as.data.frame(testr); \
if(any(testr\$error) || any(testr\$warning > 0)) \
stop('Found failing tests') \
"
pass=$?
if [[ $pass -ne 0 || $(grep "WARNING\|ERROR" RMINC.Rcheck/00check.log) != "" ]]; then
(exit 1)
else
(exit 0)
fi
- os: osx
script: |
R CMD build .
R CMD INSTALL RMINC*.tar.gz
R CMD check --as-cran --no-install RMINC*.tar.gz
cat RMINC.Rcheck/00check.log
Rscript -e "\
testr <- devtools::test(); \
testr <- as.data.frame(testr); \
if(any(testr\$error) || any(testr\$warning > 0)) \
stop('Found failing tests') \
"
pass=$?
if [[ $pass -ne 0 || $(grep "WARNING\|ERROR" RMINC.Rcheck/00check.log) != "" ]]; then
(exit 1)
else
(exit 0)
fi
language: r
r_binary_packages:
- devtools
- roxygen2
- tidyverse
- lme4
sudo: required
addons:
apt:
update: true
packages:
- libgl1-mesa-dev
- libglu1-mesa-dev
- freeglut3-dev
env:
MINC_PATH=/opt/minc/1.9.17
before_install: |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
(cd ../ ;
wget https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.17-20190313-Ubuntu_16.04-x86_64.deb)
sudo dpkg -i ../minc-toolkit-1.9.17-20190313-Ubuntu_16.04-x86_64.deb
source /opt/minc/1.9.17/minc-toolkit-config.sh
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
(cd ../ ;
wget http://packages.bic.mni.mcgill.ca/minc-toolkit/MacOSX/minc-toolkit-1.9.16-20180117-Darwin-10.8-x86_64.dmg)
sudo hdiutil attach ../minc-toolkit-1.9.16-20180117-Darwin-10.8-x86_64.dmg
sudo installer -package /Volumes/minc-toolkit-1.9.16-20180117-Darwin-x86_64/minc-toolkit-1.9.16-20180117-Darwin-x86_64.pkg -target /
source /opt/minc/1.9.16/minc-toolkit-config.sh
export LDFLAGS="$LDFLAGS -L$(brew --prefix zlib)/lib"
Rscript -e "install.packages('digest')"
fi