From 4c9828d5c64468828764f93a406a71c5eb48f1ed Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Fri, 6 Dec 2024 09:09:50 -0700 Subject: [PATCH 1/5] Update synth jobs for new CI Signed-off-by: Travis F. Collins --- JenkinsfileCron | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/JenkinsfileCron b/JenkinsfileCron index aacfc075..7a90245e 100644 --- a/JenkinsfileCron +++ b/JenkinsfileCron @@ -1,4 +1,4 @@ -@Library('tfc-lib') _ +@Library('tfc-lib@adef-ci') _ dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false) dockerConfig.add("-e MLRELEASE=R2023b") @@ -30,7 +30,7 @@ stage("Build Toolbox") { } } if (branchName == 'hdl_2022_r2') { - stash includes: '**', name: 'builtSources', useDefaultExcludes: false + local_stash('builtSources') archiveArtifacts artifacts: 'hdl/*', followSymlinks: false, allowEmptyArchive: true } } @@ -60,8 +60,7 @@ for (int i=0; i < boardNames.size(); i++) { try { stage("Synth") { echo "Node: ${env.NODE_NAME}" - unstash "builtSources" - sh 'apt install -y xvfb' + local_unstash('builtSources') sh 'echo "BOARD:$BOARD"' sh 'make -C ./CI/scripts test_synth' junit testResults: 'test/*.xml', allowEmptyResults: true @@ -88,7 +87,7 @@ parallel deployments node { stage("Trigger Harness") { echo "Node: ${env.NODE_NAME}" - unstash "builtSources" + local_unstash('builtSources') triggerHWHarness("TransceiverToolbox") } } From 6bc8aa6fbdd4a24549d80159aedcce934f2ecd45 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Fri, 6 Dec 2024 10:00:20 -0700 Subject: [PATCH 2/5] Update baremetal settings for Synth builds Signed-off-by: Travis F. Collins --- JenkinsfileCron | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/JenkinsfileCron b/JenkinsfileCron index 7a90245e..c0d0c514 100644 --- a/JenkinsfileCron +++ b/JenkinsfileCron @@ -60,7 +60,7 @@ for (int i=0; i < boardNames.size(); i++) { try { stage("Synth") { echo "Node: ${env.NODE_NAME}" - local_unstash('builtSources') + local_unstash('builtSources', '', false) sh 'echo "BOARD:$BOARD"' sh 'make -C ./CI/scripts test_synth' junit testResults: 'test/*.xml', allowEmptyResults: true @@ -84,10 +84,10 @@ for (int i=0; i < boardNames.size(); i++) { parallel deployments -node { - stage("Trigger Harness") { - echo "Node: ${env.NODE_NAME}" - local_unstash('builtSources') - triggerHWHarness("TransceiverToolbox") - } -} +// node { +// stage("Trigger Harness") { +// echo "Node: ${env.NODE_NAME}" +// local_unstash('builtSources') +// triggerHWHarness("TransceiverToolbox") +// } +// } From b83515d39fb4a501edae05e281ca4c833554e0b8 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Fri, 6 Dec 2024 10:06:10 -0700 Subject: [PATCH 3/5] Update baremetal settings for Synth builds Signed-off-by: Travis F. Collins --- JenkinsfileCron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JenkinsfileCron b/JenkinsfileCron index c0d0c514..a99a878a 100644 --- a/JenkinsfileCron +++ b/JenkinsfileCron @@ -1,6 +1,6 @@ @Library('tfc-lib@adef-ci') _ -dockerConfig = getDockerConfig(['MATLAB','Vivado'], matlabHSPro=false) +dockerConfig = getDockerConfig(['MATLAB','Vivado','Internal'], matlabHSPro=false) dockerConfig.add("-e MLRELEASE=R2023b") dockerHost = 'docker' From fff08940f12a5fc4cba334cf88a82152bf4705a3 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Fri, 6 Dec 2024 16:57:03 -0700 Subject: [PATCH 4/5] Randomize xvfb ID for synth jobs Signed-off-by: Travis F. Collins --- CI/scripts/synth_designs.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CI/scripts/synth_designs.sh b/CI/scripts/synth_designs.sh index eebef4a8..ad6db1cb 100644 --- a/CI/scripts/synth_designs.sh +++ b/CI/scripts/synth_designs.sh @@ -14,8 +14,10 @@ cd ../.. cp hdl/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m source /opt/Xilinx/Vivado/2022.2/settings64.sh -Xvfb :77 & -export DISPLAY=:77 +# Randomize DISPLAY number to avoid conflicts +export DISPLAY_ID=:$(shuf -i 10-1000 -n 1) +Xvfb :$DISPLAY_ID & +export DISPLAY=:$DISPLAY_ID export SWT_GTK3=0 source /opt/Xilinx/Vivado/2022.2/settings64.sh $MLPATH/$MLRELEASE/bin/matlab $MLFLAGS -r "cd('test');runSynthTests('$BOARD');" From c652b9f83e060dce24baebb00cb5254865d0be77 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Fri, 6 Dec 2024 17:02:34 -0700 Subject: [PATCH 5/5] Only close launched XFVB Signed-off-by: Travis F. Collins --- CI/scripts/synth_designs.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CI/scripts/synth_designs.sh b/CI/scripts/synth_designs.sh index ad6db1cb..02d493de 100644 --- a/CI/scripts/synth_designs.sh +++ b/CI/scripts/synth_designs.sh @@ -17,13 +17,11 @@ source /opt/Xilinx/Vivado/2022.2/settings64.sh # Randomize DISPLAY number to avoid conflicts export DISPLAY_ID=:$(shuf -i 10-1000 -n 1) Xvfb :$DISPLAY_ID & +XVFB_PID=$! export DISPLAY=:$DISPLAY_ID export SWT_GTK3=0 source /opt/Xilinx/Vivado/2022.2/settings64.sh $MLPATH/$MLRELEASE/bin/matlab $MLFLAGS -r "cd('test');runSynthTests('$BOARD');" EC=$? -pidof Xvfb -if [ $? -eq 0 ]; then - kill -9 `pidof Xvfb` -fi +kill -9 $XVFB_PID || true exit $EC