From ff38e0457822f87be31711978b9da63a50dfed73 Mon Sep 17 00:00:00 2001 From: John Monks Date: Wed, 19 Feb 2025 22:32:31 +0000 Subject: [PATCH 1/2] [ci] Update Jenkinsfile build artifact gathering Previously, hw_deployment_* directories were being found. The result of this "find" was a list of directory paths which Jenkins was not handling correctly. Removed this find and instead wrapped the copy in a try/catch, if an error occurs catch it and error accordingly. --- docker/jenkins/Jenkinsfile | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docker/jenkins/Jenkinsfile b/docker/jenkins/Jenkinsfile index 6d51fffd64..5149e8cd0e 100644 --- a/docker/jenkins/Jenkinsfile +++ b/docker/jenkins/Jenkinsfile @@ -324,21 +324,17 @@ void runDockerPytestWithMarker(String marker, String testResultsFilename, String sh """./run-docker.sh python -m pytest -m ${marker} --junitxml=${testResultsFilename}.xml --html=${testResultsFilename}.html --self-contained-html ${additionalOptions}""" } -def findBoardBuildFiles(String searchDir, String dirToFind) { - def result = sh(script: "find $searchDir -type d -name \"$dirToFind*\"", returnStdout: true).trim() - if (result.empty) { - error "Directory containing '$dirToFind' not found." - } - return result -} - void findCopyZip(String board, String findDir, String copyDir) { - def buildDir = findBoardBuildFiles(findDir, "hw_deployment_${board}") - sh "cp -r ${buildDir}/${board} ${copyDir}/" - dir(copyDir) { - sh "zip -r ${board}.zip ${board}/" - sh "mkdir -p ${env.ARTIFACT_DIR}/${copyDir}/" - sh "cp ${board}.zip ${env.ARTIFACT_DIR}/${copyDir}/" + sh "mkdir -p ${copyDir}" + try { + sh "cp -r ${findDir}/hw_deployment_*/${board} ${copyDir}/" + dir(copyDir) { + sh "zip -r ${board}.zip ${board}/" + sh "mkdir -p ${env.ARTIFACT_DIR}/${copyDir}/" + sh "cp ${board}.zip ${env.ARTIFACT_DIR}/${copyDir}/" + } + } catch (err) { + error "No ${board} hw_deployment_* build artifacts found in ${findDir}" } } From e60694d7bea710358cf2323f190c13a74a428e97 Mon Sep 17 00:00:00 2001 From: John Monks Date: Wed, 19 Feb 2025 22:52:50 +0000 Subject: [PATCH 2/2] [ci] Run fpgadataflow in parallel --- docker/jenkins/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/jenkins/Jenkinsfile b/docker/jenkins/Jenkinsfile index 5149e8cd0e..cca3436363 100644 --- a/docker/jenkins/Jenkinsfile +++ b/docker/jenkins/Jenkinsfile @@ -93,7 +93,7 @@ pipeline { cleanPreviousBuildFiles(env.FINN_HOST_BUILD_DIR) // Pass in the marker to run with pytest and the XML test results filename - runDockerPytestWithMarker("fpgadataflow", "${env.TEST_NAME}", "--cov --cov-report=html:coverage_fpgadataflow") + runDockerPytestWithMarker("fpgadataflow", "${env.TEST_NAME}", "--cov --cov-report=html:coverage_fpgadataflow -n ${env.NUM_PYTEST_WORKERS} --dist worksteal") // Stash the test results file(s) stash name: env.TEST_NAME, includes: "${env.TEST_NAME}.xml,${env.TEST_NAME}.html"