Skip to content

Commit 8e28174

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
1 parent 111b25b commit 8e28174

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

.appveyor.yml

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

.travis.yml

Lines changed: 14 additions & 19 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:
@@ -32,7 +31,7 @@ matrix:
3231
diff -rq $installed ./include/pybind11
3332
- |
3433
# Barebones build
35-
cmake -DCMAKE_BUILD_TYPE=Debug -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
34+
cmake -DCMAKE_BUILD_TYPE=Debug -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON .
3635
make pytest -j 2
3736
make cpptest -j 2
3837
# The following are regular test configurations, including optional dependencies.
@@ -48,14 +47,11 @@ matrix:
4847
apt:
4948
sources: [deadsnakes]
5049
packages: [python3.6-dev python3.6-venv, cmake=2.\*, cmake-data=2.\*]
51-
- sudo: true
52-
services: docker
50+
- services: docker
5351
env: PYTHON=2.7 CPP=14 GCC=6 CMAKE=1
54-
- sudo: true
55-
services: docker
52+
- services: docker
5653
env: PYTHON=3.5 CPP=14 GCC=6 DEBUG=1
57-
- sudo: true
58-
services: docker
54+
- services: docker
5955
env: PYTHON=3.6 CPP=17 GCC=7
6056
- os: linux
6157
env: PYTHON=3.6 CPP=17 CLANG=5.0
@@ -71,18 +67,17 @@ matrix:
7167
env: PYTHON=3.7 CPP=14 CLANG DEBUG=1
7268
# Test a PyPy 2.7 build
7369
- os: linux
74-
env: PYPY=5.8 PYTHON=2.7 CPP=11 GCC=4.8
70+
env: PYPY=7.1 PYTHON=2.7 CPP=11 GCC=4.8
7571
addons:
7672
apt:
7773
packages: [libblas-dev, liblapack-dev, gfortran]
7874
# Build in 32-bit mode and tests against the CMake-installed version
79-
- sudo: true
80-
services: docker
75+
- services: docker
8176
env: ARCH=i386 PYTHON=3.5 CPP=14 GCC=6 INSTALL=1
8277
script:
8378
- |
8479
$SCRIPT_RUN_PREFIX sh -c "set -e
85-
cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0
80+
cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 .
8681
make install
8782
cp -a tests /pybind11-tests
8883
mkdir /build-tests && cd /build-tests
@@ -130,9 +125,9 @@ before_install:
130125
SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
131126
$SCRIPT_RUN_PREFIX sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done'
132127
else
133-
if [ "$PYPY" = "5.8" ]; then
134-
curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.8.0-linux64.tar.bz2 | tar xj
135-
PY_CMD=$(echo `pwd`/pypy2-v5.8.0-linux64/bin/pypy)
128+
if [ "$PYPY" = "7.1" ]; then
129+
curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-linux64.tar.bz2 | tar xj
130+
PY_CMD=$(echo `pwd`/pypy2.7-v7.1.0-linux64/bin/pypy)
136131
CMAKE_EXTRA_ARGS+=" -DPYTHON_EXECUTABLE:FILEPATH=$PY_CMD"
137132
else
138133
PY_CMD=python$PYTHON
@@ -147,12 +142,14 @@ before_install:
147142
if [ "$PY" = 3 ] || [ -n "$PYPY" ]; then
148143
$PY_CMD -m ensurepip --user
149144
fi
145+
$PY_CMD --version
150146
$PY_CMD -m pip install --user --upgrade pip wheel
151147
fi
152148
set +e
153149
install:
154150
- |
155151
# Install dependencies
152+
cmake --version
156153
set -e
157154
if [ -n "$DOCKER" ]; then
158155
if [ -n "$DEBUG" ]; then
@@ -173,10 +170,7 @@ install:
173170
git clone https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx -b release_50
174171
git clone https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi -b release_50
175172
mkdir llvm-build && cd llvm-build
176-
# Building llvm requires a newer cmake than is provided by the trusty container:
177-
CMAKE_VER=cmake-3.8.0-Linux-x86_64
178-
curl https://cmake.org/files/v3.8/$CMAKE_VER.tar.gz | tar xz
179-
./$CMAKE_VER/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local ../llvm-source
173+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local ../llvm-source
180174
make -j2 install-cxxabi install-cxx
181175
cp -a include/c++/v1/*cxxabi*.h ~/.local/include/c++/v1
182176
cd ..
@@ -205,6 +199,7 @@ script:
205199
-DPYBIND11_CPP_STANDARD=$CPP
206200
-DPYBIND11_WERROR=${WERROR:-ON}
207201
-DDOWNLOAD_CATCH=${DOWNLOAD_CATCH:-ON}
202+
.
208203
- $SCRIPT_RUN_PREFIX make pytest -j 2
209204
- $SCRIPT_RUN_PREFIX make cpptest -j 2
210205
- if [ -n "$CMAKE" ]; then $SCRIPT_RUN_PREFIX make test_cmake_build; fi

0 commit comments

Comments
 (0)