1
1
language : cpp
2
2
dist : trusty
3
- sudo : false
4
3
matrix :
5
4
include :
6
5
# This config does a few things:
@@ -17,8 +16,8 @@ matrix:
17
16
- pyenv global $(pyenv whence 2to3) # activate all python versions
18
17
- PY_CMD=python3
19
18
- $PY_CMD -m pip install --user --upgrade pip wheel setuptools
20
- install :
21
- - $PY_CMD -m pip install --user --upgrade sphinx sphinx_rtd_theme breathe flake8 pep8-naming pytest
19
+ install : # Breathe does not yet support Sphinx 2
20
+ - $PY_CMD -m pip install --user --upgrade " sphinx<2" sphinx_rtd_theme breathe flake8 pep8-naming pytest
22
21
- curl -fsSL https://sourceforge.net/projects/doxygen/files/rel-1.8.15/doxygen-1.8.15.linux.bin.tar.gz/download | tar xz
23
22
- export PATH="$PWD/doxygen-1.8.15/bin:$PATH"
24
23
script :
@@ -33,7 +32,7 @@ matrix:
33
32
diff -rq $installed ./include/pybind11
34
33
- |
35
34
# Barebones build
36
- cmake -DCMAKE_BUILD_TYPE=Debug -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DPYTHON_EXECUTABLE=$(which $PY_CMD)
35
+ cmake -DCMAKE_BUILD_TYPE=Debug -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DPYTHON_EXECUTABLE=$(which $PY_CMD) .
37
36
make pytest -j 2
38
37
make cpptest -j 2
39
38
# The following are regular test configurations, including optional dependencies.
@@ -49,21 +48,34 @@ matrix:
49
48
apt :
50
49
sources : [deadsnakes]
51
50
packages : [python3.6-dev python3.6-venv, cmake=2.\*, cmake-data=2.\*]
52
- - sudo : true
53
- services : docker
51
+ - services : docker
54
52
env : PYTHON=2.7 CPP=14 GCC=6 CMAKE=1
55
- - sudo : true
56
- services : docker
53
+ - services : docker
57
54
env : PYTHON=3.5 CPP=14 GCC=6 DEBUG=1
58
- - sudo : true
59
- services : docker
60
- env : PYTHON=3.6 CPP=17 GCC=7
55
+ - env : PYTHON=3.6 CPP=17 GCC=7
56
+ addons :
57
+ apt :
58
+ sources :
59
+ - deadsnakes
60
+ - ubuntu-toolchain-r-test
61
+ packages :
62
+ - python3.6-dev
63
+ - python3.6-venv
64
+ - g++-7
61
65
- os : linux
62
- env : PYTHON=3.6 CPP=17 CLANG=5.0
66
+ env : PYTHON=3.6 CPP=17 CLANG=7
63
67
addons :
64
68
apt :
65
- sources : [deadsnakes, llvm-toolchain-trusty-5.0, ubuntu-toolchain-r-test]
66
- packages : [python3.6-dev python3.6-venv clang-5.0 llvm-5.0-dev, lld-5.0]
69
+ sources :
70
+ - deadsnakes
71
+ - llvm-toolchain-trusty-7
72
+ packages :
73
+ - python3.6-dev
74
+ - python3.6-venv
75
+ - clang-7
76
+ - llvm-7-dev
77
+ - lld-7
78
+ - libstdc++7
67
79
- os : osx
68
80
osx_image : xcode7.3
69
81
env : PYTHON=2.7 CPP=14 CLANG CMAKE=1
@@ -72,18 +84,17 @@ matrix:
72
84
env : PYTHON=3.7 CPP=14 CLANG DEBUG=1
73
85
# Test a PyPy 2.7 build
74
86
- os : linux
75
- env : PYPY=5.8 PYTHON=2.7 CPP=11 GCC=4.8
87
+ env : PYPY=7.1 PYTHON=2.7 CPP=11 GCC=4.8
76
88
addons :
77
89
apt :
78
90
packages : [libblas-dev, liblapack-dev, gfortran]
79
91
# Build in 32-bit mode and tests against the CMake-installed version
80
- - sudo : true
81
- services : docker
92
+ - services : docker
82
93
env : ARCH=i386 PYTHON=3.5 CPP=14 GCC=6 INSTALL=1
83
94
script :
84
95
- |
85
96
$SCRIPT_RUN_PREFIX sh -c "set -e
86
- cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0
97
+ cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 .
87
98
make install
88
99
cp -a tests /pybind11-tests
89
100
mkdir /build-tests && cd /build-tests
@@ -131,9 +142,9 @@ before_install:
131
142
SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
132
143
$SCRIPT_RUN_PREFIX sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done'
133
144
else
134
- if [ "$PYPY" = "5.8 " ]; then
135
- curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.8 .0-linux64.tar.bz2 | tar xj
136
- PY_CMD=$(echo `pwd`/pypy2-v5.8 .0-linux64/bin/pypy)
145
+ if [ "$PYPY" = "7.1 " ]; then
146
+ curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1 .0-linux64.tar.bz2 | tar xj
147
+ PY_CMD=$(echo `pwd`/pypy2.7-v7.1 .0-linux64/bin/pypy)
137
148
CMAKE_EXTRA_ARGS+=" -DPYTHON_EXECUTABLE:FILEPATH=$PY_CMD"
138
149
else
139
150
PY_CMD=python$PYTHON
@@ -148,12 +159,14 @@ before_install:
148
159
if [ "$PY" = 3 ] || [ -n "$PYPY" ]; then
149
160
$PY_CMD -m ensurepip --user
150
161
fi
162
+ $PY_CMD --version
151
163
$PY_CMD -m pip install --user --upgrade pip wheel
152
164
fi
153
165
set +e
154
166
install :
155
167
- |
156
168
# Install dependencies
169
+ cmake --version
157
170
set -e
158
171
if [ -n "$DOCKER" ]; then
159
172
if [ -n "$DEBUG" ]; then
@@ -166,26 +179,8 @@ install:
166
179
libeigen3-dev libboost-dev cmake make ${EXTRA_PACKAGES} && break; done"
167
180
else
168
181
169
- if [ "$CLANG" = "5.0" ]; then
170
- if ! [ -d ~/.local/include/c++/v1 ]; then
171
- # Neither debian nor llvm provide a libc++ 5.0 deb; luckily it's fairly quick
172
- # to build, install (and cache), so do it ourselves:
173
- git clone --depth=1 https://github.com/llvm-mirror/llvm.git llvm-source
174
- git clone https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx -b release_50
175
- git clone https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi -b release_50
176
- mkdir llvm-build && cd llvm-build
177
- # Building llvm requires a newer cmake than is provided by the trusty container:
178
- CMAKE_VER=cmake-3.8.0-Linux-x86_64
179
- curl https://cmake.org/files/v3.8/$CMAKE_VER.tar.gz | tar xz
180
- ./$CMAKE_VER/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local ../llvm-source
181
- make -j2 install-cxxabi install-cxx
182
- cp -a include/c++/v1/*cxxabi*.h ~/.local/include/c++/v1
183
- cd ..
184
- fi
185
- export CXXFLAGS="-isystem $HOME/.local/include/c++/v1 -stdlib=libc++"
186
- export LDFLAGS="-L$HOME/.local/lib -fuse-ld=lld-$CLANG"
187
- export LD_LIBRARY_PATH="$HOME/.local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
188
- if [ "$CPP" = "-std=c++17" ]; then CPP="-std=c++1z"; fi
182
+ if [ "$CLANG" = "7" ]; then
183
+ export CXXFLAGS="-stdlib=libc++"
189
184
fi
190
185
191
186
export NPY_NUM_BUILD_JOBS=2
@@ -206,6 +201,7 @@ script:
206
201
-DPYBIND11_CPP_STANDARD=$CPP
207
202
-DPYBIND11_WERROR=${WERROR:-ON}
208
203
-DDOWNLOAD_CATCH=${DOWNLOAD_CATCH:-ON}
204
+ .
209
205
- $SCRIPT_RUN_PREFIX make pytest -j 2
210
206
- $SCRIPT_RUN_PREFIX make cpptest -j 2
211
207
- if [ -n "$CMAKE" ]; then $SCRIPT_RUN_PREFIX make test_cmake_build; fi
0 commit comments