forked from blond-org/blond_common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (89 loc) · 2.94 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
cache:
directories:
- $HOME/.cache/pip
- $HOME/install
# - $HOME/download # 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:
- build-essential
# packages:
# - gcc-4.8
# - g++-4.8
# before_install:
# - export CC=/usr/bin/gcc-4.8
# - export CXX=/usr/bin/g++-4.8
before_install:
- echo $TRAVIS_PYTHON_VERSION
- python --version
- gcc --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 coveralls pytest coverage # cpp-coveralls
- pip install -r requirements.txt
before_script:
# - python setup.py compile install
# - export PYTHONPATH=../:$PYTHONPATH
script:
- coverage run -m pytest -v __TESTS/unittests/*/test*.py __TESTS/unittests/*/*/test*.py
after_success:
- coverage report
- test $TRAVIS_PYTHON_VERSION = "3.6" && coveralls
- test $TRAVIS_PYTHON_VERSION != "3.6" && exit 0
- test $TRAVIS_PULL_REQUEST != "false" && exit 0
- python -m pip install --upgrade sphinx sphinxcontrib-napoleon sphinx-autopackagesummary
- mkdir -p ~/.ssh
# Needs ssh key generated using "ssh-keygen -f key_fname -t rsa"
# Env variable is private key encoded using "cat privatekey | base64 -w0" to avoid str manipulations
- (echo "$GITHUB_TOKEN_DOCS" | base64 -d) > ~/.ssh/id_rsa
- chmod 700 ~/.ssh/id_rsa
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/id_rsa
- ssh-keyscan -t rsa 'github.com' >> ~/.ssh/known_hosts
- git config --global user.name ${USER_LOGIN}
- git config --global user.email ${USER_EMAIL}
- cd __doc
- make html
- git clone [email protected]:${USER_LOGIN}/blond_common.git blond_common
- cd blond_common
- git checkout gh-pages
- rm -r *
- cp -r ../build/html/* .
- git add -A
- git status
- git diff-index --quiet HEAD || git commit -m "Updated documentation"
- git push
# branches:
# only:
# - master