forked from stan-dev/rstan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
68 lines (68 loc) · 2.66 KB
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage('Install dependencies') {
steps {
sh """
export MAKEFLAGS=-j${env.PARALLEL}
R -e 'install.packages("devtools", repos = "https://cran.r-project.org")'
R -e 'update(devtools::package_deps("rstan"), repos = "https://cran.r-project.org")'
R -e 'install.packages("RInside", repos = "https://cran.r-project.org")'
"""
}
}
stage('Build') {
steps {
sh """
export MAKEFLAGS=-j${env.PARALLEL}
cd StanHeaders
git submodule update --init --recursive --remote
cd ..
R CMD build StanHeaders
R CMD build --no-build-vignettes rstan/rstan
"""
}
}
stage("Check timings and output") {
steps {
sh """
export MAKEFLAGS=-j${env.PARALLEL}
R CMD check --as-cran --timings StanHeaders_*.tar.gz || \
cat StanHeaders.Rcheck/00check.log
R CMD INSTALL StanHeaders_*.tar.gz
R CMD check --as-cran --timings --run-donttest --run-dontrun rstan_*.tar.gz || \
cat rstan.Rcheck/00check.log
"""
}
}
stage("Check additional unit tests") {
steps {
sh """
export MAKEFLAGS=-j${env.PARALLEL}
R CMD INSTALL rstan_*.tar.gz
cd rstan
make test-R || echo "extra unit tests failed"
cd ..
"""
}
}
stage("Check rstanarm") {
steps {
sh """
export MAKEFLAGS=-j${env.PARALLEL}
R -e 'update(devtools::package_deps("rstanarm"), repos = "https://cran.r-project.org")'
wget -Nc https://cran.r-project.org/src/contrib/rstanarm_2.17.4.tar.gz
R CMD check --as-cran --timings --run-donttest --run-dontrun rstanarm_*.tar.gz || \
cat rstanarm.Rcheck/00check.log
"""
}
}
}
post {
always {
warnings consoleParsers: [[parserName: 'GNU C Compiler (gcc)']], failedTotalAll: '0', usePreviousBuildAsReference: false, canRunOnFailed: true
warnings consoleParsers: [[parserName: 'Clang (LLVM based)']], failedTotalAll: '0', usePreviousBuildAsReference: false, canRunOnFailed: true
deleteDir()
}
}
}