diff --git a/projects/hipcub/.jenkins/common.groovy b/projects/hipcub/.jenkins/common.groovy deleted file mode 100644 index ae8f7978256..00000000000 --- a/projects/hipcub/.jenkins/common.groovy +++ /dev/null @@ -1,79 +0,0 @@ -// This file is for internal AMD use. -// If you are interested in running your own Jenkins, please raise a github issue for assistance. - -def runCompileCommand(platform, project, jobName, boolean debug=false, boolean sameOrg=true) -{ - project.paths.construct_build_prefix() - - String buildTypeArg = debug ? '-DCMAKE_BUILD_TYPE=Debug' : '-DCMAKE_BUILD_TYPE=Release' - String buildTypeDir = debug ? 'debug' : 'release' - String cmake = platform.jenkinsLabel.contains('centos') ? 'cmake3' : 'cmake' - //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 command = """#!/usr/bin/env bash - set -x - ${getRocPRIM} - cd ${project.paths.project_build_prefix} - mkdir -p build/${buildTypeDir} && cd build/${buildTypeDir} - ${auxiliary.gfxTargetParser()} - ${cmake} --toolchain=toolchain-linux.cmake ${buildTypeArg} ${amdgpuTargets} -DBUILD_TEST=ON -DBUILD_BENCHMARK=ON ../.. - make -j\$(nproc) - """ - - platform.runCommand(this, command) -} - - -def runTestCommand (platform, project, boolean rocmExamples=false) -{ - String sudo = auxiliary.sudo(platform.jenkinsLabel) - - def testCommand = "ctest --output-on-failure --verbose --timeout 900" - def command = """#!/usr/bin/env bash - set -x - cd ${project.paths.project_build_prefix} - cd ${project.testDirectory} - ${sudo} LD_LIBRARY_PATH=/opt/rocm/lib ${testCommand} - """ - - platform.runCommand(this, command) - if (rocmExamples){ - String buildString = "" - if (platform.os.contains("ubuntu")){ - buildString += "sudo dpkg -i *.deb" - } - else { - buildString += "sudo rpm -i *.rpm" - } - testCommand = """#!/usr/bin/env bash - set -ex - cd ${project.paths.project_build_prefix}/build/release/package - ${buildString} - cd ../../.. - testDirs=("Libraries/hipCUB") - git clone https://github.com/ROCm/rocm-examples.git - rocm_examples_dir=\$(readlink -f rocm-examples) - for testDir in \${testDirs[@]}; do - cd \${rocm_examples_dir}/\${testDir} - cmake -S . -B build - cmake --build build - cd ./build - ctest --output-on-failure - done - """ - platform.runCommand(this, testCommand, "ROCM Examples") - } -} - -def runPackageCommand(platform, project) -{ - def packageHelper = platform.makePackage(platform.jenkinsLabel,"${project.paths.project_build_prefix}/build/release") - - platform.runCommand(this, packageHelper[0]) - platform.archiveArtifacts(this, packageHelper[1]) -} - -return this diff --git a/projects/hipcub/.jenkins/precheckin.groovy b/projects/hipcub/.jenkins/precheckin.groovy deleted file mode 100644 index 70f2bb54a76..00000000000 --- a/projects/hipcub/.jenkins/precheckin.groovy +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env groovy -// This shared library is available at https://github.com/ROCm/rocJENKINS/ -@Library('rocJenkins@pong') _ - -// This file is for internal AMD use. -// If you are interested in running your own Jenkins, please raise a github issue for assistance. - -import com.amd.project.* -import com.amd.docker.* -import java.nio.file.Path; - -def runCI = -{ - nodeDetails, jobName-> - - def prj = new rocProject('hipCUB', 'PreCheckin') - prj.timeout.compile = 400 - // Define test architectures, optional rocm version argument is available - def nodes = new dockerNodes(nodeDetails, jobName, prj) - - boolean formatCheck = false - - def commonGroovy - - def compileCommand = - { - platform, project-> - - commonGroovy = load "${project.paths.project_src_prefix}/.jenkins/common.groovy" - commonGroovy.runCompileCommand(platform, project, jobName) - } - - def testCommand = - { - platform, project-> - - commonGroovy.runTestCommand(platform, project, true) - } - - def packageCommand = - { - platform, project-> - - commonGroovy.runPackageCommand(platform, project) - } - - buildProject(prj, formatCheck, nodes.dockerArray, compileCommand, testCommand, packageCommand) -} - -ci: { - String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - - def propertyList = ["compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])]] - propertyList = auxiliary.appendPropertyList(propertyList) - - def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":([ubuntu18:['gfx900'],centos7:['gfx906'],centos8:['gfx906'],sles15sp1:['gfx908']])] - jobNameList = auxiliary.appendJobNameList(jobNameList) - - auxiliary.registerDependencyBranchParameter(["rocPRIM"]) - - propertyList.each - { - jobName, property-> - if (urlJobName == jobName) - properties(auxiliary.addCommonProperties(property)) - } - - Set seenJobNames = [] - jobNameList.each - { - jobName, nodeDetails-> - seenJobNames.add(jobName) - if (urlJobName == jobName) - runCI(nodeDetails, jobName) - } - - // For url job names that are outside of the standardJobNameSet i.e. compute-rocm-dkms-no-npi-1901 - if(!seenJobNames.contains(urlJobName)) - { - properties(auxiliary.addCommonProperties([pipelineTriggers([cron('0 1 * * *')])])) - runCI([ubuntu16:['gfx906']], urlJobName) - } -} - diff --git a/projects/hipcub/.jenkins/staticanalysis.groovy b/projects/hipcub/.jenkins/staticanalysis.groovy deleted file mode 100644 index 4e2237ab1a8..00000000000 --- a/projects/hipcub/.jenkins/staticanalysis.groovy +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env groovy -// This shared library is available at https://github.com/ROCm/rocJENKINS/ -@Library('rocJenkins@pong') _ - -// This is file for internal AMD use. -// If you are interested in running your own Jenkins, please raise a github issue for assistance. - -import com.amd.project.* -import com.amd.docker.* -import java.nio.file.Path - -def runCompileCommand(platform, project, jobName, boolean debug=false) -{ - project.paths.construct_build_prefix() -} - -def runCI = -{ - nodeDetails, jobName-> - - def prj = new rocProject('hipCUB', 'StaticAnalysis') - - // Define test architectures, optional rocm version argument is available - def nodes = new dockerNodes(nodeDetails, jobName, prj) - - boolean formatCheck = false - boolean staticAnalysis = true - - def compileCommand = - { - platform, project-> - - runCompileCommand(platform, project, jobName, false) - } - - buildProject(prj , formatCheck, nodes.dockerArray, compileCommand, null, null, staticAnalysis) -} - -ci: { - String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - - def propertyList = ["compute-rocm-dkms-no-npi-hipclang":[pipelineTriggers([cron('0 1 * * 0')])], - "rocm-docker":[]] - propertyList = auxiliary.appendPropertyList(propertyList) - - def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":[]] - jobNameList = auxiliary.appendJobNameList(jobNameList) - - propertyList.each - { - jobName, property-> - if (urlJobName == jobName) - properties(auxiliary.addCommonProperties(property)) - } - - jobNameList.each - { - jobName, nodeDetails-> - if (urlJobName == jobName) - stage(jobName) { - runCI(nodeDetails, jobName) - } - } -} diff --git a/projects/hipcub/.jenkins/staticlibrary.groovy b/projects/hipcub/.jenkins/staticlibrary.groovy deleted file mode 100644 index 549913d8cbb..00000000000 --- a/projects/hipcub/.jenkins/staticlibrary.groovy +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env groovy -@Library('rocJenkins@pong') _ -import com.amd.project.* -import com.amd.docker.* -import java.nio.file.Path; - -def runCI = -{ - nodeDetails, jobName-> - - def prj = new rocProject('hipCUB', 'Static Library PreCheckin') - - def nodes = new dockerNodes(nodeDetails, jobName, prj) - - def commonGroovy - - boolean formatCheck = false - - def compileCommand = - { - platform, project-> - - commonGroovy = load "${project.paths.project_src_prefix}/.jenkins/common.groovy" - commonGroovy.runCompileCommand(platform, project, jobName, false, true) - } - - - def testCommand = - { - platform, project-> - - commonGroovy.runTestCommand(platform, project) - } - - def packageCommand = - { - platform, project-> - - commonGroovy.runPackageCommand(platform, project) - } - - buildProject(prj, formatCheck, nodes.dockerArray, compileCommand, testCommand, packageCommand) -} - -ci: { - String urlJobName = auxiliary.getTopJobName(env.BUILD_URL) - - 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']]), - "rocm-docker":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']])] - jobNameList = auxiliary.appendJobNameList(jobNameList) - - propertyList.each - { - jobName, property-> - if (urlJobName == jobName) - properties(auxiliary.addCommonProperties(property)) - } - - jobNameList.each - { - jobName, nodeDetails-> - if (urlJobName == jobName) - stage(jobName) { - runCI(nodeDetails, jobName) - } - } - - // For url job names that are not listed by the jobNameList i.e. compute-rocm-dkms-no-npi-1901 - if(!jobNameList.keySet().contains(urlJobName)) - { - properties(auxiliary.addCommonProperties([pipelineTriggers([cron('0 1 * * *')])])) - stage(urlJobName) { - runCI([ubuntu16:['gfx906']], urlJobName) - } - } -}