diff --git a/JenkinsfileCron b/JenkinsfileCron index 53285653..3d785754 100644 --- a/JenkinsfileCron +++ b/JenkinsfileCron @@ -31,155 +31,49 @@ stage("Build Toolbox") { } if (branchName == 'hdl_2021_r1') { stash includes: '**', name: 'builtSources', useDefaultExcludes: false + archiveArtifacts artifacts: 'hdl/*', followSymlinks: false, allowEmptyArchive: true } } } -///////////////////////////////////////////////////// -def deployments = [:] - -deployments['vm1'] = { node("vm1") { - stage("Synthesis Tests") { - withEnv(['BOARD=zed','MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) { - try { - 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 - archiveArtifacts artifacts: '*BOOT.BIN*', followSymlinks: false, allowEmptyArchive: true - } - } - finally { - cleanWs(); - } - } - } -}} - -///////////////////////////////////////////////////// - -deployments['vm2'] = { node("vm2") { - stage("Synthesis Tests") { - withEnv(['BOARD=zc702','MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) { - try { - 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 - archiveArtifacts artifacts: '*BOOT.BIN*', followSymlinks: false, allowEmptyArchive: true - } - } - finally { - cleanWs(); - } - } - } -}} - -///////////////////////////////////////////////////// - -deployments['vm3'] = { node("vm1") { - stage("Synthesis Tests") { - withEnv(['BOARD=zc706','MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) { - try { - 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 - archiveArtifacts artifacts: '*BOOT.BIN*', followSymlinks: false, allowEmptyArchive: true - } - } - finally { - cleanWs(); - } - } - } -}} - ///////////////////////////////////////////////////// -deployments['vm4'] = { node("vm2") { - stage("Synthesis Tests") { - withEnv(['BOARD=zcu102','MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) { - try { - 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 - archiveArtifacts artifacts: '*BOOT.BIN*', followSymlinks: false, allowEmptyArchive: true - } - } - finally { - cleanWs(); - } - } - } -}} - -///////////////////////////////////////////////////// +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'] -deployments['vm5'] = { node("vm1") { - stage("Synthesis Tests") { - withEnv(['BOARD=adrv9361','MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) { - try { - 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 - archiveArtifacts artifacts: '*BOOT.BIN*', followSymlinks: false, allowEmptyArchive: true +// 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=R2022a','HDLBRANCH=hdl_2021_r1','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 + } } - } - finally { - cleanWs(); - } - } - } -}} - -///////////////////////////////////////////////////// - -deployments['vm6'] = { node("vm2") { - stage("Synthesis Tests") { - withEnv(['BOARD=adrv9364','MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) { - try { - 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 - archiveArtifacts artifacts: '*BOOT.BIN*', followSymlinks: false, allowEmptyArchive: true + finally { + cleanWs(); } } - finally { - cleanWs(); - } } - } -}} - -///////////////////////////////////////////////////// + }} +} -deployments['vm7'] = { node("vm1") { - stage("Synthesis Tests") { - withEnv(['BOARD=pluto','MLRELEASE=R2022a','HDLBRANCH=hdl_2021_r1','LC_ALL=C.UTF-8','LANG=C.UTF-8']) { - try { - 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 - archiveArtifacts artifacts: '*BOOT.BIN*', followSymlinks: false, allowEmptyArchive: true - } - } - finally { - cleanWs(); - } - } - } -}} parallel deployments