-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
93 lines (84 loc) · 2.43 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
os: linux
language: python
python:
- "3.6"
- "3.7"
- "3.8"
#matrix:
# include:
# - os: osx
# osx_image: xcode12.2
# language: generic
# env:
# - MATRIX_EVAL="brew install gcc@10 &&CC=gcc-10 && CXX=g++-10"
# - PYTHON=3.8
# - SO_COMPILER=gcc
#
# - os: osx
# osx_image: xcode12.2
# language: generic
# env:
# - MATRIX_EVAL="curl https://mac.r-project.org/openmp/openmp-11.0.1-darwin20-Release.tar.gz | tar -xz&& sudo cp usr/local/lib/* /usr/local/lib/ && sudo cp usr/local/include/* /usr/local/include/ &&CC=clang "
# - PYTHON=3.8
# - SO_COMPILER=clang
notifications:
email: false
addons:
apt:
packages:
- libfftw3-dev
- libatlas-dev
- libatlas-base-dev
- liblapack-dev
- libblas-dev
- gfortran
before_install:
- export URLROOT=https://repo.continuum.io/miniconda/;
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew upgrade;
brew install fftw;
export MCINST=Miniconda3-latest-MacOSX-x86_64.sh;
else
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
export MCINST=Miniconda2-latest-Linux-x86_64.sh;
else
export MCINST=Miniconda3-latest-Linux-x86_64.sh;
fi
fi;
export MCURL=$URLROOT$MCINST;
wget $MCURL -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
# - eval "${MATRIX_EVAL}"
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export PYTHON_VERSION=3.8;
else
export PYTHON_VERSION=$TRAVIS_PYTHON_VERSION;
fi;
conda create --yes -q -n test-env python=$PYTHON_VERSION
- source activate test-env
- pip install -r requirements.txt
- if [[ "$TRAVIS_OS_NAME" != "osx" && "$TRAVIS_PYTHON_VERSION" == "3.8" ]]; then
conda install -c conda-forge codecov;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$SO_COMPILER" == "gcc" ]]; then
CC=gcc-10 python setup.py build_ext --inplace;
else
CC=clang python setup.py build_ext --inplace;
fi;
else
python setup.py build_ext --inplace;
fi;
script:
- pytest
after_success:
- if [[ "$TRAVIS_OS_NAME" != "osx" && "$TRAVIS_PYTHON_VERSION" == "3.8" ]]; then
codecov;
fi