forked from PX4/NuttX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
65 lines (57 loc) · 2 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
pipeline {
agent none
stages {
stage('Build') {
steps {
script {
def builds = [:]
def docker_nuttx = "px4io/px4-dev-nuttx:2017-12-30"
// stm32f4discovery
// TODO: cxxtest, ipv6, netnsh, nxlines, rndis, testlibcxx, uavcan, usbmsc, winbuild
for (def option in ["canard", "elf", "kostest", "nsh", "pm", "posix_spawn", "pseudoterm", "usbnsh", "xen1210"]) {
def node_name = "stm32f4discovery/${option}"
builds[node_name] = createBuildNode(docker_nuttx, "stm32f4discovery", option)
}
// stm32f103-minimum
// TODO: jlx12864g
for (def option in ["audio_tone", "buttons", "mcp2515", "nsh", "rfid-rc522", "rgbled", "usbnsh", "userled", "veml6070"]) {
def node_name = "stm32f103-minimum/${option}"
builds[node_name] = createBuildNode(docker_nuttx, "stm32f103-minimum", option)
}
// stm32f769i-disco
for (def option in ["nsh", "nsh-ethernet"]) {
def node_name = "stm32f769i-disco/${option}"
builds[node_name] = createBuildNode(docker_nuttx, "stm32f769i-disco", option)
}
parallel builds
} // script
} // steps
} // stage Builds
}
environment {
CCACHE_DIR = '/tmp/ccache'
}
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
timeout(time: 60, unit: 'MINUTES')
}
}
def createBuildNode(String docker_repo, String board, String config) {
return {
node {
docker.image(docker_repo).inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw') {
stage("build") {
sh('export')
checkout scm
sh('git clean -ff -x -d .')
sh('ccache -z')
sh('git clone --depth 1 https://github.com/PX4-NuttX/apps.git')
sh('tools/configure.sh -l -a apps ' + board + '/' + config)
sh('make --no-print-directory --quiet')
sh('ccache -s')
sh('size nuttx')
}
}
}
}
}