-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from SC-SGS/bugfixes
Bugfixes
- Loading branch information
Showing
13 changed files
with
373 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,314 @@ | ||
#!groovy | ||
|
||
def buildbadge = addEmbeddableBadgeConfiguration(id: "Jenkins", subject: "Jenkins Tests", status: "skipped") | ||
|
||
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { | ||
print "INFO: Build on ${env.BRANCH_NAME}/${env.BUILD_NUMBER} triggered by branch indexing..." | ||
if (env.BRANCH_NAME != "master") { | ||
if (env.BUILD_NUMBER != "1") { // Always execute first build to load this configuration and thus the triggers | ||
print "INFO: Build on ${env.BRANCH_NAME}/${env.BUILD_NUMBER} skipped due being triggered by Branch Indexing instead of SCM change!" | ||
buildbadge.setStatus('skipped') | ||
currentBuild.result = 'ABORTED' | ||
return // early exit to avoid redundant builds | ||
} | ||
} | ||
} else { | ||
print "INFO: Build on ${env.BRANCH_NAME}/${env.BUILD_NUMBER} triggered by SCM change..." | ||
print "Proceeding!" | ||
} | ||
|
||
|
||
pipeline { | ||
agent { label 'sgs_amd_gpu_node' } | ||
|
||
options { | ||
buildDiscarder( | ||
logRotator( | ||
daysToKeepStr: "21", | ||
numToKeepStr: "50", | ||
artifactDaysToKeepStr: "21", | ||
artifactNumToKeepStr: "50" | ||
) | ||
) | ||
disableConcurrentBuilds() | ||
} | ||
|
||
triggers { | ||
githubPush() // Trigger by push to respective github branch | ||
pollSCM 'H/30 * * * *' // Fallback polling solution as some pushes are somehow lost | ||
} | ||
|
||
environment { | ||
GITHUB_TOKEN = credentials('GITHUB_TOKEN') | ||
BRANCH_NAME = "${env.BRANCH_NAME}" | ||
} | ||
|
||
stages { | ||
stage('init') { | ||
steps { | ||
dir('plssvm') { | ||
sh ''' | ||
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${gitlab_token}" \ | ||
--data "{ | ||
\\"state\\": \\"pending\\", | ||
\\"context\\": \\"jenkins-ctest-amd\\", | ||
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-amd\\", | ||
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-AMD/job/${BRANCH_NAME}/$BUILD_NUMBER\\" | ||
}" | ||
''' | ||
} | ||
} | ||
} | ||
stage('checkout') { | ||
steps { | ||
dir('plssvm') { | ||
checkout scm | ||
} | ||
} | ||
} | ||
stage('setup python'){ | ||
steps{ | ||
sh ''' | ||
/usr/bin/python3.8 -m pip install --user arff | ||
/usr/bin/python3.8 -m pip install --user pandas | ||
/usr/bin/python3.8 -m pip install --user sklearn | ||
/usr/bin/python3.8 -m pip install --user argparse | ||
''' | ||
} | ||
} | ||
stage('build plssvm Release') { | ||
steps { | ||
dir('plssvm') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/hip | ||
module load plssvm/pcsgs09/dpcpp | ||
module load cmake-3.22.2-gcc-9.3.0-wi6mnc2 | ||
mkdir -p build/Release | ||
cd build/Release | ||
rm -rf * | ||
cmake -DCMAKE_BUILD_TYPE=Release -DPLSSVM_TARGET_PLATFORMS="cpu:avx2;amd:gfx906" -DCMAKE_CXX_COMPILER=clang++ -DPLSSVM_ENABLE_HIP_BACKEND=ON -DPLSSVM_ENABLE_ASSERTS=ON -DPLSSVM_ENABLE_SYCL_BACKEND=OFF ../../ | ||
make -j4 | ||
''' | ||
} | ||
} | ||
} | ||
stage('run tests Release') { | ||
steps { | ||
dir('plssvm') { | ||
warnError('Release tests failed!') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/hip | ||
module load plssvm/pcsgs09/dpcpp | ||
cd build/Release | ||
ctest -j4 --no-compress-output -T Test | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
stage('build plssvm hipSYCL Release') { | ||
steps { | ||
dir('plssvm') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/hipsycl | ||
module load cmake-3.22.2-gcc-9.3.0-wi6mnc2 | ||
mkdir -p build/Release_hip | ||
cd build/Release_hip | ||
rm -rf * | ||
cmake -DCMAKE_BUILD_TYPE=Release -DPLSSVM_TARGET_PLATFORMS="cpu:avx2;amd:gfx906" -DCMAKE_CXX_COMPILER=clang++ -DPLSSVM_ENABLE_OPENMP_BACKEND=OFF -DPLSSVM_ENABLE_HIP_BACKEND=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=OFF -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=ON -DPLSSVM_ENABLE_ASSERTS=ON ../../ | ||
make -j4 | ||
''' | ||
} | ||
} | ||
} | ||
stage('run tests hipSYCL Release') { | ||
steps { | ||
dir('plssvm') { | ||
warnError('hipSYCL Release tests failed!') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/hipsycl | ||
cd build/Release_hip | ||
ctest -j4 --no-compress-output -T Test | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
stage('build plssvm DPC++ Release') { | ||
steps { | ||
dir('plssvm') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/dpcpp | ||
module load cmake-3.22.2-gcc-9.3.0-wi6mnc2 | ||
mkdir -p build/Release_dpcpp | ||
cd build/Release_dpcpp | ||
rm -rf * | ||
cmake -DCMAKE_BUILD_TYPE=Release -DPLSSVM_TARGET_PLATFORMS="amd:gfx906" -DCMAKE_CXX_COMPILER=clang++ -DPLSSVM_ENABLE_OPENMP_BACKEND=OFF -DPLSSVM_ENABLE_HIP_BACKEND=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=OFF -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=ON -DPLSSVM_ENABLE_ASSERTS=ON ../../ | ||
make -j4 | ||
''' | ||
} | ||
} | ||
} | ||
stage('run tests DPC++ Release') { | ||
steps { | ||
dir('plssvm') { | ||
warnError('DPC++ Release tests failed!') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/dpcpp | ||
cd build/Release_dpcpp | ||
ctest -j4 --no-compress-output -T Test | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
stage('build plssvm Debug') { | ||
steps { | ||
dir('plssvm') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/hip | ||
module load plssvm/pcsgs09/dpcpp | ||
module load cmake-3.22.2-gcc-9.3.0-wi6mnc2 | ||
mkdir -p build/Debug_cov | ||
cd build/Debug_cov | ||
rm -rf * | ||
cmake -DPLSSVM_TARGET_PLATFORMS="cpu:avx2;amd:gfx906" -DCMAKE_CXX_COMPILER=clang++ -DPLSSVM_ENABLE_SYCL_BACKEND=OFF ../../ | ||
make -j4 | ||
''' | ||
} | ||
} | ||
} | ||
stage('build plssvm hipSYCL Debug') { | ||
steps { | ||
dir('plssvm') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/hipsycl | ||
module load cmake-3.22.2-gcc-9.3.0-wi6mnc2 | ||
mkdir -p build/Debug_hip | ||
cd build/Debug_hip | ||
rm -rf * | ||
cmake -DCMAKE_BUILD_TYPE=Debug -DPLSSVM_TARGET_PLATFORMS="cpu:avx2;amd:gfx906" -DCMAKE_CXX_COMPILER=clang++ -DPLSSVM_ENABLE_OPENMP_BACKEND=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=OFF -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=ON ../../ | ||
make -j4 | ||
''' | ||
} | ||
} | ||
} | ||
/* | ||
stage('build plssvm DPC++ Debug') { | ||
steps { | ||
dir('plssvm') { | ||
sh ''' | ||
source /import/sgs.local/scratch/breyerml/spack/share/spack/setup-env.sh | ||
module use /home/breyerml/.modulefiles/ | ||
module load plssvm/pcsgs09/dpcpp | ||
mkdir -p build/Debug_dpcpp | ||
cd build/Debug_dpcpp | ||
rm -rf * | ||
cmake -DCMAKE_BUILD_TYPE=Debug -DPLSSVM_TARGET_PLATFORMS="nvidia:sm_80" -DCMAKE_CXX_COMPILER=clang++ -DPLSSVM_ENABLE_OPENMP_BACKEND=OFF -DPLSSVM_ENABLE_CUDA_BACKEND=ON -DPLSSVM_ENABLE_OPENCL_BACKEND=OFF -DPLSSVM_ENABLE_SYCL_BACKEND=ON ../../ | ||
make -j4 | ||
''' | ||
} | ||
} | ||
} | ||
*/ | ||
} | ||
post { | ||
always { | ||
// Process the CTest xml output with the xUnit plugin | ||
xunit ( | ||
testTimeMargin: '3000', | ||
thresholdMode: 1, | ||
thresholds: [ | ||
skipped(failureThreshold: '0'), | ||
failed(failureThreshold: '0') | ||
], | ||
tools: [CTest( | ||
pattern: 'plssvm/build/*/Testing/**/*.xml', | ||
deleteOutputFiles: true, | ||
failIfNotNew: false, | ||
skipNoTestFiles: true, | ||
stopProcessingIfError: true | ||
)] | ||
) | ||
|
||
} | ||
success { | ||
script { | ||
buildbadge.setStatus('success') | ||
} | ||
sh ''' | ||
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${gitlab_token}" \ | ||
--data "{ | ||
\\"state\\": \\"success\\", | ||
\\"context\\": \\"jenkins-ctest-amd\\", | ||
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-amd\\", | ||
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-AMD/job/${BRANCH_NAME}/$BUILD_NUMBER\\" | ||
}" | ||
''' | ||
} | ||
failure { | ||
script { | ||
buildbadge.setStatus('failing') | ||
} | ||
sh ''' | ||
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${gitlab_token}" \ | ||
--data "{ | ||
\\"state\\": \\"failure\\", | ||
\\"context\\": \\"jenkins-ctest-amd\\", | ||
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-amd\\", | ||
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-AMD/job/${BRANCH_NAME}/$BUILD_NUMBER\\" | ||
}" | ||
''' | ||
} | ||
aborted { | ||
script { | ||
buildbadge.setStatus('aborted') | ||
} | ||
sh ''' | ||
gitlab_token=$(echo ${GITHUB_TOKEN} | cut -f2 -d':') | ||
curl --verbose\ | ||
--request POST \ | ||
--url "https://api.github.com/repos/SC-SGS/PLSSVM/statuses/$GIT_COMMIT" \ | ||
--header "Content-Type: application/json" \ | ||
--header "authorization: Bearer ${gitlab_token}" \ | ||
--data "{ | ||
\\"state\\": \\"error\\", | ||
\\"context\\": \\"jenkins-ctest-amd\\", | ||
\\"description\\": \\"Jenkins CI Job: jenkins-ctest-amd\\", | ||
\\"target_url\\": \\"https://simsgs.informatik.uni-stuttgart.de/jenkins/view/PLSSVM/job/PLSSVM/job/Github-AMD/job/${BRANCH_NAME}/$BUILD_NUMBER\\" | ||
}" | ||
''' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.