forked from openmm/openmm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
251 lines (233 loc) · 8.88 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
language: python
addons:
apt:
packages:
- doxygen
- python-numpy
- python-scipy
- libfftw3-dev
env:
global:
- CCACHE=$HOME/ccache/lib/ccache/bin
jobs:
include:
- sudo: required
dist: xenial
name: "CPU OpenCL"
env: OPENCL=true
CUDA=false
CC=$CCACHE/gcc
CXX=$CCACHE/g++
CMAKE_FLAGS="
-OPENMM_BUILD_OPENCL_LIB=ON
-DOPENMM_BUILD_OPENCL_TESTS=ON
-DOPENMM_BUILD_STATIC_LIB=OFF
-DOPENMM_BUILD_CPU_LIB=OFF
-DOPENMM_BUILD_REFERENCE_TESTS=OFF
-DOPENMM_BUILD_SERIALIZATION_TESTS=OFF
-DOPENMM_BUILD_PME_PLUGIN=OFF
-DOPENMM_BUILD_AMOEBA_PLUGIN=OFF
-DOPENMM_BUILD_PYTHON_WRAPPERS=OFF
-DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF
-DOPENMM_BUILD_EXAMPLES=OFF
-DOPENCL_INCLUDE_DIR=$HOME/AMDAPPSDK/include
-DOPENCL_LIBRARY=$HOME/AMDAPPSDK/lib/x86_64/libOpenCL.so"
addons: {apt: {packages: []}}
- sudo: required
dist: xenial
name: "CUDA Compile"
env: CUDA=true
OPENCL=false
CUDA_VERSION="7.5-18"
CC=$CCACHE/gcc
CXX=$CCACHE/g++
CMAKE_FLAGS="
-DOPENMM_BUILD_CUDA_TESTS=OFF
-DOPENMM_BUILD_OPENCL_TESTS=OFF
-DOPENMM_BUILD_PYTHON_WRAPPERS=OFF
-DOPENMM_BUILD_REFERENCE_TESTS=OFF
-DOPENMM_BUILD_SERIALIZATION_TESTS=OFF
-DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF
-DOPENMM_BUILD_EXAMPLES=OFF
-DOPENCL_LIBRARY=/usr/local/cuda-7.5/lib64/libOpenCL.so
-DCUDA_CUDART_LIBRARY=/usr/local/cuda-7.5/lib64/libcudart.so
-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-7.5/bin/nvcc
-DCUDA_SDK_ROOT_DIR=/usr/local/cuda-7.5/
-DCUDA_TOOLKIT_INCLUDE=/usr/local/cuda-7.5/include
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-7.5/"
addons: {apt: {packages: []}}
- language: objective-c
os: osx
osx_image: xcode9.3
name: "Mac OS"
env: OPENCL=false
CUDA=false
CMAKE_FLAGS="
-DOPENMM_BUILD_OPENCL_TESTS=OFF"
addons: {apt: {packages: []}}
- sudo: false
dist: xenial
python: "3.6"
name: "Static Lib"
env: OPENCL=false
CUDA=false
CC=$CCACHE/clang
CXX=$CCACHE/clang++
CMAKE_FLAGS="-DOPENMM_BUILD_STATIC_LIB=ON"
- sudo: false
dist: xenial
python: "3.6"
name: "Python 3.6"
env: OPENCL=false
CUDA=false
CC=$CCACHE/clang
CXX=$CCACHE/clang++
DOCS_DEPLOY=true
CMAKE_FLAGS="-DOPENMM_GENERATE_API_DOCS=ON"
- sudo: false
dist: xenial
python: "3.8"
name: "Python 3.8"
env: OPENCL=false
CUDA=false
CC=$CCACHE/gcc
CXX=$CCACHE/g++
CMAKE_FLAGS=""
- sudo: required
dist: bionic
python: "3.8"
name: "PPC"
arch: ppc64le
env: OPENCL=false
CUDA=false
CMAKE_FLAGS=""
- sudo: required
dist: bionic
python: "3.8"
name: "ARM"
arch: arm64
env: OPENCL=false
CUDA=false
CMAKE_FLAGS=""
before_install:
- START_TIME=$(date +%s)
- wget http://anaconda.org/omnia/ccache/3.2.4/download/${TRAVIS_OS_NAME}-64/ccache-3.2.4-0.tar.bz2
- mkdir -p $HOME/ccache && tar xf ccache-3.2.4-0.tar.bz2 -C $HOME/ccache
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew cask uninstall oclint;
brew install fftw;
brew upgrade python;
brew install -y https://raw.githubusercontent.com/Homebrew/homebrew-core/5b680fb58fedfb00cd07a7f69f5a621bb9240f3b/Formula/doxygen.rb;
pip3 install virtualenv;
virtualenv -p python3 ~/venv;
source ~/venv/bin/activate;
sudo pip install -U pytest numpy --ignore-installed six;
fi
# The cmake version installed by apt on ARM and PPC is very old,
# so download a newer version.
- if [[ "${TRAVIS_CPU_ARCH}" == "ppc64le" ]]; then
sudo apt-get install libuv1 rhash libstdc++6;
wget https://anaconda.org/conda-forge/cmake/3.17.0/download/linux-ppc64le/cmake-3.17.0-hfb1cb51_0.tar.bz2;
mkdir $HOME/cmake;
tar -xjvf cmake-3.17.0-hfb1cb51_0.tar.bz2 -C $HOME/cmake;
export PATH=$HOME/cmake/bin:$PATH;
fi
- if [[ "${TRAVIS_CPU_ARCH}" == "arm64" ]]; then
sudo apt-get install libuv1 rhash libstdc++6;
wget https://anaconda.org/conda-forge/cmake/3.17.0/download/linux-aarch64/cmake-3.17.0-h28c56e5_0.tar.bz2;
mkdir $HOME/cmake;
tar -xjvf cmake-3.17.0-h28c56e5_0.tar.bz2 -C $HOME/cmake;
export PATH=$HOME/cmake/bin:$PATH;
fi
- if [[ "$OPENCL" == "true" ]]; then
wget http://s3.amazonaws.com/omnia-ci/AMD-APP-SDKInstaller-v3.0.130.135-GA-linux64.tar.bz2;
tar -xjf AMD-APP-SDK*.tar.bz2;
AMDAPPSDK=${HOME}/AMDAPPSDK;
export OPENCL_VENDOR_PATH=${AMDAPPSDK}/etc/OpenCL/vendors;
mkdir -p ${OPENCL_VENDOR_PATH};
sh AMD-APP-SDK*.sh --tar -xf -C ${AMDAPPSDK};
echo libamdocl64.so > ${OPENCL_VENDOR_PATH}/amdocl64.icd;
export LD_LIBRARY_PATH=${AMDAPPSDK}/lib/x86_64:${LD_LIBRARY_PATH};
chmod +x ${AMDAPPSDK}/bin/x86_64/clinfo;
${AMDAPPSDK}/bin/x86_64/clinfo;
sudo apt-get install -y libgl1-mesa-dev;
fi
# Install packages needed for Python: SWIG, Cython, and Gromacs (used by some tests).
# We do this differently on different platforms. Possibly some of this could be unified.
- if [[ "$OPENCL" == "false" && "$CUDA" == "false" && "$TRAVIS_OS_NAME" == "linux" && "${TRAVIS_CPU_ARCH}" != "ppc64le" && "${TRAVIS_CPU_ARCH}" != "arm64" ]]; then
wget http://anaconda.org/omnia/swig/3.0.7/download/linux-64/swig-3.0.7-0.tar.bz2;
mkdir $HOME/swig;
tar -xjvf swig-3.0.7-0.tar.bz2 -C $HOME/swig;
export PATH=$HOME/swig/bin:$PATH;
export SWIG_LIB=$HOME/swig/share/swig/3.0.7;
pip install cython;
sudo apt-get install gromacs;
fi
- if [[ "${TRAVIS_CPU_ARCH}" == "ppc64le" || "${TRAVIS_CPU_ARCH}" == "arm64" ]]; then
sudo apt-get install swig;
pip install cython;
fi
- if [[ "$OPENCL" == "false" && "$CUDA" == "false" && "$TRAVIS_OS_NAME" == "osx" ]]; then
wget http://anaconda.org/omnia/swig/3.0.7/download/osx-64/swig-3.0.7-0.tar.bz2;
mkdir $HOME/swig;
tar -xjvf swig-3.0.7-0.tar.bz2 -C $HOME/swig;
export PATH=$HOME/swig/bin:$PATH;
export SWIG_LIB=$HOME/swig/share/swig/3.0.7;
sudo pip install cython;
fi
- if [[ "$CUDA" == "true" ]]; then
wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_${CUDA_VERSION}_amd64.deb";
sudo dpkg -i cuda-repo-ubuntu1404_${CUDA_VERSION}_amd64.deb;
sudo apt-get update -qq;
export CUDA_APT=${CUDA_VERSION%-*};
export CUDA_APT=${CUDA_APT/./-};
sudo apt-get install -y cuda-drivers cuda-core-${CUDA_APT} cuda-cudart-dev-${CUDA_APT} cuda-cufft-dev-${CUDA_APT};
sudo apt-get clean;
export CUDA_HOME=/usr/local/cuda-${CUDA_VERSION%%-*};
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH};
export PATH=${CUDA_HOME}/bin:${PATH};
sudo apt-get install -y libgl1-mesa-dev;
fi
script:
- cmake . $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX=$HOME/OpenMM
- make -j2 install
- if [[ "$OPENCL" == "true" ]]; then ./TestOpenCLDeviceQuery; fi
- if [[ "$OPENCL" == "false" && "$CUDA" == "false" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
sudo make PythonInstall;
else
make PythonInstall;
fi;
python -m openmm.testInstallation;
(cd python/tests && py.test -v);
fi
# Run the tests, and rerun any failing tests.
- python devtools/run-ctest.py --start-time $START_TIME
- if [[ ! -z "${DOCS_DEPLOY}" && "${DOCS_DEPLOY}" = "true" ]]; then
pip install sphinx==2.3.1 sphinxcontrib-bibtex sphinxcontrib-lunrsearch sphinxcontrib-autodoc_doxygen;
make sphinxhtml;
make sphinxpdf;
make C++ApiDocs PythonApiDocs;
mkdir -p api-docs;
mv sphinx-docs/userguide/html api-docs/userguide;
mv sphinx-docs/developerguide/html api-docs/developerguide;
mv api-python api-docs;
mv api-c++ api-docs;
fi
deploy:
- provider: s3
access_key_id:
secure: "OEY0sp5FlM4kixFNVAktN6YHwKm5ieMswWCHj3MU+rWsAeGCULl/0kyKTfwCPknVlQv+SXBaPP3I4m1fv9FwHt0bbwy5EfmO4crrW8cE4ofq4vnwHi9UG77oEKKRrbxFUZD1y7ywI2W9SyVI6qfggZlJowRy9GV9Lin5vGzhqsw="
secret_access_key:
secure: "P7DOYn77bH5Gg1obIwCxanhH0Kgh22Pv1pCGvmI6gHXOE1dxf5pnCSQGFKO6g1K6eaN5TbTjh+BmMXmxgkqByvQ4uZtkTGlPq3HI9YeRjZE2H7bRpIYjXXRwA1RMOA3ofLDw1FXNmwMo8BtRIl4jljR5Iw5rytUZmLlk3zgtcr4="
bucket: "docs.openmm.org"
skip_cleanup: true
region: us-west-1
local_dir: api-docs/
upload_dir: development
on:
branch: master
condition: '! -z "${DOCS_DEPLOY}" && "${DOCS_DEPLOY}" = "true"'
cache:
directories:
- $HOME/.ccache