From 247c8be0958e6b7faab8be91548f4404eb42e897 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 25 Oct 2023 12:43:54 -0400 Subject: [PATCH] Jenkins: labels, prioritize latest commit --- ci/Jenkinsfile | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 39c1307..a2ecd20 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent none options { - disableConcurrentBuilds() + disableConcurrentBuilds(abortPrevious: true) buildDiscarder(logRotator(numToKeepStr: '8', daysToKeepStr: '20')) timeout(time: 1, unit: 'HOURS') } @@ -36,22 +36,23 @@ pipeline { echo $HOME ls ''' - sh '''#!/bin/bash -ex + sh label: "build CUFINUFFT", script: '''#!/bin/bash -ex cd finufft # v100 cuda arch cuda_arch="70" - - cmake -B build . -DFINUFFT_USE_CUDA=ON \ - -DFINUFFT_USE_CPU=OFF \ - -DFINUFFT_BUILD_TESTS=OFF \ - -DCMAKE_CUDA_ARCHITECTURES="$cuda_arch" \ - -DBUILD_TESTING=ON + mkdir build cd build - make -j4 + cmake .. -DFINUFFT_USE_CUDA=ON \ + -DFINUFFT_USE_CPU=OFF \ + -DFINUFFT_BUILD_TESTS=OFF \ + -DCMAKE_CUDA_ARCHITECTURES="$cuda_arch" \ + -DBUILD_TESTING=OFF \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo + cmake --build . -j 4 ''' sh '${PYBIN}/python3 -m venv $HOME' - sh '''#!/bin/bash -ex + sh label: "set up virtual environment", script: '''#!/bin/bash -ex source $HOME/bin/activate python3 -m pip install --upgrade pip # we could also move pytorch install inside docker @@ -59,7 +60,9 @@ pipeline { python3 -m pip install finufft/python/cufinufft python3 -m pip install -e .[dev] # can make [dev,cuda] once cufinufft released? - + ''' + sh label: "run tests", script: '''#!/bin/bash -ex + source $HOME/bin/activate python3 -m pytest -k "cuda" tests/ --cov -v --error-for-skips --durations=20 ''' }