diff --git a/Jenkinsfile_cscs b/Jenkinsfile_cscs new file mode 100644 index 0000000..bd087c9 --- /dev/null +++ b/Jenkinsfile_cscs @@ -0,0 +1,20 @@ +pipeline { + agent {label 'scs_daintvm1'} + stages { + stage('test') { + steps { + sh '''#!/bin/bash -l + sbatch --wait sbatch_test.sh + cat test.out + grep '100% tests passed' test.out''' + + archiveArtifacts 'test.out,test.err' + } + } + } + post { + always { + deleteDir() + } + } +} diff --git a/sbatch_test.sh b/sbatch_test.sh new file mode 100644 index 0000000..f4b97c2 --- /dev/null +++ b/sbatch_test.sh @@ -0,0 +1,14 @@ +#!/bin/bash -l +#SBATCH --time=00:10:00 +#SBATCH --nodes=1 +#SBATCH --constraint=gpu +#SBATCH --partition=cscsci +#SBATCH --output=test.out +#SBATCH --error=test.err + +source environment.sh +cd cmake/handson/4_advanced/solution/dotprod +mkdir build && cd build +cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/../install +make install +make test