forked from equinor/libres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (100 loc) · 2.67 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
language: python
dist: xenial
python:
- 2.7
- 3.6
os:
- linux
sudo: required
services: docker
env:
global:
- ERT_SHOW_BACKTRACE=1
- MB_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION
- INSTALL_DIR="${TRAVIS_BUILD_DIR}/venv"
- LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${INSTALL_DIR}/lib64:${LD_LIBRARY_PATH}"
matrix:
- TEST_SUITE=""
matrix:
fast_finish: true
include:
- os: osx
language: generic
python: 2.7
env:
- MB_PYTHON_VERSION=2.7
- INSTALL_DIR="${TRAVIS_BUILD_DIR}/venv"
- DYLD_LIBRARY_PATH=${INSTALL_DIR}/lib:${INSTALL_DIR}/lib64:${DYLD_LIBRARY_PATH}"
- TEST_SUITE=""
- os: osx
language: generic
python: 3.6
env:
- MB_PYTHON_VERSION=3.6
- INSTALL_DIR="${TRAVIS_BUILD_DIR}/venv"
- DYLD_LIBRARY_PATH=${INSTALL_DIR}/lib:${INSTALL_DIR}/lib64:${DYLD_LIBRARY_PATH}"
- TEST_SUITE=""
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- george-edison55-precise-backports
- sourceline: 'ppa:opm/ppa'
packages:
- libopm-simulators
- liblapack-dev
- valgrind
before_install:
- git clone https://github.com/matthew-brett/multibuild.git
- unset -f pushd
- unset -f popd
- source multibuild/common_utils.sh
- source multibuild/travis_steps.sh
- before_install
install:
- pip install -r requirements.txt
before_script:
# For now we have to make install libecl.
# Remove when it's possible to pip install
- source .libecl_version
- git clone https://github.com/equinor/libecl
- pushd libecl
- git fetch
- git checkout tags/$LIBECL_VERSION
- pip install -r requirements.txt
- mkdir build
- pushd build
- cmake .. -DENABLE_PYTHON=ON
-DBUILD_APPLICATIONS=ON
-DINSTALL_CWRAP=OFF
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
-DCMAKE_PREFIX_PATH=$INSTALL_DIR
-DCMAKE_C_FLAGS='-Werror=all'
-DCMAKE_CXX_FLAGS='-Werror -Wno-unused-result'
- make
- make install
- popd;popd
script:
- export PYTHONPATH="$INSTALL_DIR/lib/python$MB_PYTHON_VERSION/dist-packages:$PYTHONPATH"
- python -c "import sys; print('\n'.join(sys.path))"
- mkdir build
- pushd build
- ulimit -n 2048
- cmake .. -DBUILD_TESTS=ON
-DENABLE_PYTHON=ON
-DBUILD_APPLICATIONS=ON
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR
-DCMAKE_PREFIX_PATH=$INSTALL_DIR
-DCMAKE_C_FLAGS='-Werror=all'
-DCMAKE_CXX_FLAGS='-Wno-unused-result'
- make
- make install
- set -e; python -c "import res"; set +e
- ctest --output-on-failure $TEST_SUITE
- pip install pytest
- pip install pylint
- pip install mock
- pip install decorator
- popd
- pushd python
- pytest