代码拉取完成,页面将自动刷新
language: cpp
# Default to the fully visualised "sudo" GCE environments, as they are faster for longer running jobs. We don't actually need sudo
sudo: required
# Use the latest Travis images since they are more up to date than the stable release.
group: edge
before_script:
- export -f travis_fold
script:
- "bash -ex .travis-ci.sh"
addons:
apt:
packages: &base_build
# This is the absolute minimum for configure to pass
# Non C++ based tasks use it so they can run make builtfiles
- ccache
- libcppunit-dev
- bison
- flex
- uuid-dev
- libprotobuf-dev
- protobuf-compiler
- libprotoc-dev
packages: &core_build
# This is all the bits we need to enable all options
- *base_build
- libftdi-dev
- libftdi1
- libusb-1.0-0-dev
- liblo-dev
- libavahi-glib1
- libncurses5-dev
- libmicrohttpd-dev
packages: &core_build_gpp_latest
- *core_build
- g++-8
packages: &core_build_clang_latest
- *core_build
- clang-6.0
matrix:
fast_finish: true
include:
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.13'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.14'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.13'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.14'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.13'
- PROTOBUF='latest'
- LIBFTDI='1'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.13'
- PROTOBUF='latest'
- LIBFTDI='1'
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.14'
- PROTOBUF='latest'
- LIBFTDI='1'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.14'
- PROTOBUF='latest'
- LIBFTDI='1'
- os: linux
dist: xenial
compiler: clang
env: TASK='compile'
python: '2.7'
addons:
apt:
packages:
- *core_build_clang_latest
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
- os: linux
dist: xenial
compiler: gcc
env: TASK='compile'
python: '2.7'
addons:
apt:
packages:
- *core_build_gpp_latest
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
dist: xenial
compiler: gcc
env: TASK='coverage'
addons:
apt:
packages:
- *core_build_gpp_latest
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
dist: xenial
compiler: gcc
env: TASK='coverity'
addons:
apt:
packages:
# Coverity doesn't work with g++-5 or g++-6 yet
- *core_build
- g++-4.9
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
dist: xenial
env: TASK='doxygen'
addons:
apt:
packages:
- *core_build_gpp_latest
- doxygen
- graphviz
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
- os: linux
dist: xenial
env: TASK='lint'
addons:
apt:
packages:
- *core_build
- os: linux
dist: xenial
env: TASK='check-licences'
addons:
apt:
packages:
- *core_build
- os: linux
dist: xenial
env: TASK='spellintian'
addons:
apt:
packages:
- *core_build
- moreutils
- os: linux
dist: xenial
env: TASK='spellintian-duplicates'
addons:
apt:
packages:
- *core_build
- moreutils
- os: linux
dist: xenial
env: TASK='codespell'
addons:
apt:
packages:
- *core_build
- moreutils
- os: linux
dist: xenial
env: TASK='jshint'
addons:
apt:
packages:
- os: linux
dist: xenial
env: TASK='flake8'
addons:
apt:
packages:
- *base_build
- os: linux
dist: xenial
env: TASK='pychecker'
python: '2.7'
addons:
apt:
packages:
- *base_build
- os: linux
dist: xenial
env: TASK='pychecker-wip'
python: '2.7'
addons:
apt:
packages:
- *base_build
allow_failures:
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.13'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: clang
env:
- TASK='compile'
- CPPUNIT='1.14'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.13'
- LIBFTDI='0'
- os: osx
osx_image: xcode9.3
compiler: gcc
env:
- TASK='compile'
- CPPUNIT='1.14'
- LIBFTDI='0'
- os: linux
dist: xenial
compiler: gcc
env: TASK='coverage'
- os: linux
dist: xenial
compiler: gcc
env: TASK='coverity'
- os: linux
dist: xenial
env: TASK='pychecker-wip'
- os: linux
dist: xenial
env: TASK='spellintian'
- os: linux
dist: xenial
env: TASK='spellintian-duplicates'
env:
global:
# No colours in terminal (to reduce log file size)
- TERM=dumb
# Parallel make build
- MAKEFLAGS="-j 2"
# -- BEGIN Coverity Scan ENV
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="cov-configure --comptype gcc --compiler gcc-4.9 --template && autoreconf -i && ./configure --enable-ja-rule --enable-e133"
# The build command with all of the arguments that you would apply to a manual `cov-build`
# Usually this is the same as STANDARD_BUILD_COMMAND, excluding the automated test arguments
- COVERITY_SCAN_BUILD_COMMAND="make"
# Name of the project
- COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
# Email address for notifications related to this build
- COVERITY_SCAN_NOTIFICATION_EMAIL="ola-coverity@pjnewman.co.uk"
# Regular expression selects on which branches to run analysis
# Be aware of quotas. Do not run on every branch/commit
- COVERITY_SCAN_BRANCH_PATTERN=".*"
# COVERITY_SCAN_TOKEN via "travis encrypt" using the repo's public key
- secure: "U+NmPtScHZ1NLmkDrzpqApHmJvELV44cXgjQsxA8N8xIATckbs+DrmWSNeECENyvuOPz+nPzglSgBvJtejf97jYJIIwAExq5TJMUAIPFS6KU3mohODW2PZSoVoUyJPzFIlhzcELQgONI+ILLm29lNdQNb7GFUVtO6+jS10AFtWY="
# -- END Coverity Scan ENV
cache:
apt: true
directories:
- $HOME/.cache/pip # pip cache
- $HOME/.npm # npm cache
- $HOME/.ccache # ccache cache
- $HOME/.m2 # maven cache
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log # erase log
- ccache -s # see how many hits ccache got
install:
# Match the version of protobuf being installed via apt
- if [[ "$PROTOBUF" == "latest" ]]; then pip install --user protobuf; fi
- if [[ "$PROTOBUF" != "latest" ]]; then pip install --user protobuf==3.1.0; fi
# disable until can be added to all build variants
#- pip install --user timeout-decorator
# We need to use pip rather than apt on Xenial
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then pip install --user numpy; fi
- if [ "$TASK" = "coverage" ]; then pip install --user cpp-coveralls; fi
- if [ "$TASK" = "flake8" ]; then pip install --user flake8; fi
- if [ "$TASK" = "codespell" ]; then pip install --user git+https://github.com/codespell-project/codespell.git; fi
- if [ "$TASK" = "jshint" ]; then npm install -g grunt-cli; fi
# If this causes SSL errors, then Sourceforge is probably in disaster recovery mode and needing Javascript. Could switch to a specific mirror, e.g. kent.dl.sourceforge.net
- if [ "$TASK" = "pychecker" -o "$TASK" = "pychecker-wip" ]; then pip install --user http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz/download; fi
# This is a very bodgy workaround to the fact that the pip install of the archive doesn't seem to work properly now on Travis
- if [ "$TASK" = "pychecker" -o "$TASK" = "pychecker-wip" ]; then sudo mkdir -p /pychecker/; sudo ln -s /home/travis/.local/lib/python2.7/site-packages/pychecker/checker.py /pychecker/checker.py; fi
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
#Fix a broken homebrew libtool install
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew reinstall libtool; fi
#Fix a broken homebrew python upgrade - see https://github.com/Homebrew/homebrew-core/issues/26358
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python || true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then if [ ! -d /usr/local/sbin ]; then sudo mkdir -p /usr/local/sbin && sudo chown -R $(whoami) /usr/local/sbin; fi; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache bison flex liblo libmicrohttpd; fi # ossp-uuid, homebrew/python/numpy and libusb already present
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$LIBFTDI" != "1" ]; then brew install libftdi0; fi # install libftdi0
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$LIBFTDI" == "1" ]; then brew install libftdi; fi # install the latest libftdi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" == "latest" ]; then brew install protobuf; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "latest" ]; then brew install protobuf@3.1; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$PROTOBUF" != "latest" ]; then brew link -f protobuf@3.1; export PKG_CONFIG_PATH=/usr/local/opt/protobuf@3.1/lib/pkgconfig; brew install --build-from-source --ignore-dependencies --env=std protobuf-c; fi # When protobuf is not on the latest release
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir -p ${HOME}/Library/Python/2.7/lib/python/site-packages; echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> ${HOME}/Library/Python/2.7/lib/python/site-packages/homebrew.pth; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$CPPUNIT" != "1.14" ]; then brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e6e43cf6a3%5E/Formula/cppunit.rb; fi # install a slightly older cppunit, as latest needs C++11 support
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$CPPUNIT" == "1.14" ]; then brew install cppunit; fi # install the latest cppunit, which needs C++11
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=/usr/local/opt/ccache/libexec:$PATH; fi # Use ccache on Mac too
#Coverity doesn't work with g++ 5 or 6, so only upgrade to g++ 4.9 for that
- if [ "$TRAVIS_OS_NAME" == "linux" -a \( "$TASK" = "compile" -o "$TASK" = "coverage" -o "$TASK" = "doxygen" \) -a "$CXX" = "g++" ]; then export CXX="ccache g++-8" CC="ccache gcc-8"; fi
- if [ "$TASK" = "coverity" -a "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
#Use the latest clang if we're compiling with clang
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$CXX" = "clang++" ]; then export CXX="clang++-6.0" CC="clang-6.0"; fi
#Report the compiler version
- $CXX --version
- if [ "$TASK" == "spellintian" -o "$TASK" == "spellintian-duplicates" ]; then wget "http://archive.ubuntu.com/ubuntu/pool/main/l/lintian/lintian_2.5.104_all.deb"; sudo dpkg -i lintian_*.deb; sudo apt-get install -f -y; fi # Install a later lintian
after_failure:
# Disabled as otherwise the logfile is too big
# - if [ -f ${TRAVIS_BUILD_DIR}/config.log ]; then cat ${TRAVIS_BUILD_DIR}/config.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/config.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/config.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/config.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/config.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/test-suite.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/test-suite.log; fi
- if [ -f ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/test-suite.log ]; then cat ${TRAVIS_BUILD_DIR}/ola-*/_build/sub/test-suite.log; fi
after_success:
- if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-8 -b . -E '.*Test\.cpp$' -E '.*\.pb\.cc$' -E '.*\.pb\.cpp$' -E '.*\.pb\.h$' -E '.*\.yy\.cpp$' -E '.*\.tab\.cpp$' -E '.*\.tab\.h$' -E '.*/doxygen/examples.*$' --gcov-options '\-lp' > /dev/null; fi
after_script:
- if [ "$TASK" = "coverity" ]; then tail -n 10000 ${TRAVIS_BUILD_DIR}/cov-int/build-log.txt; cat ${TRAVIS_BUILD_DIR}/cov-int/scm_log.txt; fi
notifications:
irc:
channels:
- "chat.freenode.net#openlighting"
on_success: change
on_failure: change
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。