代码拉取完成,页面将自动刷新
#
# Travis CI config file
#
# Copyright Tristan Brindle 2018
#
# Use, modification and distribution is subject to the
# Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# Heavily based on travis.yml from Boost.Hana
#
# Copyright Louis Dionne 2013-18
#
language: cpp
os: linux
dist: xenial
# Do not build branches of the form "pr/*". By prefixing pull requests coming
# from branches inside the repository with pr/, this avoids building both the
# branch push _and_ the pull request.
# Based on https://github.com/boostorg/hana/blob/master/.travis.yml
branches:
except: /pr\/.*/
matrix:
include:
#
# Mac OS builds
#
- os: osx
osx_image: xcode11.3
env: COMPILER=clang++
- os: osx
osx_image: xcode11
env: COMPILER=clang++
- os: osx
osx_image: xcode10.2
env: COMPILER=clang++
- os: osx
osx_image: xcode10.1
env: COMPILER=clang++
#
# Linux builds
#
# GCC 9
- language: python
python: "3.7"
install:
- pip install conan-package-tools
env:
- COMPILER=g++-9
- BUILD_SINGLE_HEADER=true
- CONAN_GCC_VERSIONS=9
- CONAN_DOCKER_IMAGE=conanio/gcc9
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
# GCC 8
- env: COMPILER=g++-8
addons:
apt:
packages:
- g++-8
sources:
- ubuntu-toolchain-r-test
# GCC 7
- env: COMPILER=g++-7
addons:
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
# Clang 9
- env: COMPILER=clang++-9
addons:
apt:
packages:
- clang-9
- libc++-9-dev
- libc++abi-9-dev
sources:
- ubuntu-toolchain-r-test
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
# Clang 8
- env: COMPILER=clang++-8
addons:
apt:
packages:
- clang-8
- libc++-8-dev
- libc++abi-8-dev
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-8
# Clang 7
- env: COMPILER=clang++-7
addons:
apt:
packages:
- clang-7
- libc++-7-dev
- libc++abi-7-dev
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
# Clang 6
- env: COMPILER=clang++-6.0
addons:
apt:
packages:
- clang-6.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-6.0
# Clang 5
- env: COMPILER=clang++-5.0
addons:
apt:
packages:
- clang-5.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-5.0
install:
- DEPS_DIR="${HOME}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
- if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
- ${CXX} --version
############################################################################
# Install libc++ and libc++abi if needed
# Taken from https://github.com/boostorg/hana/blob/master/.travis.yml
############################################################################
- |
if [[ "$TRAVIS_OS_NAME" == "linux" && "${CXX%%+*}" == "clang" ]]; then
if [[ "${CXX}" == "clang++-5.0" || "${CXX}" == "clang++-6.0" ]]; then
if [[ "${CXX}" == "clang++-5.0" ]]; then LLVM_VERSION="5.0.2";
elif [[ "${CXX}" == "clang++-6.0" ]]; then LLVM_VERSION="6.0.0";
elif [[ "${CXX}" == "clang++-7" ]]; then LLVM_VERSION="7.0.0";
elif [[ "${CXX}" == "clang++-8" ]]; then LLVM_VERSION="8.0.0";
elif [[ "${CXX}" == "clang++-9" ]]; then LLVM_VERSION="9.0.0";
fi
LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz"
LIBCXX_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxx-${LLVM_VERSION}.src.tar.xz"
LIBCXXABI_URL="http://llvm.org/releases/${LLVM_VERSION}/libcxxabi-${LLVM_VERSION}.src.tar.xz"
mkdir -p llvm llvm/build llvm/projects/libcxx llvm/projects/libcxxabi
travis_retry wget -O - ${LLVM_URL} | tar --strip-components=1 -xJ -C llvm || exit 1
travis_retry wget -O - ${LIBCXX_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxx || exit 1
travis_retry wget -O - ${LIBCXXABI_URL} | tar --strip-components=1 -xJ -C llvm/projects/libcxxabi || exit 1
(cd llvm/build && cmake .. -DCMAKE_INSTALL_PREFIX=${DEPS_DIR}/llvm/install) || exit 1
(cd llvm/build/projects/libcxx && make install -j2) || exit 1
(cd llvm/build/projects/libcxxabi && make install -j2) || exit 1
export CXXFLAGS="-isystem ${DEPS_DIR}/llvm/install/include/c++/v1"
export LDFLAGS="-L ${DEPS_DIR}/llvm/install/lib -l c++ -l c++abi"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DEPS_DIR}/llvm/install/lib"
else
export CXXFLAGS="-stdlib=libc++"
fi
fi
before_script:
- cd $TRAVIS_BUILD_DIR
- mkdir -p -v build
script:
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=$COMPILER
- cmake --build . --target test_nanorange -- -j2
- ctest -j2
after_success:
- |
if [[ "${BUILD_SINGLE_HEADER}" == "true" ]]; then
if [[ "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" == "master" ]]; then
cmake --build . --target make_single_header
cd ..
./build/tools/make_single_header include/nanorange.hpp single_include/nanorange.hpp
# Suppress output to avoid leaking the token when the command fails
git clone https://tcbrindle:${GITHUB_TOKEN}@github.com/tcbrindle/nanorange --depth 1 checkout &>/dev/null
rm -rf checkout/single_include/nanorange.hpp
cp -R single_include/nanorange.hpp checkout/single_include/nanorange.hpp
pushd checkout
git config --global user.name "Travis Bot"
git config --global user.email "travis@travis-ci.org"
git add --all .
git commit --allow-empty -m "[skip ci] Update single header"
# Suppress output to avoid leaking the token
travis_retry git push origin master &>/dev/null
popd
python .conan/build.py
fi
fi
notifications:
email: off
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。