11language : cpp
2- dist : trusty
32matrix :
43 include :
54 # This config does a few things:
109 # also tests the automatic discovery functions in CMake (Python version, C++ standard).
1110 - os : linux
1211 dist : xenial # Necessary to run doxygen 1.8.15
12+ # TODO(eric.cousineau): These aren't actually used, they're only for naming. Use "name" field instead?
1313 env : STYLE DOCS PIP
1414 cache : false
1515 before_install :
@@ -38,44 +38,69 @@ matrix:
3838 # The following are regular test configurations, including optional dependencies.
3939 # With regard to each other they differ in Python version, C++ standard and compiler.
4040 - os : linux
41+ dist : trusty
4142 env : PYTHON=2.7 CPP=11 GCC=4.8
4243 addons :
4344 apt :
44- packages : [cmake=2.\*, cmake-data=2.\*]
45+ packages :
46+ - cmake=2.\*
47+ - cmake-data=2.\*
4548 - os : linux
49+ dist : trusty
4650 env : PYTHON=3.6 CPP=11 GCC=4.8
4751 addons :
4852 apt :
49- sources : [deadsnakes]
50- packages : [python3.6-dev python3.6-venv, cmake=2.\*, cmake-data=2.\*]
51- - services : docker
53+ sources :
54+ - deadsnakes
55+ packages :
56+ - python3.6-dev
57+ - python3.6-venv
58+ - cmake=2.\*
59+ - cmake-data=2.\*
60+ - os : linux
61+ dist : trusty
5262 env : PYTHON=2.7 CPP=14 GCC=6 CMAKE=1
53- - services : docker
54- env : PYTHON=3.5 CPP=14 GCC=6 DEBUG=1
55- - env : PYTHON=3.6 CPP=17 GCC=7
63+ addons :
64+ apt :
65+ sources :
66+ - ubuntu-toolchain-r-test
67+ packages :
68+ - g++-6
69+ - os : linux
70+ dist : trusty
71+ # N.B. `ensurepip` could be installed transitively by `python3.5-venv`, but
72+ # seems to have apt conflicts (at least for Trusty). Use Docker instead.
73+ services : docker
74+ env : DOCKER=debian:stretch PYTHON=3.5 CPP=14 GCC=6 DEBUG=1
75+ - os : linux
76+ dist : xenial
77+ env : PYTHON=3.6 CPP=17 GCC=7
5678 addons :
5779 apt :
5880 sources :
5981 - deadsnakes
6082 - ubuntu-toolchain-r-test
6183 packages :
84+ - g++-7
6285 - python3.6-dev
6386 - python3.6-venv
64- - g++-7
6587 - os : linux
88+ dist : xenial
6689 env : PYTHON=3.6 CPP=17 CLANG=7
6790 addons :
6891 apt :
6992 sources :
7093 - deadsnakes
71- - llvm-toolchain-trusty -7
94+ - llvm-toolchain-xenial -7
7295 packages :
7396 - python3.6-dev
7497 - python3.6-venv
7598 - clang-7
99+ - libclang-7-dev
76100 - llvm-7-dev
77101 - lld-7
78- - libstdc++7
102+ - libc++-7-dev
103+ - libc++abi-7-dev # Why is this necessary???
79104 - os : osx
80105 osx_image : xcode7.3
81106 env : PYTHON=2.7 CPP=14 CLANG CMAKE=1
@@ -84,22 +109,32 @@ matrix:
84109 env : PYTHON=3.7 CPP=14 CLANG DEBUG=1
85110 # Test a PyPy 2.7 build
86111 - os : linux
87- env : PYPY=7.1 PYTHON=2.7 CPP=11 GCC=4.8
112+ dist : trusty
113+ env : PYPY=5.8 PYTHON=2.7 CPP=11 GCC=4.8
88114 addons :
89115 apt :
90- packages : [libblas-dev, liblapack-dev, gfortran]
116+ packages :
117+ - libblas-dev
118+ - liblapack-dev
119+ - gfortran
91120 # Build in 32-bit mode and tests against the CMake-installed version
92- - services : docker
93- env : ARCH=i386 PYTHON=3.5 CPP=14 GCC=6 INSTALL=1
121+ - os : linux
122+ dist : trusty
123+ services : docker
124+ env : DOCKER=i386/debian:stretch PYTHON=3.5 CPP=14 GCC=6 INSTALL=1
94125 script :
95126 - |
96- $SCRIPT_RUN_PREFIX sh -c "set -e
97- cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 .
98- make install
99- cp -a tests /pybind11-tests
100- mkdir /build-tests && cd /build-tests
101- cmake ../pybind11-tests ${CMAKE_EXTRA_ARGS} -DPYBIND11_WERROR=ON
102- make pytest -j 2"
127+ # Consolidated 32-bit Docker Build + Install
128+ set -ex
129+ $SCRIPT_RUN_PREFIX sh -c "
130+ set -ex
131+ cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 .
132+ make install
133+ cp -a tests /pybind11-tests
134+ mkdir /build-tests && cd /build-tests
135+ cmake ../pybind11-tests ${CMAKE_EXTRA_ARGS} -DPYBIND11_WERROR=ON
136+ make pytest -j 2"
137+ set +ex
103138cache :
104139 directories :
105140 - $HOME/.local/bin
@@ -109,6 +144,7 @@ cache:
109144before_install :
110145- |
111146 # Configure build variables
147+ set -ex
112148 if [ "$TRAVIS_OS_NAME" = "linux" ]; then
113149 if [ -n "$CLANG" ]; then
114150 export CXX=clang++-$CLANG CC=clang-$CLANG
@@ -119,18 +155,16 @@ before_install:
119155 fi
120156 export CXX=g++-$GCC CC=gcc-$GCC
121157 fi
122- if [ "$GCC" = "6" ]; then DOCKER=${ARCH:+$ARCH/}debian:stretch
123- elif [ "$GCC" = "7" ]; then DOCKER=debian:buster EXTRA_PACKAGES+=" catch python3-distutils" DOWNLOAD_CATCH=OFF
124- fi
125158 elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
126159 export CXX=clang++ CC=clang;
127160 fi
128161 if [ -n "$CPP" ]; then CPP=-std=c++$CPP; fi
129162 if [ "${PYTHON:0:1}" = "3" ]; then PY=3; fi
130163 if [ -n "$DEBUG" ]; then CMAKE_EXTRA_ARGS+=" -DCMAKE_BUILD_TYPE=Debug"; fi
164+ set +ex
131165 - |
132166 # Initialize environment
133- set -e
167+ set -ex
134168 if [ -n "$DOCKER" ]; then
135169 docker pull $DOCKER
136170
@@ -142,9 +176,9 @@ before_install:
142176 SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
143177 $SCRIPT_RUN_PREFIX sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done'
144178 else
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)
179+ if [ "$PYPY" = "5.8 " ]; then
180+ curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.8 .0-linux64.tar.bz2 | tar xj
181+ PY_CMD=$(echo `pwd`/pypy2-v5.8 .0-linux64/bin/pypy)
148182 CMAKE_EXTRA_ARGS+=" -DPYTHON_EXECUTABLE:FILEPATH=$PY_CMD"
149183 else
150184 PY_CMD=python$PYTHON
@@ -162,12 +196,12 @@ before_install:
162196 $PY_CMD --version
163197 $PY_CMD -m pip install --user --upgrade pip wheel
164198 fi
165- set +e
199+ set +ex
166200install :
167201- |
168202 # Install dependencies
203+ set -ex
169204 cmake --version
170- set -e
171205 if [ -n "$DOCKER" ]; then
172206 if [ -n "$DEBUG" ]; then
173207 PY_DEBUG="python$PYTHON-dbg python$PY-scipy-dbg"
@@ -185,26 +219,53 @@ install:
185219
186220 export NPY_NUM_BUILD_JOBS=2
187221 echo "Installing pytest, numpy, scipy..."
188- ${PYPY:+travis_wait 30} $PY_CMD -m pip install --user --upgrade pytest numpy scipy \
189- ${PYPY:+--extra-index-url https://imaginary.ca/trusty-pypi}
222+ local PIP_CMD=""
223+ if [ -n $PYPY ]; then
224+ # For expediency, install only versions that are available on the extra index.
225+ travis_wait 30 \
226+ $PY_CMD -m pip install --user --upgrade --extra-index-url https://imaginary.ca/trusty-pypi \
227+ pytest numpy==1.15.4 scipy==1.2.0
228+ else
229+ $PY_CMD -m pip install --user --upgrade pytest numpy scipy
230+ fi
190231 echo "done."
191232
192233 mkdir eigen
193234 curl -fsSL https://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2 | \
194235 tar --extract -j --directory=eigen --strip-components=1
195236 export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH:+$CMAKE_INCLUDE_PATH:}$PWD/eigen"
196237 fi
197- set +e
238+ set +ex
198239script :
199- - $SCRIPT_RUN_PREFIX cmake ${CMAKE_EXTRA_ARGS}
200- -DPYBIND11_PYTHON_VERSION=$PYTHON
201- -DPYBIND11_CPP_STANDARD=$CPP
202- -DPYBIND11_WERROR=${WERROR:-ON}
203- -DDOWNLOAD_CATCH=${DOWNLOAD_CATCH:-ON}
240+ - |
241+ # CMake Configuration
242+ set -ex
243+ $SCRIPT_RUN_PREFIX cmake ${CMAKE_EXTRA_ARGS} \
244+ -DPYBIND11_PYTHON_VERSION=$PYTHON \
245+ -DPYBIND11_CPP_STANDARD=$CPP \
246+ -DPYBIND11_WERROR=${WERROR:-ON} \
247+ -DDOWNLOAD_CATCH=${DOWNLOAD_CATCH:-ON} \
204248 .
205- - $SCRIPT_RUN_PREFIX make pytest -j 2
206- - $SCRIPT_RUN_PREFIX make cpptest -j 2
207- - if [ -n "$CMAKE" ]; then $SCRIPT_RUN_PREFIX make test_cmake_build; fi
249+ set +ex
250+ - |
251+ # pytest
252+ set -ex
253+ $SCRIPT_RUN_PREFIX make pytest -j 2 VERBOSE=1
254+ set +ex
255+ - |
256+ # cpptest
257+ set -ex
258+ $SCRIPT_RUN_PREFIX make cpptest -j 2
259+ set +ex
260+ - |
261+ # CMake Build Interface
262+ set -ex
263+ if [ -n "$CMAKE" ]; then $SCRIPT_RUN_PREFIX make test_cmake_build; fi
264+ set +ex
208265after_failure : cat tests/test_cmake_build/*.log*
209266after_script :
210- - if [ -n "$DOCKER" ]; then docker stop "$containerid"; docker rm "$containerid"; fi
267+ - |
268+ # Cleanup (Docker)
269+ set -ex
270+ if [ -n "$DOCKER" ]; then docker stop "$containerid"; docker rm "$containerid"; fi
271+ set +ex
0 commit comments