forked from tomopy/tomopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (74 loc) · 2.51 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
language: minimal
os:
- linux
sudo: false
env:
matrix:
# define own python versions because we are using conda
- PYTHON_VERSION="3.6"
TASKING="--enable-tasking"
CUDA="--disable-cuda"
- PYTHON_VERSION="3.6"
TASKING="--disable-tasking"
CUDA="--disable-cuda"
- PYTHON_VERSION="3.7"
TASKING="--enable-tasking"
CUDA="--disable-cuda"
- PYTHON_VERSION="3.7"
TASKING="--enable-tasking"
CUDA="--enable-cuda"
global:
- CUDA_INSTALLER=cuda_10.1.168_418.67_linux.run
- CUDA_TOOLKIT_ROOT_DIR=${HOME}/cuda
- CUDA_COMPILER=${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc
- LD_LIBRARY_PATH=${HOME}/miniconda/lib:${CUDA_TOOLKIT_ROOT_DIR}/lib64
- PATH=${HOME}/miniconda/bin:${PATH}
- PYCTEST_ARGS="-SF --pyctest-jobs=1 --pyctest-site=Travis
--phantoms baboon checkerboard peppers -- -VV --
-DCUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT_DIR}
-DCMAKE_CUDA_COMPILER=${CUDA_COMPILER}"
- TOMOPY_USE_C_ALGORITHMS=1
before_install:
# Install miniconda
- if [[ "$PYTHON_VERSION" == "2.7" ]]; then
wget -q https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p ${HOME}/miniconda
- source ${HOME}/miniconda/etc/profile.d/conda.sh
- conda activate
- >
conda config
--set always_yes yes
--set changeps1 no
--set auto_update_conda no
- conda update -n base conda
install:
# Install python dependencies using conda
- PYTHON_TAG=$(echo ${PYTHON_VERSION} | sed 's/\.//g')
- conda env create -n tomopy -f envs/linux-${PYTHON_TAG}.yml
- conda activate tomopy
- conda info -a
- conda list --explicit
# Install the CUDA toolkit seconds so CUDA can find host compilers
- ln -s ${CC} ${CONDA_PREFIX}/bin/gcc
- ln -s ${CXX} ${CONDA_PREFIX}/bin/g++
- if [[ "$CUDA" == "--enable-cuda" ]]; then
wget -q -N https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/${CUDA_INSTALLER};
chmod u+x ${CUDA_INSTALLER};
./${CUDA_INSTALLER} --silent --toolkit
--toolkitpath=${CUDA_TOOLKIT_ROOT_DIR}
--defaultroot=${CUDA_TOOLKIT_ROOT_DIR}
--no-opengl-libs --no-man-page --no-drm;
fi
# Check the compilers
- which gcc
- which g++
- echo "C compiler = ${CC}"
- echo "CXX compiler = ${CXX}"
script:
- ./pyctest_tomopy.py ${TASKING} ${CUDA} --phantom-size 128 ${PYCTEST_ARGS}
- $(which nosetests)
after_success:
- coveralls