diff --git a/.jenkins/common.groovy b/.jenkins/common.groovy index 8156008e..27b0a241 100644 --- a/.jenkins/common.groovy +++ b/.jenkins/common.groovy @@ -11,11 +11,19 @@ def runCompileCommand(platform, project, jobName, boolean debug=false, boolean s //Set CI node's gfx arch as target if PR, otherwise use default targets of the library String amdgpuTargets = env.BRANCH_NAME.startsWith('PR-') ? '-DAMDGPU_TARGETS=\$gfx_arch' : '' - def getRocPRIM = auxiliary.getLibrary('rocPRIM', platform.jenkinsLabel, null, sameOrg) + def getDependenciesCommand = "" + if (project.installLibraryDependenciesFromCI) + { + project.libraryDependencies.each + { + libraryName -> + getDependenciesCommand += auxiliary.getLibrary(libraryName, platform.jenkinsLabel, 'develop', sameOrg) + } + } def command = """#!/usr/bin/env bash set -x - ${getRocPRIM} + ${getDependenciesCommand} cd ${project.paths.project_build_prefix} mkdir -p build/${buildTypeDir} && cd build/${buildTypeDir} ${auxiliary.gfxTargetParser()} diff --git a/.jenkins/precheckin.groovy b/.jenkins/precheckin.groovy index 6e633a92..df190506 100644 --- a/.jenkins/precheckin.groovy +++ b/.jenkins/precheckin.groovy @@ -9,7 +9,7 @@ import com.amd.project.* import com.amd.docker.* import java.nio.file.Path; -def runCI = +def runCI = { nodeDetails, jobName-> @@ -17,6 +17,7 @@ def runCI = prj.defaults.ccache = true prj.timeout.compile = 420 + prj.libraryDependencies = ["rocPRIM"] // Define test architectures, optional rocm version argument is available def nodes = new dockerNodes(nodeDetails, jobName, prj) @@ -43,29 +44,31 @@ def runCI = def packageCommand = { platform, project-> - + commonGroovy.runPackageCommand(platform, project) } buildProject(prj, formatCheck, nodes.dockerArray, compileCommand, testCommand, packageCommand) } -ci: { +ci: { String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - def propertyList = ["compute-rocm-dkms-no-npi":[pipelineTriggers([cron('0 1 * * 0')])], + def propertyList = ["compute-rocm-dkms-no-npi":[pipelineTriggers([cron('0 1 * * 0')])], "compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])], "rocm-docker":[]] propertyList = auxiliary.appendPropertyList(propertyList) Set standardJobNameSet = ["compute-rocm-dkms-no-npi", "compute-rocm-dkms-no-npi-hipclang", "rocm-docker"] - def jobNameList = ["compute-rocm-dkms-no-npi":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), - "compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), + def jobNameList = ["compute-rocm-dkms-no-npi":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), + "compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), "rocm-docker":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']])] jobNameList = auxiliary.appendJobNameList(jobNameList) - propertyList.each + auxiliary.registerDependencyBranchParameter(["rocPRIM"]) + + propertyList.each { jobName, property-> if (urlJobName == jobName) @@ -73,7 +76,7 @@ ci: { } Set seenJobNames = [] - jobNameList.each + jobNameList.each { jobName, nodeDetails-> seenJobNames.add(jobName) @@ -85,7 +88,6 @@ ci: { if(!seenJobNames.contains(urlJobName)) { properties(auxiliary.addCommonProperties([pipelineTriggers([cron('0 1 * * *')])])) - runCI([ubuntu16:['gfx906']], urlJobName) + runCI([ubuntu16:['gfx906']], urlJobName) } } - diff --git a/.jenkins/staticlibrary.groovy b/.jenkins/staticlibrary.groovy index 636995ca..08f9e3cd 100644 --- a/.jenkins/staticlibrary.groovy +++ b/.jenkins/staticlibrary.groovy @@ -7,18 +7,19 @@ import java.nio.file.Path; def runCI = { nodeDetails, jobName-> - + def prj = new rocProject('rocThrust', 'Static Library PreCheckin') prj.defaults.ccache = true prj.timeout.compile = 420 + prj.libraryDependencies = ["rocPRIM"] def nodes = new dockerNodes(nodeDetails, jobName, prj) def commonGroovy boolean formatCheck = false - + def compileCommand = { platform, project-> @@ -27,7 +28,7 @@ def runCI = commonGroovy.runCompileCommand(platform, project, jobName, false, true) } - + def testCommand = { platform, project-> @@ -45,20 +46,22 @@ def runCI = buildProject(prj, formatCheck, nodes.dockerArray, compileCommand, testCommand, packageCommand) } -ci: { +ci: { String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - def propertyList = ["compute-rocm-dkms-no-npi":[pipelineTriggers([cron('0 1 * * 0')])], + def propertyList = ["compute-rocm-dkms-no-npi":[pipelineTriggers([cron('0 1 * * 0')])], "compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])], "rocm-docker":[]] propertyList = auxiliary.appendPropertyList(propertyList) - def jobNameList = ["compute-rocm-dkms-no-npi":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), - "compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), + def jobNameList = ["compute-rocm-dkms-no-npi":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), + "compute-rocm-dkms-no-npi-hipclang":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']]), "rocm-docker":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']])] jobNameList = auxiliary.appendJobNameList(jobNameList) - propertyList.each + auxiliary.registerDependencyBranchParameter(["rocPRIM"]) + + propertyList.each { jobName, property-> if (urlJobName == jobName)