forked from solvcon/solvcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
133 lines (122 loc) · 4.78 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
language: cpp
dist: trusty
cache:
directory:
- $HOME/miniconda
notifications:
slack:
rooms:
secure: bW29JOqmFy0GnsX5epQDSA6vf4urxXTjxx+a7saHLKel3+VjBZvAUNRXC9tKNp6SkmIReuRAccCKe5XjWnadSxn6/mmUxWS/w+D95flTs8AFjycglr8rNLf8CQsjtg3IrcxuSoh9BJNbf7Ae/bqJ0LZSf8hdsQnSKHd7BxFuld8Pevtf2mwte97hVeO5xyCZH/dGvhTUzl8Ygzn+cZBNGwkh6rUwn2H2eIN9azoVzHVlvvPWg7IZC1L48CkijXqWgm1mhxQMRDyPw7UjABuORTCF3py7gUrib9AP67uSyU1oxIovehMtQ8WhbE7WXqX3RASm/NgP9dbXPo8nF5qe2vNzCVD1Y2y0EGVnvq38cLVIGS97NCm/Njnlb7nGqpWPhx1i0VnlxqD0uqmOxcolqnVQuw41+a+ZsH0OwCWg6xRJhSSdZxAZm8z88U1LhpJX5tfOlbV47ZoBA+0Gf+F3FFzu/k6TO8vdaeDrdBuzlaMrHZdVe42Wd0JGnvUToEzCRklvjMuPNGfsPrtAFfYzPhaZ53VGGW4nS1/x5bjTCN6BvFrSErFkUCrmfvee9+ltMovbw/b/wchnnyPX0X1qfseaDZIQ6860A7D6Tcv6DnrnflfbLLhZkfuGGkRhKAmASdB8gGBpgNJVoeAXbdJVJCJCSPCxMN1B15dZdHNvzfc=
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
webhooks:
urls:
- https://webhooks.gitter.im/e/b446fff58c8ee17b216d
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
env:
global:
# Disable GCE boto plugin which is incompatible to Python 3, see
# https://github.com/travis-ci/travis-ci/issues/5246
- BOTO_CONFIG=/tmp/nowhere
matrix:
include:
- os: linux
sudo: required
services: docker
env: RUNMODE=docker
- os: linux
sudo: required
compiler: gcc
env: RUNMODE=travis
addons:
# If using C++11/14 see http://genbattle.bitbucket.org/blog/2016/01/17/c++-travis-ci/
apt:
packages: [ openssh-client, openssh-server, liblapack-pic, liblapack-dev ]
- os: osx
#osx_image: xcode7.3
compiler: clang
env: RUNMODE=travis
before_install:
- |
if [[ "$RUNMODE" == "docker" ]] ; then
# Configure docker
DOCKER=solvcon/solvcon_build
docker pull $DOCKER
containerid=$(docker run --detach --tty \
--volume=${TRAVIS_BUILD_DIR}:${TRAVIS_BUILD_DIR} \
--workdir=${TRAVIS_BUILD_DIR} \
$DOCKER)
SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
else
# Configure ssh
ssh-keygen -t rsa -f ~/.ssh/id_rsa -N ""
chmod 700 ~/.ssh/
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
ssh-keyscan -t rsa localhost >> ~/.ssh/known_hosts
ssh-keyscan -t rsa 127.0.0.1 >> ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
ls -al ~/.ssh/
ssh localhost ls
ssh 127.0.0.1 ls
SCRIPT_RUN_PREFIX=
fi
install:
- |
if [[ "$RUNMODE" != "docker" ]] ; then
# Install minimal conda
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-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 conda
fi
- |
if [[ "$RUNMODE" != "docker" ]] ; then
# Install conda packages
${TRAVIS_BUILD_DIR}/contrib/devenv/create.sh
source ${TRAVIS_BUILD_DIR}/build/env/start
${TRAVIS_BUILD_DIR}/contrib/conda.sh
${TRAVIS_BUILD_DIR}/contrib/build-pybind11-in-conda.sh
# Debugging information
conda info -a
else
$SCRIPT_RUN_PREFIX id
$SCRIPT_RUN_PREFIX apt-get -qq update
$SCRIPT_RUN_PREFIX apt-get -qqy install fakeroot debhelper locales \
libreadline7 libssl1.0.0 libffi6 \
liblapack3 liblapack-dev libhdf5-100 libhdf5-dev libnetcdf13 \
libnetcdf-dev libscotch-6.0 libscotch-dev cython3 python3 \
python3-numpy libpython3.6-dev python3-boto python3-paramiko graphviz
fi
script:
# Debugging information
- |
$SCRIPT_RUN_PREFIX which python3
$SCRIPT_RUN_PREFIX python3 --version
$SCRIPT_RUN_PREFIX which $CXX
$SCRIPT_RUN_PREFIX $CXX --version
$SCRIPT_RUN_PREFIX which $CC
$SCRIPT_RUN_PREFIX $CC --version
- $SCRIPT_RUN_PREFIX make SC_PURE_PYTHON=1 test_from_package
- |
if [[ "$RUNMODE" == "docker" ]] ; then
$SCRIPT_RUN_PREFIX make deb
$SCRIPT_RUN_PREFIX dpkg -i dist/debbuild/*.deb
$SCRIPT_RUN_PREFIX bash -c "cd /tmp ; python3 -c 'import solvcon ; print(solvcon)'"
$SCRIPT_RUN_PREFIX bash -c "cd /tmp ; python3 -c 'import solvcon ; solvcon.test()'"
fi
after_script:
- |
if [[ "$RUNMODE" == "docker" ]] ; then
docker stop "$containerid"
docker rm "$containerid"
fi