Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependency branch parameters to CI jobs #477

Merged
merged 8 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .jenkins/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down
22 changes: 12 additions & 10 deletions .jenkins/precheckin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import com.amd.project.*
import com.amd.docker.*
import java.nio.file.Path;

def runCI =
def runCI =
{
nodeDetails, jobName->

def prj = new rocProject('rocThrust', 'precheckin')

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)
Expand All @@ -43,37 +44,39 @@ 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)
properties(auxiliary.addCommonProperties(property))
}

Set seenJobNames = []
jobNameList.each
jobNameList.each
{
jobName, nodeDetails->
seenJobNames.add(jobName)
Expand All @@ -85,7 +88,6 @@ ci: {
if(!seenJobNames.contains(urlJobName))
{
properties(auxiliary.addCommonProperties([pipelineTriggers([cron('0 1 * * *')])]))
runCI([ubuntu16:['gfx906']], urlJobName)
runCI([ubuntu16:['gfx906']], urlJobName)
}
}

19 changes: 11 additions & 8 deletions .jenkins/staticlibrary.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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->
Expand All @@ -27,7 +28,7 @@ def runCI =
commonGroovy.runCompileCommand(platform, project, jobName, false, true)
}


def testCommand =
{
platform, project->
Expand All @@ -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)
Expand Down