-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
105 lines (91 loc) · 2.6 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
94
95
96
97
98
99
100
101
102
103
104
105
language: python
sudo: required
dist: xenial
python:
- 3.4
- 3.5
- 3.6
- 3.7
os: linux
env:
global:
- HYDRA_LAUNCHER=fork
- OMPI_MCA_rmaps_base_oversubscribe=yes
matrix:
- MPI=mpich
#- MPI=openmpi
matrix:
include:
- os: osx
osx_image: xcode11
env: MPI=mpich PY=3
language: generic
python: 3
# matrix:
# allow_failures:
# - env: MPI=openmpi
# addons:
# apt:
# packages:
# - gfortran
# - libblas-dev
# - liblapack-dev
cache:
pip: true
apt: true
# Setup Miniconda
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-4.6.14-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh -O miniconda.sh;
fi
- 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 -y conda
- conda info -a # For debugging any issues with conda
- conda config --add channels conda-forge
- conda create --yes --name condaenv python=$TRAVIS_PYTHON_VERSION
- source activate condaenv
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.13.sdk.tar.xz;
mkdir ../sdk; tar xf MacOSX10.13.sdk.tar.xz -C ../sdk;
COMPILERS=clang_osx-64;
MUMPS=mumps-mpi=5.1.2=haf446c3_1007;
else
COMPILERS=gcc_linux-64;
MUMPS=mumps-mpi=5.1.2=h5bebb2f_1007;
fi
- conda install $COMPILERS
#S- conda install nlopt petsc4py petsc mpi4py scipy $MPI
- conda install nlopt petsc4py petsc $MUMPS mpi4py scipy $MPI
# pip install these as the conda installs downgrade pytest on python3.4
- pip install flake8
- pip install pytest
- pip install pytest-cov
- pip install pytest-timeout
- pip install mock
- pip install coveralls
# For confirmation of MPI library being used.
- python conda/find_mpi.py # locate compilers
- mpiexec --version # Show MPI library details
- pip install -e .
before_script:
- flake8 libensemble
# Set conda compilers to use new SDK instead of Travis default.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
echo "export CONDA_BUILD_SYSROOT=/Users/travis/build/Libensemble/sdk/MacOSX10.13.sdk" > setenv.sh;
source setenv.sh;
fi
# Run test (-z show output)
script:
- libensemble/tests/run-tests.sh -z
# Coverage
after_success:
- mv libensemble/tests/.cov* .
- coveralls
after_failure:
- cat libensemble/tests/regression_tests/log.err