Skip to content

Commit 726e57d

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 25abf7e commit 726e57d

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
@@ -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: 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:
@@ -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,14 +48,11 @@ 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
55+
- services: docker
6056
env: PYTHON=3.6 CPP=17 GCC=7
6157
- os: linux
6258
env: PYTHON=3.6 CPP=17 CLANG=5.0
@@ -72,18 +68,17 @@ matrix:
7268
env: PYTHON=3.7 CPP=14 CLANG DEBUG=1
7369
# Test a PyPy 2.7 build
7470
- os: linux
75-
env: PYPY=5.8 PYTHON=2.7 CPP=11 GCC=4.8
71+
env: PYPY=7.1 PYTHON=2.7 CPP=11 GCC=4.8
7672
addons:
7773
apt:
7874
packages: [libblas-dev, liblapack-dev, gfortran]
7975
# Build in 32-bit mode and tests against the CMake-installed version
80-
- sudo: true
81-
services: docker
76+
- services: docker
8277
env: ARCH=i386 PYTHON=3.5 CPP=14 GCC=6 INSTALL=1
8378
script:
8479
- |
8580
$SCRIPT_RUN_PREFIX sh -c "set -e
86-
cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0
81+
cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 .
8782
make install
8883
cp -a tests /pybind11-tests
8984
mkdir /build-tests && cd /build-tests
@@ -131,9 +126,9 @@ before_install:
131126
SCRIPT_RUN_PREFIX="docker exec --tty $containerid"
132127
$SCRIPT_RUN_PREFIX sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done'
133128
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)
129+
if [ "$PYPY" = "7.1" ]; then
130+
curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.1.0-linux64.tar.bz2 | tar xj
131+
PY_CMD=$(echo `pwd`/pypy2.7-v7.1.0-linux64/bin/pypy)
137132
CMAKE_EXTRA_ARGS+=" -DPYTHON_EXECUTABLE:FILEPATH=$PY_CMD"
138133
else
139134
PY_CMD=python$PYTHON
@@ -148,12 +143,14 @@ before_install:
148143
if [ "$PY" = 3 ] || [ -n "$PYPY" ]; then
149144
$PY_CMD -m ensurepip --user
150145
fi
146+
$PY_CMD --version
151147
$PY_CMD -m pip install --user --upgrade pip wheel
152148
fi
153149
set +e
154150
install:
155151
- |
156152
# Install dependencies
153+
cmake --version
157154
set -e
158155
if [ -n "$DOCKER" ]; then
159156
if [ -n "$DEBUG" ]; then
@@ -174,10 +171,7 @@ install:
174171
git clone https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx -b release_50
175172
git clone https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi -b release_50
176173
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
174+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local ../llvm-source
181175
make -j2 install-cxxabi install-cxx
182176
cp -a include/c++/v1/*cxxabi*.h ~/.local/include/c++/v1
183177
cd ..
@@ -206,6 +200,7 @@ script:
206200
-DPYBIND11_CPP_STANDARD=$CPP
207201
-DPYBIND11_WERROR=${WERROR:-ON}
208202
-DDOWNLOAD_CATCH=${DOWNLOAD_CATCH:-ON}
203+
.
209204
- $SCRIPT_RUN_PREFIX make pytest -j 2
210205
- $SCRIPT_RUN_PREFIX make cpptest -j 2
211206
- if [ -n "$CMAKE" ]; then $SCRIPT_RUN_PREFIX make test_cmake_build; fi

0 commit comments

Comments
 (0)