@@ -20,43 +20,41 @@ def raas = [
20
20
]
21
21
22
22
// List of targets with supported modem families
23
- def targets = [
24
- " UBLOX" : [" UBLOX_C027" , " UBLOX_C027 " ],
25
- " MTS_DRAGONFLY" : [" MTS_DRAGONFLY " ]
23
+ def target_families = [
24
+ " UBLOX" : [" UBLOX_C027" ],
25
+ " MTS_DRAGONFLY" : [" MTS_DRAGONFLY_F411RE " ]
26
26
]
27
27
28
28
// Supported Modems
29
- def modems = [
30
- " UBLOX_C027" ,
29
+ def targets = [
31
30
" UBLOX_C027" ,
32
- " MTS_DRAGONFLY"
31
+ " UBLOX_C030" ,
32
+ " MTS_DRAGONFLY_F411RE"
33
33
]
34
34
35
35
// Map toolchains to compilers
36
36
def toolchains = [
37
37
ARM : " armcc" ,
38
- GCC_ARM : " arm-none-eabi-gcc" ,
39
- IAR : " iar_arm"
38
+ GCC_ARM : " arm-none-eabi-gcc" // ,
39
+ // IAR: "iar_arm"
40
40
]
41
41
42
42
def stepsForParallel = [:]
43
43
44
44
// Jenkins pipeline does not support map.each, we need to use oldschool for loop
45
- for (int i = 0 ; i < targets . size(); i++ ) {
45
+ for (int i = 0 ; i < target_families . size(); i++ ) {
46
46
for (int j = 0 ; j < toolchains. size(); j++ ) {
47
- def target = targets. keySet(). asList(). get(i)
48
- def allowed_modem_type = targets. get(target)
47
+ for (int k = 0 ; k < targets. size(); k++ ) {
48
+ def target_family = target_families. keySet(). asList(). get(i)
49
+ def allowed_target_type = target_families. get(target_family)
50
+ def target = targets. get(k)
49
51
def toolchain = toolchains. keySet(). asList(). get(j)
50
52
def compilerLabel = toolchains. get(toolchain)
51
53
52
- // Skip unwanted combination
53
- if ( target == " NUCLEO_F401RE " && toolchain == " IAR " ) {
54
- continue
54
+ def stepName = " ${ target_family } ${ toolchain } "
55
+ if (allowed_target_type . contains( target) ) {
56
+ stepsForParallel[stepName] = buildStep(target_family, target, compilerLabel, toolchain)
55
57
}
56
-
57
- def stepName = " ${ target} ${ toolchain} "
58
- if (allowed_modem_type. contains(modems)) {
59
- stepsForParallel[stepName] = buildStep(target, compilerLabel, toolchain)
60
58
}
61
59
}
62
60
}
@@ -81,23 +79,26 @@ timestamps {
81
79
parallel parallelRunSmoke
82
80
}
83
81
84
- def buildStep (target , compilerLabel , toolchain ) {
82
+ def buildStep (target_family , target , compilerLabel , toolchain ) {
85
83
return {
86
- stage (" ${ target} _${ compilerLabel} " ) {
84
+ stage (" ${ target_family } _ ${ target} _${ compilerLabel} " ) {
87
85
node (" ${ compilerLabel} " ) {
88
86
deleteDir()
89
87
dir(" mbed-os-example-cellular-minimal" ) {
90
88
checkout scm
91
89
def config_file = " mbed_app.json"
92
90
91
+ // Change target type
92
+ execute(" sed -i 's/\" platform\" : .*/\" platform\" : \" ${ target_family} \" /' ${ config_file} " )
93
+
93
94
// Activate traces
94
95
execute(" sed -i 's/\" mbed-trace.enable\" : false/\" mbed-trace.enable\" : true/' ${ config_file} " )
95
96
96
97
// Set mbed-os to revision received as parameter
97
98
execute (" mbed deploy --protocol ssh" )
98
- dir (" mbed-os" ) {
99
- execute (" git checkout ${ env.MBED_OS_REVISION} " )
100
- }
99
+ // dir ("mbed-os") {
100
+ // execute ("git checkout ${env.MBED_OS_REVISION}")
101
+ // }
101
102
102
103
execute (" mbed compile --build out/${ target} _${ toolchain} / -m ${ target} -t ${ toolchain} -c --app-config ${ config_file} " )
103
104
}
0 commit comments