.travis.yml (11986:c12e4625ab56) | .travis.yml (12037:d28054ac6ec9) |
---|---|
1language: cpp 2sudo: false 3matrix: 4 include: 5 - os: linux 6 env: PYTHON=2.7 CPP=11 GCC=4.8 7 addons: 8 apt: --- 6 unchanged lines hidden (view full) --- 15 sources: [ubuntu-toolchain-r-test, kubuntu-backports, deadsnakes] 16 packages: [g++-4.8, cmake, python3.5-dev] 17 - sudo: true 18 services: docker 19 env: PYTHON=2.7 CPP=14 GCC=6 20 - sudo: true 21 services: docker 22 env: PYTHON=3.5 CPP=14 GCC=6 DEBUG=1 | 1language: cpp 2sudo: false 3matrix: 4 include: 5 - os: linux 6 env: PYTHON=2.7 CPP=11 GCC=4.8 7 addons: 8 apt: --- 6 unchanged lines hidden (view full) --- 15 sources: [ubuntu-toolchain-r-test, kubuntu-backports, deadsnakes] 16 packages: [g++-4.8, cmake, python3.5-dev] 17 - sudo: true 18 services: docker 19 env: PYTHON=2.7 CPP=14 GCC=6 20 - sudo: true 21 services: docker 22 env: PYTHON=3.5 CPP=14 GCC=6 DEBUG=1 |
23 - sudo: true 24 services: docker 25 env: PYTHON=3.5 CPP=17 GCC=7 26 - sudo: true 27 services: docker 28 env: PYTHON=3.5 CPP=17 CLANG=4.0 |
|
23 - os: osx 24 osx_image: xcode7.3 25 env: PYTHON=2.7 CPP=14 CLANG 26 - os: osx 27 osx_image: xcode7.3 | 29 - os: osx 30 osx_image: xcode7.3 31 env: PYTHON=2.7 CPP=14 CLANG 32 - os: osx 33 osx_image: xcode7.3 |
28 env: PYTHON=3.5 CPP=14 CLANG | 34 env: PYTHON=3.6 CPP=14 CLANG 35 # Test a PyPy 2.7 build 36 - os: linux 37 dist: trusty 38 env: PYPY=5.7 PYTHON=2.7 CPP=11 GCC=4.8 39 addons: 40 apt: 41 packages: [g++-4.8, cmake] 42 - sudo: true 43 services: docker 44 env: ARCH=i386 PYTHON=3.5 CPP=14 GCC=6 45 # This next one does a make install *before* testing, then builds the tests against the installed version: 46 - sudo: true 47 services: docker 48 env: PYTHON=3.5 CPP=14 CLANG=3.9 INSTALL=1 49 script: 50 - | 51 $SCRIPT_RUN_PREFIX sh -c "set -e 52 cmake ${CMAKE_EXTRA_ARGS} -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 53 make install 54 cp -a tests /pybind11-tests 55 mkdir /build-tests && cd /build-tests 56 cmake ../pybind11-tests ${CMAKE_EXTRA_ARGS} -DPYBIND11_WERROR=ON 57 make pytest -j 2" |
29 # A barebones build makes sure everything still works without optional deps (numpy/scipy/eigen) 30 # and also tests the automatic discovery functions in CMake (Python version, C++ standard). 31 - os: linux 32 env: BAREBONES 33 addons: 34 apt: 35 sources: [ubuntu-toolchain-r-test, kubuntu-backports] 36 packages: [g++-4.8, cmake] 37 install: pip install pytest 38 # Documentation build: 39 - os: linux 40 language: docs 41 env: DOCS STYLE LINT 42 install: 43 - pip install --upgrade sphinx sphinx_rtd_theme flake8 pep8-naming | 58 # A barebones build makes sure everything still works without optional deps (numpy/scipy/eigen) 59 # and also tests the automatic discovery functions in CMake (Python version, C++ standard). 60 - os: linux 61 env: BAREBONES 62 addons: 63 apt: 64 sources: [ubuntu-toolchain-r-test, kubuntu-backports] 65 packages: [g++-4.8, cmake] 66 install: pip install pytest 67 # Documentation build: 68 - os: linux 69 language: docs 70 env: DOCS STYLE LINT 71 install: 72 - pip install --upgrade sphinx sphinx_rtd_theme flake8 pep8-naming |
44 - pip install docutils==0.12 | 73 - | 74 curl -fsSL ftp://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.12.linux.bin.tar.gz | tar xz 75 export PATH="$PWD/doxygen-1.8.12/bin:$PATH" 76 pip install https://github.com/michaeljones/breathe/archive/master.zip |
45 script: 46 - make -C docs html SPHINX_OPTIONS=-W 47 - tools/check-style.sh 48 - flake8 | 77 script: 78 - make -C docs html SPHINX_OPTIONS=-W 79 - tools/check-style.sh 80 - flake8 |
81 allow_failures: 82 - env: PYTHON=3.5 CPP=17 GCC=7 83 - env: PYTHON=3.5 CPP=17 CLANG=4.0 |
|
49cache: 50 directories: 51 - $HOME/.cache/pip 52 - $HOME/Library/Caches/pip 53before_install: 54- | 55 # Configure build variables 56 if [ "$TRAVIS_OS_NAME" = "linux" ]; then | 84cache: 85 directories: 86 - $HOME/.cache/pip 87 - $HOME/Library/Caches/pip 88before_install: 89- | 90 # Configure build variables 91 if [ "$TRAVIS_OS_NAME" = "linux" ]; then |
57 if [ -z "$GCC" ]; then export GCC=4.8; fi 58 export CXX=g++-$GCC CC=gcc-$GCC; 59 if [ "$GCC" = "6" ]; then export DOCKER=debian:testing CXX=g++ CC=gcc; fi | 92 if [ -n "$CLANG" ]; then 93 export CXX=clang++-$CLANG CC=clang-$CLANG COMPILER_PACKAGES="clang-$CLANG llvm-$CLANG-dev" 94 if [ "$CLANG" = "4.0" ]; then export CXXFLAGS="-stdlib=libc++"; fi 95 else 96 if [ -z "$GCC" ]; then export GCC=4.8 97 else export COMPILER_PACKAGES=g++-$GCC 98 fi 99 export CXX=g++-$GCC CC=gcc-$GCC 100 fi 101 if [ "$CLANG" = "4.0" ]; then export DOCKER=debian:sid 102 elif [ "$GCC" = "6" ] || [ -n "$CLANG" ]; then export DOCKER=${ARCH:+$ARCH/}debian:testing 103 elif [ "$GCC" = "7" ]; then export DOCKER=debian:experimental APT_GET_EXTRA="-t experimental" 104 fi |
60 elif [ "$TRAVIS_OS_NAME" = "osx" ]; then 61 export CXX=clang++ CC=clang; 62 fi 63 if [ -n "$CPP" ]; then export CPP=-std=c++$CPP; fi 64 if [ "${PYTHON:0:1}" = "3" ]; then export PY=3; fi | 105 elif [ "$TRAVIS_OS_NAME" = "osx" ]; then 106 export CXX=clang++ CC=clang; 107 fi 108 if [ -n "$CPP" ]; then export CPP=-std=c++$CPP; fi 109 if [ "${PYTHON:0:1}" = "3" ]; then export PY=3; fi |
110 if [ "$PYPY" = "5.7" ]; then 111 curl -fSL https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.7.0-linux64.tar.bz2 | tar -xj 112 export PYPY_BINARY=$(echo `pwd`/pypy2-v5.7.0-linux64/bin/pypy) 113 export CMAKE_EXTRA_ARGS="-DPYTHON_EXECUTABLE:FILEPATH=$PYPY_BINARY" 114 fi |
|
65 if [ -n "$DEBUG" ]; then export CMAKE_EXTRA_ARGS="-DCMAKE_BUILD_TYPE=Debug"; fi 66- | | 115 if [ -n "$DEBUG" ]; then export CMAKE_EXTRA_ARGS="-DCMAKE_BUILD_TYPE=Debug"; fi 116- | |
67 # Initialize enviornment 68 if [ -n "$DOCKER" ]; then | 117 # Initialize environment 118 if [ -n "$PYPY" ]; then 119 $PYPY_BINARY -m ensurepip 120 $PYPY_BINARY -m pip install pytest 121 elif [ -n "$DOCKER" ]; then |
69 docker pull $DOCKER | 122 docker pull $DOCKER |
123 # Disable LTO with gcc until gcc 79296 is fixed: 124 if [ -n "$GCC" ]; then export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DPYBIND11_LTO_CXX_FLAGS="; fi 125 |
|
70 export containerid=$(docker run --detach --tty \ 71 --volume="$PWD":/pybind11 --workdir=/pybind11 \ | 126 export containerid=$(docker run --detach --tty \ 127 --volume="$PWD":/pybind11 --workdir=/pybind11 \ |
128 --env="CXXFLAGS=$CXXFLAGS" \ |
|
72 --env="CC=$CC" --env="CXX=$CXX" --env="DEBIAN_FRONTEND=$DEBIAN_FRONTEND" \ 73 --env=GCC_COLORS=\ \ 74 $DOCKER) | 129 --env="CC=$CC" --env="CXX=$CXX" --env="DEBIAN_FRONTEND=$DEBIAN_FRONTEND" \ 130 --env=GCC_COLORS=\ \ 131 $DOCKER) |
75 docker exec --tty "$containerid" sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done' | |
76 export SCRIPT_RUN_PREFIX="docker exec --tty $containerid" | 132 export SCRIPT_RUN_PREFIX="docker exec --tty $containerid" |
133 $SCRIPT_RUN_PREFIX sh -c 'for s in 0 15; do sleep $s; apt-get update && apt-get -qy dist-upgrade && break; done' 134 # gcc-7 currently generates warnings; some are upstream bugs, so just turn off -Werror for now 135 if [ "$GCC" = "7" ]; then WERROR=off; fi |
|
77 else 78 if [ "$TRAVIS_OS_NAME" = "linux" ]; then 79 pip install --user --upgrade pip virtualenv 80 virtualenv -p python$PYTHON venv 81 elif [ "$TRAVIS_OS_NAME" = "osx" ]; then 82 if [ "$PY" = "3" ]; then 83 brew update; brew install python$PY; 84 else --- 4 unchanged lines hidden (view full) --- 89 python$PY -m virtualenv venv 90 fi 91 source venv/bin/activate 92 fi 93install: 94- | 95 # Install dependencies 96 if [ -n "$DOCKER" ]; then | 136 else 137 if [ "$TRAVIS_OS_NAME" = "linux" ]; then 138 pip install --user --upgrade pip virtualenv 139 virtualenv -p python$PYTHON venv 140 elif [ "$TRAVIS_OS_NAME" = "osx" ]; then 141 if [ "$PY" = "3" ]; then 142 brew update; brew install python$PY; 143 else --- 4 unchanged lines hidden (view full) --- 148 python$PY -m virtualenv venv 149 fi 150 source venv/bin/activate 151 fi 152install: 153- | 154 # Install dependencies 155 if [ -n "$DOCKER" ]; then |
97 docker exec --tty "$containerid" sh -c "for s in 0 15; do sleep \$s; apt-get -qy --no-install-recommends install \ 98 python$PYTHON-dev python$PY-pytest python$PY-scipy \ 99 libeigen3-dev cmake make g++ && break; done" 100 else | 156 if [ -n "$DEBUG" ]; then 157 PY_DEBUG="python$PY-dbg python$PY-scipy-dbg" 158 export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DPYTHON_EXECUTABLE=/usr/bin/python${PYTHON}dm" 159 fi 160 $SCRIPT_RUN_PREFIX sh -c "for s in 0 15; do sleep \$s; \ 161 apt-get -qy --no-install-recommends $APT_GET_EXTRA install \ 162 $PY_DEBUG python$PY-dev python$PY-pytest python$PY-scipy \ 163 libeigen3-dev cmake make ${COMPILER_PACKAGES} && break; done" 164 165 if [ "$CLANG" = "4.0" ]; then 166 # Neither debian nor llvm provide a libc++ deb; luckily it's fairly quick 167 # to build and install, so do it ourselves: 168 git clone --depth=1 https://github.com/llvm-mirror/llvm.git llvm-source 169 git clone https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx -b release_40 170 git clone https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi -b release_40 171 $SCRIPT_RUN_PREFIX sh -c "mkdir llvm-build && cd llvm-build && \ 172 CXXFLAGS= cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ../llvm-source && \ 173 make -j2 install-cxxabi install-cxx && \ 174 cp -a include/c++/v1/*cxxabi*.h /usr/include/c++/v1" 175 176 if [ "$CPP" = "-std=c++17" ]; then export CPP="-std=c++1z"; fi 177 fi 178 elif [ -z "$PYPY" ]; then |
101 pip install numpy scipy pytest 102 103 wget -q -O eigen.tar.gz https://bitbucket.org/eigen/eigen/get/3.3.0.tar.gz 104 tar xzf eigen.tar.gz 105 export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_INCLUDE_PATH=$PWD/eigen-eigen-26667be4f70b" 106 fi 107script: 108- $SCRIPT_RUN_PREFIX cmake ${CMAKE_EXTRA_ARGS} 109 -DPYBIND11_PYTHON_VERSION=$PYTHON 110 -DPYBIND11_CPP_STANDARD=$CPP | 179 pip install numpy scipy pytest 180 181 wget -q -O eigen.tar.gz https://bitbucket.org/eigen/eigen/get/3.3.0.tar.gz 182 tar xzf eigen.tar.gz 183 export CMAKE_EXTRA_ARGS="${CMAKE_EXTRA_ARGS} -DCMAKE_INCLUDE_PATH=$PWD/eigen-eigen-26667be4f70b" 184 fi 185script: 186- $SCRIPT_RUN_PREFIX cmake ${CMAKE_EXTRA_ARGS} 187 -DPYBIND11_PYTHON_VERSION=$PYTHON 188 -DPYBIND11_CPP_STANDARD=$CPP |
111 -DPYBIND11_WERROR=ON | 189 -DPYBIND11_WERROR=${WERROR:-ON} |
112- $SCRIPT_RUN_PREFIX make pytest -j 2 | 190- $SCRIPT_RUN_PREFIX make pytest -j 2 |
113- $SCRIPT_RUN_PREFIX make test_install | 191- $SCRIPT_RUN_PREFIX make test_cmake_build 192after_failure: cat tests/test_cmake_build/*.log |
114after_script: 115- if [ -n "$DOCKER" ]; then docker stop "$containerid"; docker rm "$containerid"; fi | 193after_script: 194- if [ -n "$DOCKER" ]; then docker stop "$containerid"; docker rm "$containerid"; fi |