CI - Remove .jenkins (#615)

migrating to rocJenkins

[ROCm/rocdecode commit: 91044fc832]
Tento commit je obsažen v:
Sam Wu
2025-07-18 12:17:37 -06:00
odevzdal GitHub
rodič 0058b85808
revize 71f930b876
2 změnil soubory, kde provedl 0 přidání a 426 odebrání
-348
Zobrazit soubor
@@ -1,348 +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 staticLibrary=false) {
project.paths.construct_build_prefix()
String buildTypeArg = debug ? '-DCMAKE_BUILD_TYPE=Debug' : '-DCMAKE_BUILD_TYPE=Release'
String buildTypeDir = debug ? 'debug' : 'release'
def command = """#!/usr/bin/env bash
set -ex
echo Build rocDecode - ${buildTypeDir}
cd ${project.paths.project_build_prefix}
mkdir -p build/${buildTypeDir} && cd build/${buildTypeDir}
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fprofile-instr-generate -fcoverage-mapping" ../..
make -j\$(nproc)
sudo make install
sudo make package
objdump -x /opt/rocm/lib/librocdecode.so | grep NEEDED
ldd -v /opt/rocm/lib/librocdecode.so
"""
platform.runCommand(this, command)
}
def runTestCommand (platform, project) {
String libLocation = ''
String libvaDriverPath = ""
String packageManager = 'apt -y'
String toolsPackage = 'llvm-amdgpu-dev'
String llvmLocation = '/opt/amdgpu/lib/x86_64-linux-gnu/llvm-20.1/bin'
boolean runHevcStability = true;
boolean runAv1Test = true;
if (platform.jenkinsLabel.contains('rhel')) {
libLocation = ':/usr/local/lib'
packageManager = 'yum -y'
toolsPackage = 'llvm-amdgpu-devel'
llvmLocation = '/opt/amdgpu/lib64/llvm-20.1/bin'
}
else if (platform.jenkinsLabel.contains('sles')) {
libLocation = ':/usr/local/lib'
libvaDriverPath = "export LIBVA_DRIVERS_PATH=/opt/amdgpu/lib64/dri"
packageManager = 'zypper -n'
toolsPackage = 'llvm-amdgpu-devel'
llvmLocation = '/opt/amdgpu/lib64/llvm-20.1/bin'
}
if (platform.jenkinsLabel.contains('gfx90a') || platform.jenkinsLabel.contains('gfx908')) {
runHevcStability = false;
runAv1Test = false;
}
String commitSha
String repoUrl
(commitSha, repoUrl) = util.getGitHubCommitInformation(project.paths.project_src_prefix)
withCredentials([string(credentialsId: "mathlibs-codecov-token-rocdecode", variable: 'CODECOV_TOKEN')])
{
def prereq = """
if [ -d "\${JENKINS_HOME_DIR}/rocDecode" ]; then
# Count the number of files in the folder
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/AvcConformance -type f | wc -l)
# Check if there are 254 files
if [ "\$FILE_COUNT" -ne 254 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
rm AvcConformance.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeConformance/AvcConformance.zip
unzip -o AvcConformance.zip
fi
if ${runAv1Test}; then
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/Av1Conformance_v1.0 -type f | wc -l)
# Check if there are 326 files
if [ "\$FILE_COUNT" -ne 326 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
rm Av1Conformance_v1.0.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeConformance/Av1Conformance_v1.0.zip
unzip -o Av1Conformance_v1.0.zip
fi
fi
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/Vp9Conformance -type f | wc -l)
# Check if there are 216 files
if [ "\$FILE_COUNT" -ne 216 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeConformance/Vp9Conformance.zip
unzip -o Vp9Conformance.zip
fi
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/HevcConformance -type f | wc -l)
# Check if there are 270 files
if [ "\$FILE_COUNT" -ne 270 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
rm HevcConformance.zip
wget http://math-ci.amd.com/userContent/computer-vision/HevcConformance/*zip*/HevcConformance.zip
unzip -o HevcConformance.zip
fi
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/AvcStability -type f | wc -l)
# Check if there are 22 files
if [ "\$FILE_COUNT" -ne 22 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
rm AvcStability.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/AvcStability.zip
unzip -o AvcStability.zip
fi
if ${runAv1Test}; then
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/Av1Stability -type f | wc -l)
# Check if there are 215 files
if [ "\$FILE_COUNT" -ne 215 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
rm Av1Stability.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/Av1Stability.zip
unzip -o Av1Stability.zip
fi
fi
if ${runHevcStability}; then
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/HevcStability -type f | wc -l)
# Check if there are 44 files
if [ "\$FILE_COUNT" -ne 44 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
rm HevcStability.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/HevcStability.zip
unzip -o HevcStability.zip
fi
fi
FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/Vp9Stability -type f | wc -l)
# Check if there are 18 files
if [ "\$FILE_COUNT" -ne 18 ]; then
echo "wrong file count"
ls
cd \${JENKINS_HOME_DIR}/rocDecode
rm Vp9Stability.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/Vp9Stability.zip
unzip -o Vp9Stability.zip
fi
if [ ! -f \${JENKINS_HOME_DIR}/rocDecode/data1.img ]; then
echo "File does not exist."
cd \${JENKINS_HOME_DIR}/rocDecode
wget http://math-ci.amd.com/userContent/computer-vision/data1.img
fi
else
echo "The folder path does not exist."
mkdir -p \${JENKINS_HOME_DIR}/rocDecode
cd \${JENKINS_HOME_DIR}/rocDecode
wget http://math-ci.amd.com/userContent/computer-vision/data1.img
wget http://math-ci.amd.com/userContent/computer-vision/HevcConformance/*zip*/HevcConformance.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeConformance/Vp9Conformance.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeConformance/AvcConformance.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/AvcStability.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/Vp9Stability.zip
unzip -o HevcConformance.zip
unzip -o Vp9Conformance.zip
unzip -o AvcConformance.zip
unzip -o AvcStability.zip
unzip -o Vp9Stability.zip
if ${runAv1Test}; then
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeConformance/Av1Conformance_v1.0.zip
unzip -o Av1Conformance_v1.0.zip
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/Av1Stability.zip
unzip -o Av1Stability.zip
fi
if ${runHevcStability}; then
wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/HevcStability.zip
unzip -o HevcStability.zip
fi
fi
"""
def command = """#!/usr/bin/env bash
set -ex
export HOME=/home/jenkins
${libvaDriverPath}
echo make test starts
cd ${project.paths.project_build_prefix}/build
export LLVM_PROFILE_FILE=\"\$(pwd)/rawdata/rocdecode-%p.profraw\"
echo \$LLVM_PROFILE_FILE
cd release
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rocm/lib${libLocation} make test ARGS="-VV --rerun-failed --output-on-failure"
echo make test ends
echo rocdecode-sample - videoDecode starts
mkdir -p rocdecode-sample && cd rocdecode-sample
cmake /opt/rocm/share/rocdecode/samples/videoDecode/
make -j8
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rocm/lib${libLocation} ./videodecode -i /opt/rocm/share/rocdecode/video/AMD_driving_virtual_20-H265.mp4
echo rocdecode-sample - videoDecode ends
echo rocdecode-test package verification starts
cd ../ && mkdir -p rocdecode-test && cd rocdecode-test
cmake /opt/rocm/share/rocdecode/test/
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rocm/lib${libLocation} ctest -VV --rerun-failed --output-on-failure
echo rocdecode-test package verification ends
echo rocdecode conformance tests start
cd ../ && mkdir -p conformance && cd conformance
pip3 install pandas
echo HEVC conformance test starts
mkdir hevc-conformance && cd hevc-conformance
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecode_Conformance.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/HevcConformance --results_directory .
echo HEVC conformance test ends
cd ../
echo AVC conformance test starts
mkdir avc-conformance && cd avc-conformance
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecode_Conformance.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/AvcConformance --results_directory .
echo AVC conformance test ends
cd ../
echo VP9 conformance test starts
mkdir vp9-conformance && cd vp9-conformance
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecode_Conformance.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/Vp9Conformance --results_directory .
echo VP9 conformance test ends
if ${runAv1Test}; then
cd ../
echo AV1 conformance test starts
mkdir av1-conformance && cd av1-conformance
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecode_Conformance.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/Av1Conformance_v1.0 --results_directory .
echo AV1 conformance test ends
fi
echo rocdecode stability tests start
cd ../../ && mkdir -p stability && cd stability
echo AVC stability test starts
mkdir avc-stability && cd avc-stability
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/AvcStability --results_directory . --check_decode_status 1
echo AVC stability test ends
if ${runHevcStability}; then
echo HEVC stability test starts
cd ../ && mkdir hevc-stability && cd hevc-stability
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/HevcStability --results_directory . --check_decode_status 1
echo HEVC stability test ends
fi
if ${runAv1Test}; then
echo AV1 stability test starts
cd ../ && mkdir av1-stability && cd av1-stability
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/Av1Stability --results_directory . --check_decode_status 1 --use_ffmpeg_demuxer 0
echo AV1 stability test ends
fi
echo VP9 stability test starts
cd ../ && mkdir vp9-stability && cd vp9-stability
python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/Vp9Stability --results_directory . --check_decode_status 1
echo VP9 stability test ends
cd ../../
echo rocdecode-sample - videoDecode with data1 video test starts
cd rocdecode-sample
cp \${JENKINS_HOME_DIR}/rocDecode/data1.img \$PWD
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rocm/lib${libLocation} ./videodecode -i ./data1.img
echo rocdecode-sample - videoDecode with data1 video test ends
echo rocdecode-sample - videoDecodePerf with data1 video test starts
mkdir -p rocdecode-perf && cd rocdecode-perf
cmake /opt/rocm/share/rocdecode/samples/videoDecodePerf/
make -j8
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/opt/rocm/lib${libLocation} ./videodecodeperf -i ./../data1.img
echo rocdecode-sample - videoDecodePerf with data1 video test ends
echo \$(pwd)
cd ../../../
echo \$(pwd)
sudo ${packageManager} install lcov ${toolsPackage}
${llvmLocation}/llvm-profdata merge -sparse rawdata/*.profraw -o rocdecode.profdata
${llvmLocation}/llvm-cov export -object release/lib/librocdecode.so --instr-profile=rocdecode.profdata --format=lcov > coverage.info
lcov --remove coverage.info '/opt/*' --output-file coverage.info
lcov --list coverage.info
lcov --summary coverage.info
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -v -U \$http_proxy -t ${CODECOV_TOKEN} --file coverage.info --name rocDecode --sha ${commitSha}
"""
platform.runCommand(this, prereq)
platform.runCommand(this, command)
}
}
def runPackageCommand(platform, project) {
def packageHelper = platform.makePackage(platform.jenkinsLabel, "${project.paths.project_build_prefix}/build/release")
String packageType = ''
String packageInfo = ''
String packageDetail = ''
String packageInstall = ''
String osType = ''
String packageRunTime = ''
if (platform.jenkinsLabel.contains('centos') || platform.jenkinsLabel.contains('rhel') || platform.jenkinsLabel.contains('sles')) {
packageType = 'rpm'
packageInfo = 'rpm -qlp'
packageDetail = 'rpm -qi'
packageInstall = 'rpm -i'
packageRunTime = 'rocdecode-*'
if (platform.jenkinsLabel.contains('sles')) {
osType = 'sles'
}
else if (platform.jenkinsLabel.contains('rhel8')) {
osType = 'rhel8'
}
else if (platform.jenkinsLabel.contains('rhel9')) {
osType = 'rhel9'
}
}
else
{
packageType = 'deb'
packageInfo = 'dpkg -c'
packageDetail = 'dpkg -I'
packageInstall = 'dpkg -i'
packageRunTime = 'rocdecode_*'
if (platform.jenkinsLabel.contains('ubuntu20')) {
osType = 'ubuntu20'
}
else if (platform.jenkinsLabel.contains('ubuntu22')) {
osType = 'ubuntu22'
}
}
def command = """#!/usr/bin/env bash
set -ex
export HOME=/home/jenkins
echo Make rocDecode Package
cd ${project.paths.project_build_prefix}/build/release
sudo make package
mkdir -p package
mv rocdecode-dev*.${packageType} package/${osType}-rocdecode-dev.${packageType}
mv rocdecode-test*.${packageType} package/${osType}-rocdecode-test.${packageType}
mv ${packageRunTime}.${packageType} package/${osType}-rocdecode.${packageType}
${packageDetail} package/${osType}-rocdecode-dev.${packageType}
${packageDetail} package/${osType}-rocdecode-test.${packageType}
${packageDetail} package/${osType}-rocdecode.${packageType}
${packageInfo} package/${osType}-rocdecode-dev.${packageType}
${packageInfo} package/${osType}-rocdecode-test.${packageType}
${packageInfo} package/${osType}-rocdecode.${packageType}
sudo ${packageInstall} package/${osType}-rocdecode.${packageType}
sudo ${packageInstall} package/${osType}-rocdecode-dev.${packageType}
sudo ${packageInstall} package/${osType}-rocdecode-test.${packageType}
"""
platform.runCommand(this, command)
platform.archiveArtifacts(this, packageHelper[1])
}
return this
-78
Zobrazit soubor
@@ -1,78 +0,0 @@
#!/usr/bin/env groovy
@Library('rocJenkins@pong') _
import com.amd.project.*
import com.amd.docker.*
def runCI =
{
nodeDetails, jobName->
def prj = new rocProject('rocDecode', '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)
}
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-hipclang":[pipelineTriggers([cron('0 1 * * 0')])]]
propertyList = auxiliary.appendPropertyList(propertyList)
def jobNameList = ["compute-rocm-dkms-no-npi-hipclang":([ubuntu20:['gfx90a'], ubuntu22:['gfx1101'], sles15sp1:['gfx908'], rhel8:['gfx1030'], rhel9:['gfx942']])]
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([ubuntu22:['gfx942']], urlJobName)
}
}
}