forked from aleaxit/gmpy
/
.travis.yml
83 lines (74 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
72
73
74
75
76
77
78
79
80
81
82
83
sudo: required
language: generic
cache:
directories:
- $HOME/.ccache
notifications:
slack:
on_success: never
on_failure : never
matrix:
include:
- os: linux
dist: xenial
language: python
python: 2.7
- os: linux
dist: xenial
language: python
python: 3.5
- os: linux
dist: xenial
language: python
python: 3.6
- os: osx
env: PYTHON_VERSION=2.7
osx_image: xcode6.4
- os: osx
env: PYTHON_VERSION=3.5
osx_image: xcode6.4
- os: osx
env: PYTHON_VERSION=3.6
osx_image: xcode6.4
install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
echo ""
echo "Installing a fresh version of Miniconda."
MINICONDA_URL="https://repo.continuum.io/miniconda"
MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh"
curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}"
bash $MINICONDA_FILE -b
# Configure conda.
echo ""
echo "Configuring conda."
source $HOME/miniconda3/bin/activate root
conda config --add channels conda-forge
conda config --set show_channel_urls true
conda config --set always_yes yes --set changeps1 no
echo ""
echo "Creating conda environment"
conda create -n test python=${PYTHON_VERSION} gmp mpfr mpc
source activate test
echo ""
echo "Installing latex"
port install texlive texlive-latex-extra
python setup.py sdist
pip install --global-option=build_ext --global-option="-L$CONDA_PREFIX/lib" --global-option="-I$CONDA_PREFIX/include" dist/gmpy2-*.tar.gz
else # Linux
export PATH="/usr/lib/ccache:$PATH"
ccache -M 256M && ccache -s
sudo apt-get install libgmp-dev libmpfr-dev libmpfi-dev libmpc-dev texlive texlive-latex-extra latexmk
pip install Cython --verbose --disable-pip-version-check
python setup.py sdist
pip install dist/gmpy2-*.tar.gz
fi
pip install sphinx
script:
- python test/runtests.py
- python test_cython/runtests.py
- cd docs/
- make html
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
make latexpdf;
fi