Skip to content

Commit 448668b

Browse files
committed
Fixes for CI
* Fix warning that not including a cmake source or build dir will be a fatal error (it is now on newest CMakes) * Fixes appveyor * Travis uses CMake 3.9 for more than a year now * Travis dropped sudo: false in December * Dropping Sphinx 2
1 parent 25abf7e commit 448668b

File tree

2 files changed

+38
-41
lines changed

2 files changed

+38
-41
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ build_script:
6262
-DPYBIND11_WERROR=ON
6363
-DDOWNLOAD_CATCH=ON
6464
-DCMAKE_SUPPRESS_REGENERATION=1
65+
.
6566
- set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
6667
- cmake --build . --config %CONFIG% --target pytest -- /m /v:m /logger:%MSBuildLogger%
6768
- cmake --build . --config %CONFIG% --target cpptest -- /m /v:m /logger:%MSBuildLogger%

.travis.yml

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: cpp
22
dist: trusty
3-
sudo: false
43
matrix:
54
include:
65
# This config does a few things:
@@ -17,8 +16,8 @@ matrix:
1716
- pyenv global $(pyenv whence 2to3) # activate all python versions
1817
- PY_CMD=python3
1918
- $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
2221
- curl -fsSL https://sourceforge.net/projects/doxygen/files/rel-1.8.15/doxygen-1.8.15.linux.bin.tar.gz/download | tar xz
2322
- export PATH="$PWD/doxygen-1.8.15/bin:$PATH"
2423
script:
@@ -33,7 +32,7 @@ matrix:
3332
diff -rq $installed ./include/pybind11
3433
- |
3534
# 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) .
3736
make pytest -j 2
3837
make cpptest -j 2
3938
# The following are regular test configurations, including optional dependencies.
@@ -49,21 +48,34 @@ matrix:
4948
apt:
5049
sources: [deadsnakes]
5150
packages: [python3.6-dev python3.6-venv, cmake=2.\*, cmake-data=2.\*]
52-
- sudo: true
53-
services: docker
51+
- services: docker
5452
env: PYTHON=2.7 CPP=14 GCC=6 CMAKE=1
55-
- sudo: true
56-
services: docker
53+
- services: docker
5754
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
6165
- os: linux
62-
env: PYTHON=3.6 CPP=17 CLANG=5.0
66+
env: PYTHON=3.6 CPP=17 CLANG=7
6367
addons:
6468
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
6779
- os: osx
6880
osx_image: xcode7.3
6981
env: PYTHON=2.7 CPP=14 CLANG CMAKE=1
@@ -72,18 +84,17 @@ matrix:
7284
env: PYTHON=3.7 CPP=14 CLANG DEBUG=1
7385
# Test a PyPy 2.7 build
7486
- 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
7688
addons:
7789
apt:
7890
packages: [libblas-dev, liblapack-dev, gfortran]
7991
# Build in 32-bit mode and tests against the CMake-installed version
80-
- sudo: true
81-
services: docker
92+
- services: docker
8293
env: ARCH=i386 PYTHON=3.5 CPP=14 GCC=6 INSTALL=1
8394
script:
8495
- |
8596
$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 .
8798
make install
8899
cp -a tests /pybind11-tests
89100
mkdir /build-tests && cd /build-tests
@@ -131,9 +142,9 @@ before_install:
131142
SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
132143
$SCRIPT_RUN_PREFIX sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done'
133144
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)
137148
CMAKE_EXTRA_ARGS+=" -DPYTHON_EXECUTABLE:FILEPATH=$PY_CMD"
138149
else
139150
PY_CMD=python$PYTHON
@@ -148,12 +159,14 @@ before_install:
148159
if [ "$PY" = 3 ] || [ -n "$PYPY" ]; then
149160
$PY_CMD -m ensurepip --user
150161
fi
162+
$PY_CMD --version
151163
$PY_CMD -m pip install --user --upgrade pip wheel
152164
fi
153165
set +e
154166
install:
155167
- |
156168
# Install dependencies
169+
cmake --version
157170
set -e
158171
if [ -n "$DOCKER" ]; then
159172
if [ -n "$DEBUG" ]; then
@@ -166,26 +179,8 @@ install:
166179
libeigen3-dev libboost-dev cmake make ${EXTRA_PACKAGES} && break; done"
167180
else
168181
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++"
189184
fi
190185
191186
export NPY_NUM_BUILD_JOBS=2
@@ -206,6 +201,7 @@ script:
206201
-DPYBIND11_CPP_STANDARD=$CPP
207202
-DPYBIND11_WERROR=${WERROR:-ON}
208203
-DDOWNLOAD_CATCH=${DOWNLOAD_CATCH:-ON}
204+
.
209205
- $SCRIPT_RUN_PREFIX make pytest -j 2
210206
- $SCRIPT_RUN_PREFIX make cpptest -j 2
211207
- if [ -n "$CMAKE" ]; then $SCRIPT_RUN_PREFIX make test_cmake_build; fi

0 commit comments

Comments
 (0)