-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
178 lines (144 loc) · 3.56 KB
/
build.gradle
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'net.saliman:gradle-properties-plugin:1.2.0'
classpath 'org.hidetake:gradle-ssh-plugin:0.2.2'
}
repositories {
maven {
if (project.hasProperty('artifactory_contextUrl')) {
url "$artifactory_contextUrl/plugins-release"
if (project.hasProperty("artifactory_user")) {
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
} else {
url 'http://dl.bintray.com/jfrog/jfrog-jars'
}
}
}
dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.9')
}
}
allprojects {
// use properties plugin -> local settings (e.g. Xilinx path and version) are in gradle-local.properties
apply plugin: 'properties'
apply plugin: 'ssh'
apply plugin: HelpersPlugin
task console {
doLast {
groovy.ui.Console.main([] as String[])
}
}
remotes {
board {
host = project.hasProperty("board_ip") ? board_ip : null
user = "root"
useDefaultIdentityFile(it)
}
}
}
if (project.hasProperty("artifactory_contextUrl")) {
allprojects {
apply plugin: 'artifactory'
}
artifactory {
contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver
/*publish {
repository {
repoKey = 'mehari-build'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}*/
resolve {
repository {
repoKey = 'mehari-extern-sources'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
}
ext.havePrivateProject = file("private").isDirectory()
subprojects {
ext.havePrivateProject = havePrivateProject
}
task checkSystemDependencies(type:Exec) {
description "Make sure that the system has everything we need."
commandLine "./ci-0020-check-deps.sh"
environmentFromConfig()
}
subprojects {
tasks.all { task ->
task.mustRunAfter checkSystemDependencies
}
}
task prepareTools {
dependsOn "tools:install", "tools:test"
mustRunAfter checkSystemDependencies
}
forAllNormalTestTasks() { task ->
task.dependsOn prepareTools
}
task clean {
dependsOn "reconos:clean"
dependsOn "llvm:clean"
dependsOn "single-pendulum-vhdl:clean"
mustRunAfter checkSystemDependencies
}
task checkBeforeCompile {
dependsOn "reconos:checkBeforeCompile"
mustRunAfter checkSystemDependencies
}
task compile {
dependsOn "reconos:compile"
dependsOn "llvm:compile"
dependsOn "single-pendulum-vhdl:compile"
dependsOn "reconos:reconos-perftest:mbox_put_get:compile"
if (havePrivateProject)
dependsOn "private:compile"
mustRunAfter clean, checkBeforeCompile
shouldRunAfter checkBeforeCompile
}
task prepareTest {
dependsOn "reconos:prepareTest"
mustRunAfter compile
}
task test {
dependsOn "single-pendulum-vhdl:test"
dependsOn "reconos:test"
dependsOn "llvm:test"
dependsOn "reconos:reconos-perftest:mbox_put_get:test"
if (havePrivateProject)
dependsOn "private:test"
mustRunAfter prepareTest
}
task allCI {
dependsOn checkSystemDependencies
dependsOn checkBeforeCompile
dependsOn clean
dependsOn compile
dependsOn prepareTest
dependsOn test
}
defaultTasks "allCI"
if (hasProperty("sispm_outlet") && sispm_outlet) {
task powercycleBoard(type: Exec) {
description "Turn the board off and on again."
commandLine "./ci-0910-powercycle-board.sh"
environment "SISPM_OUTLET", sispm_outlet
}
forAllNormalTestTasks { task ->
task.mustRunAfter powercycleBoard
}
allCI.dependsOn powercycleBoard
prepareTest.shouldRunAfter powercycleBoard
}