2018-08-05 22:30:52 +02:00
|
|
|
language: c
|
|
|
|
|
|
|
|
# Platform descriptions
|
|
|
|
# NOTE: These can be used in creating the build matrix by making use of the
|
|
|
|
# anchor/alias YAML features.
|
|
|
|
linux_gcc8: &linux_gcc8
|
|
|
|
os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
update: true
|
|
|
|
sources: [ ubuntu-toolchain-r-test ]
|
|
|
|
packages: [ gcc-8 g++-8 oracle-java8-set-default maven ]
|
|
|
|
|
|
|
|
linux_clang60: &linux_clang60
|
|
|
|
os: linux
|
|
|
|
compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
update: true
|
|
|
|
sources: [ llvm-toolchain-trusty-6.0, ubuntu-toolchain-r-test ]
|
|
|
|
packages: [ clang-6.0 oracle-java8-set-default maven ]
|
|
|
|
|
|
|
|
osx_xcode94: &osx_xcode94
|
|
|
|
os: osx
|
|
|
|
osx_image: xcode94
|
|
|
|
compiler: clang
|
|
|
|
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- <<: *linux_gcc8
|
2019-01-18 14:19:22 +01:00
|
|
|
env: [ BUILD_TYPE=Debug, C_COMPILER=gcc-8, CXX_COMPILER=g++-8, USE_SANITIZER=none ]
|
2018-08-05 22:30:52 +02:00
|
|
|
- <<: *linux_gcc8
|
2019-01-18 14:19:22 +01:00
|
|
|
env: [ BUILD_TYPE=Release, C_COMPILER=gcc-8, CXX_COMPILER=g++-8, USE_SANITIZER=none ]
|
2018-08-05 22:30:52 +02:00
|
|
|
- <<: *linux_clang60
|
2019-01-18 14:19:22 +01:00
|
|
|
env: [ BUILD_TYPE=Debug, C_COMPILER=clang-6.0, CXX_COMPILER=clang++-6.0, USE_SANITIZER=address ]
|
2018-08-05 22:30:52 +02:00
|
|
|
- <<: *linux_clang60
|
2019-01-18 14:19:22 +01:00
|
|
|
env: [ BUILT_TYPE=Release, C_COMPILER=clang-6.0, CXX_COMPILER=clang++-6.0, USE_SANITIZER=none ]
|
2018-08-05 22:30:52 +02:00
|
|
|
- <<: *osx_xcode94
|
2019-01-18 14:19:22 +01:00
|
|
|
env: [ BUILD_TYPE=Debug, C_COMPILER=clang, CXX_COMPILER=clang++, USE_SANITIZER=address ]
|
2018-08-05 22:30:52 +02:00
|
|
|
- <<: *osx_xcode94
|
2019-01-18 14:19:22 +01:00
|
|
|
env: [ BUILD_TYPE=Release, C_COMPILER=clang, CXX_COMPILER=clang++, USE_SANITIZER=none ]
|
2018-08-05 22:30:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
- eval "export CC=${C_COMPILER}";
|
|
|
|
- eval "export CXX=${CXX_COMPILER}";
|
|
|
|
|
|
|
|
install:
|
|
|
|
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
|
|
|
|
brew install pyenv-virtualenv;
|
|
|
|
eval "$(pyenv init -)";
|
|
|
|
pyenv virtualenv conan;
|
|
|
|
pyenv rehash;
|
|
|
|
pyenv activate conan;
|
|
|
|
pip install conan --upgrade;
|
|
|
|
else
|
|
|
|
pip install conan --upgrade --user;
|
|
|
|
fi
|
|
|
|
- conan user
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
|
|
|
|
|
|
|
|
script:
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
|
|
|
- conan install ..
|
2019-01-18 14:19:22 +01:00
|
|
|
- cmake -DBUILD_TESTING=on -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DUSE_SANITIZER=${USE_SANITIZER} -DCMAKE_INSTALL_PREFIX=${PWD}/install ../src
|
|
|
|
- cmake --build . --target install
|
|
|
|
- mkdir install/share/CycloneDDS/examples/helloworld/build
|
|
|
|
- if [ "$USE_SANITIZER" = "none" ]; then
|
|
|
|
(cd install/share/CycloneDDS/examples/helloworld/build && cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. && cmake --build .) ;
|
|
|
|
else
|
|
|
|
(cd install/share/CycloneDDS/examples/helloworld/build && cmake -DCMAKE_C_FLAGS=-fsanitize=address -DCMAKE_LINKER_FLAGS=-fsanitize=address -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. && cmake --build .) ;
|
|
|
|
fi
|
2018-08-05 22:30:52 +02:00
|
|
|
- ctest -T test
|