-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
80 lines (77 loc) · 2.68 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
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build and Lint') {
parallel {
stage('Lint') {
agent { label 'nrf-build' }
steps {
sh 'git clang-format --style=file --extension=c,h --diff origin/master'
}
}
stage('nrf5340 example') {
agent { label 'nrf-build' }
steps {
sh '''
cd examples/nrf5340
west build -b nrf5340dk_nrf5340_cpuapp --pristine
'''
}
}
stage('esp32 example') {
agent { label 'esp32-build' }
steps {
sh '''
. $IDF_PATH/export.sh
cd examples/esp32
idf.py clean build
'''
}
}
stage('stm32 example') {
agent { label 'tros-build' }
steps {
sh '''
cd examples/stm32wb55
rm -rf build && cmake -B build
cmake --build build
'''
}
}
stage('rpi example') {
agent { label 'test-pi-3' }
steps {
sh '''
cd examples/rpi
rm -rf build && cmake -B build
cmake --build build
'''
}
}
stage('rpi spi ip proxy example') {
agent { label 'test-pi-3' }
steps {
sh '''
cd examples/rpi_spi_ip_proxy
rm -rf build && cmake -B build
cmake --build build
'''
}
}
}
}
stage('Test RPI Proxy') {
agent { label 'test-pi-3' }
environment {
IP = sh returnStdout: true, script: "echo ${SSH_CONNECTION} | cut -d ' ' -f3"
PORT = 45555
}
steps {
sh './examples/rpi_spi_ip_proxy/build/rpi_spi_ip_proxy $PORT &'
build job: 'rpi-spi-tcp-test',
parameters: [string(name: 'RPI_IP', value: IP), string(name: 'RPI_PORT', value: PORT)]
}
}
}
}