2018-01-24 04:23:11 +08:00
|
|
|
################
|
2018-01-30 18:07:27 +08:00
|
|
|
# Config
|
2018-01-24 04:23:11 +08:00
|
|
|
################
|
|
|
|
|
|
|
|
|
|
# C++ project
|
|
|
|
|
language: cpp
|
|
|
|
|
|
|
|
|
|
dist: trusty
|
|
|
|
|
sudo: required
|
|
|
|
|
group: edge
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
################
|
2018-01-30 18:07:27 +08:00
|
|
|
# Services
|
|
|
|
|
################
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
- docker
|
|
|
|
|
|
|
|
|
|
################
|
|
|
|
|
# Build matrix
|
2018-01-24 04:23:11 +08:00
|
|
|
################
|
|
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
|
|
|
|
|
################
|
|
|
|
|
# Linux / GCC
|
|
|
|
|
################
|
|
|
|
|
|
2018-01-31 23:42:19 +08:00
|
|
|
- os: linux
|
|
|
|
|
compiler: gcc
|
|
|
|
|
env:
|
|
|
|
|
- COMPILER_PACKAGE=g++-5
|
|
|
|
|
- C_COMPILER=gcc-5
|
|
|
|
|
- CXX_COMPILER=g++-5
|
|
|
|
|
- CXXFLAGS=-std=c++11
|
|
|
|
|
|
2018-01-24 04:23:11 +08:00
|
|
|
- os: linux
|
2018-07-17 16:37:34 +08:00
|
|
|
compiler: gcc
|
2018-01-30 18:07:27 +08:00
|
|
|
env:
|
|
|
|
|
- COMPILER_PACKAGE=g++-6
|
|
|
|
|
- C_COMPILER=gcc-6
|
|
|
|
|
- CXX_COMPILER=g++-6
|
2018-01-24 04:23:11 +08:00
|
|
|
|
|
|
|
|
- os: linux
|
|
|
|
|
compiler: gcc
|
2018-01-30 18:07:27 +08:00
|
|
|
env:
|
|
|
|
|
- COMPILER_PACKAGE=g++-7
|
|
|
|
|
- C_COMPILER=gcc-7
|
|
|
|
|
- CXX_COMPILER=g++-7
|
2018-07-17 16:37:34 +08:00
|
|
|
|
|
|
|
|
- os: linux
|
|
|
|
|
compiler: gcc
|
|
|
|
|
env:
|
|
|
|
|
- COMPILER_PACKAGE=g++-8
|
|
|
|
|
- C_COMPILER=gcc-8
|
|
|
|
|
- CXX_COMPILER=g++-8
|
2018-01-24 04:23:11 +08:00
|
|
|
|
|
|
|
|
################
|
|
|
|
|
# Linux / Clang
|
|
|
|
|
################
|
|
|
|
|
|
|
|
|
|
- os: linux
|
2018-01-30 18:07:27 +08:00
|
|
|
env:
|
|
|
|
|
- COMPILER_PACKAGE=clang-4.0
|
|
|
|
|
- C_COMPILER=clang-4.0
|
|
|
|
|
- CXX_COMPILER=clang++-4.0
|
2018-01-24 04:23:11 +08:00
|
|
|
|
|
|
|
|
- os: linux
|
2018-01-30 18:07:27 +08:00
|
|
|
env:
|
|
|
|
|
- COMPILER_PACKAGE=clang-5.0
|
|
|
|
|
- C_COMPILER=clang-5.0
|
|
|
|
|
- CXX_COMPILER=clang++-5.0
|
2018-07-17 16:37:34 +08:00
|
|
|
|
|
|
|
|
- os: linux
|
|
|
|
|
env:
|
|
|
|
|
- COMPILER_PACKAGE=clang-6.0
|
|
|
|
|
- C_COMPILER=clang-6.0
|
|
|
|
|
- CXX_COMPILER=clang++-6.0
|
2018-01-30 18:07:27 +08:00
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
|
|
|
|
|
|
# Show OS/compiler version (this may not be the same OS as the Docker container)
|
|
|
|
|
- uname -a
|
|
|
|
|
|
|
|
|
|
# Use an artful container - gives us access to latest compilers.
|
2018-07-17 16:37:34 +08:00
|
|
|
- docker run -d --name ubuntu-test-container -v $(pwd):/travis ubuntu:bionic tail -f /dev/null
|
2018-01-30 18:07:27 +08:00
|
|
|
- docker ps
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
|
|
|
|
|
# Create our container
|
|
|
|
|
- docker exec -t ubuntu-test-container bash -c "apt-get update -y &&
|
|
|
|
|
apt-get --no-install-recommends install -y software-properties-common cmake
|
|
|
|
|
ninja-build libboost-all-dev libev-dev libuv1-dev ninja-build $COMPILER_PACKAGE &&
|
|
|
|
|
apt-get -y clean && rm -rf /var/lib/apt/lists/*"
|
2018-01-24 04:23:11 +08:00
|
|
|
|
|
|
|
|
################
|
2018-01-30 18:07:27 +08:00
|
|
|
# Build / Test
|
2018-01-24 04:23:11 +08:00
|
|
|
################
|
|
|
|
|
|
|
|
|
|
script:
|
|
|
|
|
|
2018-01-30 18:07:27 +08:00
|
|
|
# Run the container that we created and build the code
|
|
|
|
|
- docker exec -t ubuntu-test-container bash -c "cd /travis &&
|
|
|
|
|
export CC=/usr/bin/$C_COMPILER &&
|
|
|
|
|
export CXX=/usr/bin/$CXX_COMPILER &&
|
|
|
|
|
mkdir build.release && cd build.release &&
|
2018-01-31 23:42:19 +08:00
|
|
|
cmake ${CMAKE_OPTIONS} -DAMQP-CPP_BUILD_EXAMPLES=ON -DAMQP-CPP_LINUX_TCP=ON -GNinja .. &&
|
|
|
|
|
cmake --config Release --build . &&
|
2018-01-30 18:07:27 +08:00
|
|
|
cd .."
|