forked from blond-admin/BLonD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (66 loc) · 2.1 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
dist: xenial
cache:
directories:
- $HOME/.cache/pip
- $HOME/install
# - $HOME/downloads # Sufficient to add miniconda.sh to TRAVIS cache.
# - $HOME/miniconda # Add the installation to TRAVIS cache.
apt: true
pip: true
language: python
os:
- linux
arch:
- amd64
compiler:
- gcc
python:
- "3.6"
- "3.7"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# - gcc-4.8
# - g++-4.8
- mpich
- libmpich-dev
- build-essential
before_install:
- echo $TRAVIS_PYTHON_VERSION
- python --version
- gcc --version
- mpicc --version
- mpirun --version
- mkdir -p $HOME/install
- export LD_LIBRARY_PATH="$HOME/install/lib:$LD_LIBRARY_PATH"
- export PYTHONPATH=$TRAVIS_BUILD_DIR:$PYTHONPATH
# - export CC=/usr/bin/gcc-4.8
# - export CXX=/usr/bin/g++-4.8
install:
- if [[ -f $HOME/install/lib/libfftw3.so && -f $HOME/install/include/fftw3.h ]]; then
echo "FFTW3 already installed.";
else
echo "Installing FFTW3.";
wget http://www.fftw.org/fftw-3.3.8.tar.gz;
tar -xzvf fftw-3.3.8.tar.gz > /dev/null;
cd fftw-3.3.8;
./configure --prefix=$HOME/install/ --enable-openmp --enable-threads --enable-sse2 --enable-avx --enable-avx2 --enable-fma --enable-avx-128-fma --with-our-malloc --disable-fortran --enable-shared > /dev/null;
make -j4 > /dev/null;
make install > /dev/null;
fi
- cd $TRAVIS_BUILD_DIR
- python -m pip install --upgrade pip setuptools wheel coverage coveralls pytest # cpp-coveralls
- pip install -r requirements.txt
before_script:
- python blond/compile.py -p --with-fftw-threads --with-fftw-lib=$HOME/install/lib --with-fftw-header=$HOME/install/include --flags='--coverage'
- export OMP_NUM_THREADS=2
script:
- coverage run -m pytest -v --ignore=unittests/integration/test_validate_mpi.py unittests/ && coverage run --append -m pytest -v unittests/integration/test_validate_mpi.py
after_success:
- coverage report
- test $TRAVIS_PYTHON_VERSION = "3.6" && coveralls
# branches:
# only:
# - master