Skip to content

Commit

Permalink
Jenkins: labels, prioritize latest commit
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Oct 25, 2023
1 parent 2073268 commit 247c8be
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pipeline {
agent none
options {
disableConcurrentBuilds()
disableConcurrentBuilds(abortPrevious: true)
buildDiscarder(logRotator(numToKeepStr: '8', daysToKeepStr: '20'))
timeout(time: 1, unit: 'HOURS')
}
Expand Down Expand Up @@ -36,30 +36,33 @@ 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
python3 -m pip install "torch~=2.1.0" --index-url https://download.pytorch.org/whl/cu118
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
'''
}
Expand Down

0 comments on commit 247c8be

Please sign in to comment.