-
Notifications
You must be signed in to change notification settings - Fork 31
/
JenkinsfileCron
94 lines (85 loc) · 3.13 KB
/
JenkinsfileCron
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
@Library('tfc-lib') _
dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false)
dockerConfig.add("-e MLRELEASE=R2023b")
dockerHost = 'docker'
////////////////////////////
hdlBranches = ['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') {
stash includes: '**', name: 'builtSources', useDefaultExcludes: false
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']
// Create unique closure for each board and run in parallel
def deployments = [:]
for (int i=0; i < boardNames.size(); i++) {
def board = boardNames[i];
def nodeLabel = 'baremetal';
if (board.contains("zcu102"))
nodeLabel = 'baremetal && high_memory';
deployments[board] = { node(nodeLabel) {
stage("Synthesis Tests") {
withEnv(['BOARD='+board,'MLRELEASE=R2023b','HDLBRANCH=hdl_2022_r2','LC_ALL=C.UTF-8','LANG=C.UTF-8']) {
try {
stage("Synth") {
echo "Node: ${env.NODE_NAME}"
unstash "builtSources"
sh 'apt install -y xvfb'
sh 'echo "BOARD:$BOARD"'
sh 'make -C ./CI/scripts test_synth'
junit testResults: 'test/*.xml', allowEmptyResults: true
archiveArtifacts artifacts: 'test/*', followSymlinks: false, allowEmptyArchive: true
}
if (!board.contains("pluto")) {
stage("Upload BOOT.BINs") {
sh 'mkdir bootbins'
sh 'mv test/*.BIN bootbins/'
uploadArtifactory('TransceiverToolbox','bootbins/*.BIN*')
}
}
}
finally {
cleanWs();
}
}
}
}}
}
parallel deployments
node {
stage("Trigger Harness") {
echo "Node: ${env.NODE_NAME}"
unstash "builtSources"
triggerHWHarness("TransceiverToolbox")
}
}