forked from NetLogo/Tortoise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
96 lines (85 loc) · 2.87 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
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
94
95
96
#!/usr/bin/env groovy
pipeline {
agent any
stages {
stage('Start') {
steps {
library 'netlogo-shared'
sendNotifications('NetLogo/Tortoise', 'STARTED')
}
}
stage('Clean') {
steps {
sh "./sbt.sh netLogoWeb/clean compilerCore/clean compilerJVM/clean compilerJS/clean macrosCore/clean engine/clean"
}
}
stage('LintAndStyle') {
steps {
sh "./sbt.sh netLogoWeb/scalastyle compilerCore/scalastyle compilerJVM/scalastyle compilerJS/scalastyle macrosCore/scalastyle"
sh "cd engine; yarn install; grunt coffeelint"
}
}
stage('TestJVM') {
steps {
sh 'git submodule update --init --recursive'
sh "./sbt.sh compilerJVM/test:compile"
sh "./sbt.sh compilerJVM/test:test"
sh "./sbt.sh compilerJVM/depend"
junit 'compiler/jvm/target/test-reports/*.xml'
}
}
stage('TestJS') {
steps {
sh "./sbt.sh compilerJS/test:compile"
sh "./sbt.sh compilerJS/test:test"
junit 'compiler/js/target/test-reports/*.xml'
}
}
stage('NetLogoWeb Tests') {
steps {
sh "./sbt.sh netLogoWeb/test:compile"
sh "./sbt.sh \"netLogoWeb/test:runMain org.nlogo.tortoise.nlw.ExtensionsUpdater\""
sh "./sbt.sh netLogoWeb/test:fast"
sh "./sbt.sh netLogoWeb/test:language"
junit 'netlogo-web/target/test-reports/*.xml'
}
}
stage('NetLogoWeb Model Dumps') {
steps {
sh "./sbt.sh \"netLogoWeb/testOnly *ModelDumpTests\""
junit 'netlogo-web/target/test-reports/*.xml'
}
}
stage('NetLogoWeb Test Models') {
steps {
// Running all the `TestModels` tests at once causes Jenkins to bog down and take over 20 hours to run on GraalVM.
// When run in smaller chunks things go fine. As it's only for testing, this isn't a big concern.
// -JMB 11/18.
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 0 -z 1\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 2\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 3\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 4\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 5\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 6\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 7\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 8\""
sh "./sbt.sh \"netLogoWeb/testOnly *TestModels -- -z 9 \""
junit 'netlogo-web/target/test-reports/*.xml'
}
}
}
post {
failure {
library 'netlogo-shared'
sendNotifications('NetLogo/Tortoise', 'FAILURE')
}
success {
library 'netlogo-shared'
sendNotifications('NetLogo/Tortoise', 'SUCCESS')
}
unstable {
library 'netlogo-shared'
sendNotifications('NetLogo/Tortoise', 'UNSTABLE')
}
}
}