Switching to expanded CI test suite
DELETE
.jenkins/NPI.groovy
-#!/usr/bin/env groovy
-// This shared library is available at https://github.com/ROCmSoftwarePlatform/rocJENKINS/
-@Library('rocJenkins') _
-
-// 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;
-
-rocThrustCI:
-{
-
- def rocthrust = new rocProject('rocThrust', 'NPI')
- // customize for project
- rocthrust.paths.build_command = './install'
-
- // Define test architectures, optional rocm version argument is available
- def nodes = new dockerNodes(['ubuntu && gfx908'], rocthrust)
-
- boolean formatCheck = false
-
- def commonGroovy
-
- def compileCommand =
- {
- platform, project->
-
- commonGroovy = load "${project.paths.project_src_prefix}/.jenkins/Common.groovy"
- commonGroovy.runCompileCommand(platform, project)
- }
-
- def testCommand =
- {
- platform, project->
-
- commonGroovy.runTestCommand(platform, project)
- }
-
- def packageCommand =
- {
- platform, project->
-
- commonGroovy.runPackageCommand(platform, project)
- }
-
- buildProject(rocthrust, formatCheck, nodes.dockerArray, compileCommand, testCommand, packageCommand)
-}

DELETE
.jenkins/PreCheckin.groovy
-#!/usr/bin/env groovy
-// This shared library is available at https://github.com/ROCmSoftwarePlatform/rocJENKINS/
-@Library('rocJenkins') _
-
-// 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;
-
-rocThrustCI:
-{
-
- def rocthrust = new rocProject('rocThrust', 'PreCheckin')
- // customize for project
- rocthrust.paths.build_command = './install'
-
- // Define test architectures, optional rocm version argument is available
- def nodes = new dockerNodes(['ubuntu && gfx803', 'sles && gfx906', 'gfx900 && centos7', 'gfx906 && centos7'], rocthrust)
-
- boolean formatCheck = false
-
- def commonGroovy
-
- def compileCommand =
- {
- platform, project->
-
- commonGroovy = load "${project.paths.project_src_prefix}/.jenkins/Common.groovy"
- commonGroovy.runCompileCommand(platform, project)
- }
-
- def testCommand =
- {
- platform, project->
-
- commonGroovy.runTestCommand(platform, project)
- }
-
- def packageCommand =
- {
- platform, project->
-
- commonGroovy.runPackageCommand(platform, project)
- }
-
- buildProject(rocthrust, formatCheck, nodes.dockerArray, compileCommand, testCommand, packageCommand)
-}

RENAME
.jenkins/Common.groovy
.jenkins/common.groovy
// 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)
+def runCompileCommand(platform, project, jobName)
{
project.paths.construct_build_prefix()
- def command
+ String compiler = jobName.contains('hipclang') ? 'hipcc' : 'hcc'
+ String hipClangArgs = jobName.contains('hipclang') ? '--hip-clang' : ''
- if(platform.jenkinsLabel.contains('hip-clang'))
- {
command = """#!/usr/bin/env bash
set -x
cd ${project.paths.project_build_prefix}
- LD_LIBRARY_PATH=/opt/rocm/hcc/lib CXX=/opt/rocm/bin/hipcc ${project.paths.build_command} --hip-clang
- """
- }
- else
- {
- command = """#!/usr/bin/env bash
- set -x
- cd ${project.paths.project_build_prefix}
- LD_LIBRARY_PATH=/opt/rocm/hcc/lib CXX=/opt/rocm/bin/hcc ${project.paths.build_command} -c
+ LD_LIBRARY_PATH=/opt/rocm/hcc/lib ${project.paths.build_command} ${hipClangArgs}
"""
- }
+
platform.runCommand(this, command)
}
@@ -41,11 +32,11 @@ def runTestCommand (platform, project)
platform.runCommand(this, command)
}
-def runPackageCommand(platform, project)
+def runPackageCommand(platform, project, jobName)
{
def command
- if(platform.jenkinsLabel.contains('hip-clang'))
+ if(jobName.contains('hipclang'))
{
packageCommand = null
}

ADD
.jenkins/precheckin.groovy
+#!/usr/bin/env groovy
+// This shared library is available at https://github.com/ROCmSoftwarePlatform/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('rocThrust', 'precheckin')
+
+ // 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)
+ }
+
+ def packageCommand =
+ {
+ platform, project->
+
+ commonGroovy.runPackageCommand(platform, project, jobName)
+ }
+
+ 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)
+
+ 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']]),
+ "rocm-docker":([ubuntu16:['gfx900'],centos7:['gfx906'],sles15sp1:['gfx908']])]
+ jobNameList = auxiliary.appendJobNameList(jobNameList)
+
+ 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)
+ }
+}
+

MODIFY
docker/dockerfile-build-centos
docker/dockerfile-build-centos
@@ -7,7 +7,7 @@ LABEL maintainer="rocthrust-maintainer@amd.com"
USER root
ARG user_uid
-RUN yum install -y \
+RUN yum install -y --nogpgcheck\
sudo \
rock-dkms \
centos-release-scl \

MODIFY
install
install
@@ -106,9 +106,9 @@ else
mkdir -p debug; cd debug
fi
-# Configure hipCUB, setup options for your system.
+# Configure rocThrust, setup options for your system.
# Build options:
-# BUILD_TEST - on by default,
+# BUILD_TEST - off by default,
# BUILD_BENCHMARK - off by default.
#
# ! IMPORTANT !
@@ -127,18 +127,22 @@ if [ -e /etc/redhat-release ] ; then
else
cmake_executable="cmake"
fi
+if [[ "${build_clients}" == true ]]; then
+ build_test="-DBUILD_TEST=ON"
+fi
if [[ "${build_relocatable}" == true ]]; then
- CXX=$rocm_path/bin/${compiler} ${cmake_executable} -DBUILD_BENCHMARK=ON -DBUILD_TEST=ON \
+ CXX=$rocm_path/bin/${compiler} ${cmake_executable} \
-DCMAKE_INSTALL_PREFIX=${rocm_path} \
-DCMAKE_PREFIX_PATH="${rocm_path} ${rocm_path}/hcc ${rocm_path}/hip" \
-DCMAKE_MODULE_PATH="${rocm_path}/hip/cmake" \
- -DROCPRIM_ROOT=${rocm_path}/rocprim \
+ -DROCPRIM_ROOT=${rocm_path}/rocprim ${build_test}\
../../. # or cmake-gui ../.
else
- CXX=$rocm_path/bin/${compiler} ${cmake_executable} -DBUILD_BENCHMARK=ON ../../. # or cmake-gui ../.
+ CXX=$rocm_path/bin/${compiler} ${cmake_executable} ${build_test} ../../. # or cmake-gui ../.
fi
+
# Build
make -j$(nproc)

Switching to expanded CI test suite (#92)