forked from equinor/segyio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
126 lines (117 loc) · 3.29 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
language: python
python:
- 3.6
env:
global:
- UNICODE_WIDTH=32
- PLAT=x86_64
- MB_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION
- VERSION=$(echo $TRAVIS_TAG | sed s/v//)
os:
- linux
dist: xenial
services: docker
sudo: required
matrix:
fast_finish: true
include:
- python: 3.7
sudo: true
- python: 3.8
sudo: true
env: MB_ML_VER=2010
- python: 3.9
sudo: true
env: MB_ML_VER=2010
- python: 3.9
dist: xenial
sudo: true
env: MB_ML_VER=2010
- compiler: clang
python: 3.7
env:
- SCAN="scan-build --status-bugs"
- SOURCEDEPLOY=1
- MKDOC="-DBUILD_DOC=ON -DSPHINX_ARGS=-WT"
- os: osx
language: generic
env: MB_PYTHON_VERSION=3.6
python: 3.6
- os: osx
language: generic
env: MB_PYTHON_VERSION=3.7
python: 3.7
- os: osx
language: generic
env: MB_PYTHON_VERSION=3.8
python: 3.8
- os: osx
language: generic
env: MB_PYTHON_VERSION=3.9
python: 3.9
addons:
apt:
sources:
- sourceline: 'ppa:jokva/backports'
- george-edison55-precise-backports # cmake 3
packages:
- cppcheck
- cmake
- cmake-data
before_install:
- git clone https://github.com/matthew-brett/multibuild
- unset -f pushd
- unset -f popd
- source multibuild/common_utils.sh
- source multibuild/travis_steps.sh
- before_install
install:
- pip install -r requirements.txt
- pip install -r requirements-doc.txt
- pip install setuptools setuptools-scm scikit-build
- pip install bandit pytest pytest-runner
before_script:
- enabled="-DBUILD_PYTHON=OFF -DBUILD_MEX=OFF"
- if [[ -n "${MB_PYTHON_VERSION+1}" ]]; then
enabled="$enabled -DBUILD_PYTHON=ON -DREQUIRE_PYTHON=ON";
fi
- bandit -c bandit.yml -r python
- cmake --version
- mkdir build
- pushd build
- $SCAN cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DBUILD_SHARED_LIBS=ON
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_NAME_DIR=/usr/local/lib
$MKDOC
$enabled ..
- if command -v cppcheck; then
cppcheck
--enable=style,portability,performance,warning
--library=posix
--library=$TRAVIS_BUILD_DIR/cppcheck/segyio.cfg
--suppressions-list=$TRAVIS_BUILD_DIR/cppcheck/suppressions.txt
--inline-suppr
--project=compile_commands.json
--error-exitcode=1
;
fi
- popd
# distutils/setuptools on macos ignores the --rpath argument, so set
# DYLD_LIBRARY_PATH so that the freshly-built image is picked up on for the
# tests.
#
# segyio is configured with CMAKE_INSTALL_NAME_DIR so that the wheel build on
# OS X so the delocate tool can figure out what dylib to include.
script:
- pushd build
- export DYLD_LIBRARY_PATH=$PWD/lib
- $SCAN make && ctest --output-on-failure
- sudo make install
- popd
# install works, so remove the _skbuild because it having root permissions
# from make install breaks build_wheel
- sudo rm -rf python/_skbuild
- build_wheel python $PLAT
- install_run $PLAT
- mv wheelhouse python/dist