forked from equinor/resdata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
134 lines (124 loc) · 4.16 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
134
env:
global:
- TEST_DEPENDS=pytest
# amd64 fo' lyfe
- PLAT=x86_64
# Tell multibuild to use manylinux2010 docker image (mostly due to cmake's
# pypi package not having a manylinux1 wheel)
- MB_ML_VER=2010
# Show output from util_abort backtraces
- ERT_SHOW_BACKTRACE=1
# Install via pip
- LEGACY_INSTALL=
# Put wheels where travis expects them to be
- WHEEL_SDIR=dist
language: python
python: 3.6
services: docker
sudo: required
dist: xenial
matrix:
fast_finish: true
include:
# Use multibuild to install via pip + deploy wheels
- os: linux
name: pip, Linux, py2.7
env: MB_PYTHON_VERSION=2.7
- os: linux
name: pip, Linux, py3.6
env: MB_PYTHON_VERSION=3.6
- os: linux
name: pip, Linux, py3.7
env: MB_PYTHON_VERSION=3.7
- os: linux
name: pip, Linux, py3.8
env: MB_PYTHON_VERSION=3.8
- os: osx
name: pip, macOS, py3.6
language: generic
env: MB_PYTHON_VERSION=3.6
- os: osx
name: pip, macOS, py3.7
language: generic
env: MB_PYTHON_VERSION=3.7
- os: osx
name: pip, macOS, py3.8
language: generic
env: MB_PYTHON_VERSION=3.8
# Use CMake to setup and install libecl
- os: linux
name: cmake, Linux, py2.7
python: 2.7
env:
- MB_PYTHON_VERSION=2.7
- LEGACY_INSTALL=1
- os: linux
name: cmake, Linux, py3.6
python: 3.6
env:
- MB_PYTHON_VERSION=3.6
- LEGACY_INSTALL=1
- os: osx
name: cmake, macOS, py3.6
language: generic
env:
- MB_PYTHON_VERSION=3.6
- LEGACY_INSTALL=1
before_install:
# Test the C stuff before we do anything in pip mode
- |
if [ -z "${LEGACY_INSTALL}" ]; then
mkdir build && pushd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
cmake --build .
ctest --output-on-failure
popd && rm -rf build
fi
- git clone https://github.com/matthew-brett/multibuild
- source multibuild/common_utils.sh
- source multibuild/travis_steps.sh
- before_install
install:
- |
if [ -z "${LEGACY_INSTALL}" ]; then
build_wheel . $PLAT
else
pip install -r requirements.txt
mkdir build
pushd build
cmake .. -DBUILD_TESTS=ON \
-DENABLE_PYTHON=ON \
-DBUILD_APPLICATIONS=ON \
-DINSTALL_ERT_LEGACY=ON \
-DERT_USE_OPENMP=ON \
-DCMAKE_C_FLAGS='-Werror=all' \
-DCMAKE_CXX_FLAGS='-Werror -Wno-unused-result'
make
sudo make install
popd
fi
script:
- |
if [ -z "${LEGACY_INSTALL}" ]; then
install_run $PLAT
else
export PYTHONPATH="/usr/local/lib/python$MB_PYTHON_VERSION/site-packages:/usr/local/lib/python$MB_PYTHON_VERSION/dist-packages:$PYTHONPATH"
python -c "import sys; print('\n'.join(sys.path))"
set -e; python -c "import ecl"; set +e
pushd build; ctest --output-on-failure; popd
fi
before_deploy:
# "python setup.py sdist" is called automatically by the deploy step, so
# replace it with an empty file so we don't ruin our hard work
- rm setup.py
- touch setup.py
deploy:
- provider: pypi
skip_upload_docs: true
skip_cleanup: true
user: statoil-travis
password:
secure: "I31EvX2MenZgZukruzuJmvx0hOmMSWghxkYdtmyV4r8LoEmtviEA1IhctBuiWpVcLjOC0LxsrFESLC+PPhsTokCdIFs1R1JTr3WkotT1HZR6nYr7QZI/Pj9I6fV9oE8hYKS3oiC5DJDTZ/2/Tua5Lt9rjEapgRHTrRIuMqsD+7qRcZWNvQqwV3OWxZ8ua6Fll+yVx6ZLgJMutIyn0Av7ToratjQaYbHnrNbCpDYH/LiDOVJtralMMrHuNZpb6BzATRGP+crL4gDyJVai1tDEO8zshX9zU9ynimpebMtR86Ig0RHuF240eq0UqSMa8aOyk3PKUaxzWBn9nyyi4mOOLC6d7Dm4/8Ek4ilNZ1YqGbMiXnv78e6c5DSEwqceeE11x+kapnuSMgHlzdvA+n7HJXC4ANVIG1jdfMsvkpPDxKeYyw7Pytg9jbBWZvXs32srTjOSi+xIiKQFvh4bUehAbyfpzDd6cD7iC3cU80E8g2HmTtp1ZT59un9entJhw9vfpHrxiHtNUVRUyIJJyTUUYTmNkYsDU00NvbLv6n9mHZxDns+0Pv3pSPI22DNYzrmH5w/xxCcnc8Qlg82+AexEPl7RagETADa3wfK+UOcZ114B8g/Cms99yIk0dHGNl5MtoTceaWLD6EU/ey3KVw9iK9nrxdtTTg9PyvSO+0pm9GU="
on:
tags: true
condition: !!str [ -z "$LEGACY_INSTALL" ]