-
Notifications
You must be signed in to change notification settings - Fork 31
/
Jenkinsfile
167 lines (144 loc) · 5.74 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
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
@Library('tfc-lib@adef-ci') _
flags = gitParseFlags()
dockerConfig = getDockerConfig(['MATLAB','Vivado','Internal'], matlabHSPro=false)
dockerConfig.add("-e MLRELEASE=R2023b")
dockerHost = 'docker'
////////////////////////////
hdlBranches = ['main','hdl_2022_r2']
stage("Build Toolbox") {
dockerParallelBuild(hdlBranches, dockerHost, dockerConfig) {
branchName ->
try {
withEnv(['HDLBRANCH='+branchName,'LC_ALL=C.UTF-8','LANG=C.UTF-8']) {
checkout scm
sh 'git submodule update --init'
sh 'make -C ./CI/scripts build'
// sh 'pip3 install -r requirements_doc.txt'
// sh 'make -C ./CI/gen_doc doc_ml'
sh 'make -C ./CI/scripts add_libad9361'
sh 'make -C ./CI/scripts gen_tlbx'
}
} catch(Exception ex) {
if (branchName == 'hdl_2022_r2') {
error('Production Toolbox Build Failed')
}
else {
unstable('Development Build Failed')
}
}
if (branchName == 'hdl_2022_r2') {
local_stash('builtSources')
archiveArtifacts artifacts: 'hdl/*', followSymlinks: false, allowEmptyArchive: true
}
}
}
/////////////////////////////////////////////////////
boardNames = [
'fmcomms2_zed',
'fmcomms2_zc702','fmcomms5_zc702',
'fmcomms2_zc706','fmcomms5_zc706','adrv9371x_zc706','adrv9009_zc706',
'fmcomms2_zcu102','adrv9002_zcu102','adrv9009_zcu102','adrv9371x_zcu10','fmcomms8_zcu102',
'adrv9361z7035_ccbob_cmos','adrv9361z7035_ccbob_lvds','adrv9361z7035_ccfmc_lvds','adrv9361z7035_ccpackrf_lvds',
'adrv9364z7020_ccbob_cmos','adrv9364z7020_ccbob_lvds',
'pluto']
dockerConfig.add("-e HDLBRANCH=hdl_2022_r2")
cstage("HDL Tests", "", flags) {
dockerParallelBuild(boardNames, dockerHost, dockerConfig) {
branchName ->
withEnv(['BOARD='+branchName]) {
cstage("Source", branchName, flags) {
local_unstash('builtSources')
sh 'make -C ./CI/scripts test'
junit testResults: 'test/*.xml', allowEmptyResults: true
archiveArtifacts artifacts: 'test/logs/*', followSymlinks: false, allowEmptyArchive: true
}
/*
stage("Synth") {
unstash "builtSources"
sh 'make -C ./CI/scripts test_synth'
junit testResults: 'test/*.xml', allowEmptyResults: true
archiveArtifacts artifacts: 'test/logs/*', followSymlinks: false, allowEmptyArchive: true
}
*/
cstage("Installer", branchName, flags) {
local_unstash('builtSources')
sh 'rm -rf hdl'
sh 'make -C ./CI/scripts test_installer'
junit testResults: 'test/*.xml', allowEmptyResults: true
archiveArtifacts artifacts: 'test/logs/*', followSymlinks: false, allowEmptyArchive: true
}
}
}
}
/////////////////////////////////////////////////////
demoNames = ['HDLFrequencyHopper','HDLTuneAGC','KernelFrequencyHopper']
def deployments = [:]
for (int i=0; i < demoNames.size(); i++) {
def demo = demoNames[i];
def nodeLabel = 'baremetal';
if (demo.contains("zcu102"))
nodeLabel = 'baremetal && high_memory';
deployments[demo] = { node(nodeLabel) {
stage("Demo Tests") {
withEnv(['DEMO='+demo,'MLRELEASE=R2023b','HDLBRANCH=hdl_2022_r2','LC_ALL=C.UTF-8','LANG=C.UTF-8']) {
try {
stage(demo) {
echo "Node: ${env.NODE_NAME}"
echo "Demo: ${env.DEMO}"
local_unstash('builtSources', '', false)
sh 'make -C ./CI/scripts test_targeting_demos'
junit testResults: 'test/*.xml', allowEmptyResults: true
archiveArtifacts artifacts: 'test/*', followSymlinks: false, allowEmptyArchive: true
}
}
finally {
cleanWs();
}
}
}
}}
}
parallel deployments
/////////////////////////////////////////////////////
node('baremetal') {
stage("NonHW Tests") {
stage("NonHW") {
local_unstash('builtSources', '', false)
sh 'make -C ./CI/scripts run_NonHWTests'
}
}
}
/////////////////////////////////////////////////////
appNames = ['lte_pa_app']
cstage("Build Deployable Apps", "", flags) {
dockerParallelBuild(appNames, dockerHost, dockerConfig) {
branchName ->
withEnv(['APP='+branchName]) {
cstage("Build DApps", branchName, flags) {
local_unstash('builtSources')
sh 'make -C ./CI/scripts ${APP}'
archiveArtifacts artifacts: 'trx_examples/streaming/LTE_PA_App/LTEPAinstaller/*.exe', followSymlinks: false, allowEmptyArchive: true
archiveArtifacts artifacts: 'trx_examples/streaming/LTE_PA_App/LTEPAinstaller/*.install', followSymlinks: false, allowEmptyArchive: true
}
}
}
}
/////////////////////////////////////////////////////
classNames = ['AD9361','AD9363','AD9364','AD9371','ADRV9009']
cstage("Hardware Streaming Tests", "", flags) {
dockerParallelBuild(classNames, dockerHost, dockerConfig) {
branchName ->
withEnv(['HW='+branchName]) {
local_unstash("builtSources")
sh 'echo ${HW}'
// sh 'make -C ./CI/scripts test_streaming'
}
}
}
//////////////////////////////////////////////////////
node('baremetal || lab_b5') {
cstage('Deploy Development', "", flags) {
local_unstash("builtSources", '', false)
uploadArtifactory('TransceiverToolbox','*.mltbx')
}
}