Skip to content

Commit a38e533

Browse files
authored
Fix CI, prepare test on Python 3.9 beta (#2233)
* Test on Python 3.9 beta * Pin Sphinx * Newer version of PyPy
1 parent a54eab9 commit a38e533

File tree

2 files changed

+43
-16
lines changed

2 files changed

+43
-16
lines changed

.travis.yml

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ matrix:
1717
- $PY_CMD -m pip install --user --upgrade pip wheel setuptools
1818
install:
1919
# breathe 4.14 doesn't work with bit fields. See https://github.com/michaeljones/breathe/issues/462
20-
- $PY_CMD -m pip install --user --upgrade sphinx sphinx_rtd_theme breathe==4.13.1 flake8 pep8-naming pytest
20+
# Latest breathe + Sphinx causes warnings and errors out
21+
- $PY_CMD -m pip install --user --upgrade "sphinx<3" sphinx_rtd_theme breathe==4.13.1 flake8 pep8-naming pytest
2122
- curl -fsSL https://sourceforge.net/projects/doxygen/files/rel-1.8.15/doxygen-1.8.15.linux.bin.tar.gz/download | tar xz
2223
- export PATH="$PWD/doxygen-1.8.15/bin:$PATH"
2324
script:
@@ -109,7 +110,7 @@ matrix:
109110
- os: linux
110111
dist: xenial
111112
env: PYTHON=3.8 CPP=17 GCC=7
112-
name: Python 3.8, c++17, gcc 7 (w/o numpy/scipy) # TODO: update build name when the numpy/scipy wheels become available
113+
name: Python 3.8, c++17, gcc 7
113114
addons:
114115
apt:
115116
sources:
@@ -119,12 +120,21 @@ matrix:
119120
- g++-7
120121
- python3.8-dev
121122
- python3.8-venv
122-
# Currently there is no numpy/scipy wheels available for python3.8
123-
# TODO: remove next before_install, install and script clause when the wheels become available
124-
before_install:
125-
- pyenv global $(pyenv whence 2to3) # activate all python versions
126-
- PY_CMD=python3
127-
- $PY_CMD -m pip install --user --upgrade pip wheel setuptools
123+
- os: linux
124+
dist: xenial
125+
env: PYTHON=3.9 CPP=17 GCC=7
126+
name: Python 3.9 beta, c++17, gcc 7 (w/o numpy/scipy) # TODO: update build name when the numpy/scipy wheels become available
127+
addons:
128+
apt:
129+
sources:
130+
- deadsnakes
131+
- ubuntu-toolchain-r-test
132+
packages:
133+
- g++-7
134+
- python3.9-dev
135+
- python3.9-venv
136+
# Currently there are no numpy/scipy wheels available for python3.9
137+
# TODO: remove next install and script clause when the wheels become available
128138
install:
129139
- $PY_CMD -m pip install --user --upgrade pytest
130140
script:
@@ -143,14 +153,25 @@ matrix:
143153
# Test a PyPy 2.7 build
144154
- os: linux
145155
dist: trusty
146-
env: PYPY=5.8 PYTHON=2.7 CPP=11 GCC=4.8
147-
name: PyPy 5.8, Python 2.7, c++11, gcc 4.8
156+
env: PYPY=7.3.1 PYTHON=2.7 CPP=11 GCC=4.8
157+
name: PyPy 7.3, Python 2.7, c++11, gcc 4.8
158+
addons:
159+
apt:
160+
packages:
161+
- libblas-dev
162+
- liblapack-dev
163+
- gfortran
164+
- os: linux
165+
dist: xenial
166+
env: PYPY=7.3.1 PYTHON=3.6 CPP=11 GCC=5
167+
name: PyPy 7.3, Python 3.6, c++11, gcc 5
148168
addons:
149169
apt:
150170
packages:
151171
- libblas-dev
152172
- liblapack-dev
153173
- gfortran
174+
- g++-5
154175
# Build in 32-bit mode and tests against the CMake-installed version
155176
- os: linux
156177
dist: trusty
@@ -170,6 +191,10 @@ matrix:
170191
cmake ../pybind11-tests ${CMAKE_EXTRA_ARGS} -DPYBIND11_WERROR=ON
171192
make pytest -j 2"
172193
set +ex
194+
allow_failures:
195+
- name: PyPy 7.3, Python 2.7, c++11, gcc 4.8
196+
- name: PyPy 7.3, Python 3.6, c++11, gcc 5
197+
- name: Python 3.9 beta, c++17, gcc 7 (w/o numpy/scipy)
173198
cache:
174199
directories:
175200
- $HOME/.local/bin
@@ -211,9 +236,9 @@ before_install:
211236
SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
212237
$SCRIPT_RUN_PREFIX sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done'
213238
else
214-
if [ "$PYPY" = "5.8" ]; then
215-
curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.8.0-linux64.tar.bz2 | tar xj
216-
PY_CMD=$(echo `pwd`/pypy2-v5.8.0-linux64/bin/pypy)
239+
if [ -n "$PYPY" ]; then
240+
curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy$PYTHON-v$PYPY-linux64.tar.bz2 | tar xj
241+
PY_CMD=$(echo `pwd`/pypy$PYTHON-v$PYPY-linux64/bin/pypy$PY)
217242
CMAKE_EXTRA_ARGS+=" -DPYTHON_EXECUTABLE:FILEPATH=$PY_CMD"
218243
else
219244
PY_CMD=python$PYTHON
@@ -255,11 +280,12 @@ install:
255280
export NPY_NUM_BUILD_JOBS=2
256281
echo "Installing pytest, numpy, scipy..."
257282
local PIP_CMD=""
258-
if [ -n $PYPY ]; then
283+
if [ -n "$PYPY" ]; then
259284
# For expediency, install only versions that are available on the extra index.
260285
travis_wait 30 \
261-
$PY_CMD -m pip install --user --upgrade --extra-index-url https://imaginary.ca/trusty-pypi \
262-
pytest numpy==1.15.4 scipy==1.2.0
286+
$PY_CMD -m pip install --user --upgrade --extra-index-url https://antocuni.github.io/pypy-wheels/manylinux2010 \
287+
numpy scipy
288+
$PY_CMD -m pip install --user --upgrade pytest
263289
else
264290
$PY_CMD -m pip install --user --upgrade pytest numpy scipy
265291
fi

tests/test_stl_binders.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def test_vector_int():
6767
v_int2.clear()
6868
assert len(v_int2) == 0
6969

70+
7071
# related to the PyPy's buffer protocol.
7172
@pytest.unsupported_on_pypy
7273
def test_vector_buffer():

0 commit comments

Comments
 (0)