forked from kiliakis/BLonD-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (88 loc) · 3.23 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
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"
- "3.8"
- "3.9"
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 && -f $HOME/install/lib/libfftw3f.so ]]; then
echo "FFTW3 already installed.";
else
echo "Installing FFTW3.";
wget http://www.fftw.org/fftw-3.3.8.tar.gz > /dev/null;
tar -xzvf fftw-3.3.8.tar.gz > /dev/null;
cd fftw-3.3.8;
./configure --prefix=$HOME/install/ --enable-openmp --enable-single --enable-avx --enable-avx2 --enable-fma --with-our-malloc --disable-fortran --enable-shared > /dev/null;
make -j4 > /dev/null;
make install > /dev/null;
./configure --prefix=$HOME/install/ --enable-openmp --enable-avx --enable-avx2 --enable-fma --with-our-malloc --disable-fortran --enable-shared > /dev/null;
make -j4 > /dev/null;
make install > /dev/null;
fi
- ls $HOME/install/lib
- ls $HOME/install/include
- 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:
# - echo "Running tests"
- coverage run -m pytest -v -k 'not test_validate' -W ignore::DeprecationWarning unittests/ && coverage run --append -m pytest -v -k 'test_validate' -W ignore::DeprecationWarning
after_success:
# echo "Success"
- coverage report
- if [[ $TRAVIS_PYTHON_VERSION != "3.6" ]]; then exit 0; fi;
- if ! [[ "$TRAVIS_PULL_REQUEST" = ^[0-9]+$ ]]; then exit 0 ; fi ;
- if [[ "$TRAVIS_BRANCH" != "master" ]]; then exit 0 ; fi ;
- python -m pip install --upgrade pyqt5 sphinx sphinxcontrib-napoleon sphinx-autopackagesummary
- git config --global user.name travis-ci
- git config --global user.email travis@example.org
- cd __doc
- make html
- git clone --branch=gh-pages https://github.com/${TRAVIS_REPO_SLUG}.git BLonD
- cd BLonD
- git remote rm origin
- git remote add origin https://blond-admin:${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git && git remote -v && cp -r ../_build/html/* . && git add -A && git status && git commit -m "Updated documentation" -n && git push origin gh-pages
- cd $TRAVIS_BUILD_DIR
- coveralls
# branches:
# only:
# - master