-
Notifications
You must be signed in to change notification settings - Fork 14
/
JenkinsfileCron
87 lines (77 loc) · 2.78 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
@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 '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
}
}
}
/////////////////////////////////////////////////////
boardNames = ['daq2_zcu102','ad9081_fmca_ebz_zcu102','ad9434_fmc_zc706',
'ad9739a_fmc_zc706','ad9265_fmc_zc706', 'fmcjesdadc1_zc706','ad9783_ebz_zcu102',
'ad9208_dual_ebz_vcu118']
// 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") || board.contains("vcu118"))
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") && !board.contains("vcu118")) {
stage("Upload BOOT.BINs") {
sh 'mkdir bootbins'
sh 'mv test/*.BIN bootbins/'
uploadArtifactory('HighSpeedConverterToolbox','bootbins/*.BIN*')
}
}
}
finally {
cleanWs();
}
}
}
}}
}
parallel deployments
/////////////////////////////////////////////////////
node {
stage("Trigger Harness") {
echo "Node: ${env.NODE_NAME}"
unstash "builtSources"
triggerHWHarness("HighSpeedConverterToolbox")
}
}