-
Notifications
You must be signed in to change notification settings - Fork 342
/
.travis.yml
119 lines (92 loc) · 2.4 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
################
# Config
################
# C++ project
language: cpp
dist: trusty
sudo: required
group: edge
################
# Services
################
services:
- docker
################
# Build matrix
################
matrix:
include:
################
# Linux / GCC
################
- os: linux
compiler: gcc
env:
- COMPILER_PACKAGE=g++-7
- C_COMPILER=gcc-7
- CXX_COMPILER=g++-7
- os: linux
compiler: gcc
env:
- COMPILER_PACKAGE=g++-8
- C_COMPILER=gcc-8
- CXX_COMPILER=g++-8
- os: linux
compiler: gcc
env:
- COMPILER_PACKAGE=g++-9
- C_COMPILER=gcc-9
- CXX_COMPILER=g++-9
- os: linux
compiler: gcc
env:
- COMPILER_PACKAGE=g++-10
- C_COMPILER=gcc-10
- CXX_COMPILER=g++-10
################
# Linux / Clang
################
- os: linux
env:
- COMPILER_PACKAGE=clang-7
- C_COMPILER=clang-7
- CXX_COMPILER=clang++-7
- os: linux
env:
- COMPILER_PACKAGE=clang-8
- C_COMPILER=clang-8
- CXX_COMPILER=clang++-8
- os: linux
env:
- COMPILER_PACKAGE=clang-9
- C_COMPILER=clang-9
- CXX_COMPILER=clang++-9
- os: linux
env:
- COMPILER_PACKAGE=clang-10
- C_COMPILER=clang-10
- CXX_COMPILER=clang++-10
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.
- docker run -e "DEBIAN_FRONTEND=noninteractive" -d --name ubuntu-test-container -v $(pwd):/travis ubuntu:focal tail -f /dev/null
- 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 libssl-dev $COMPILER_PACKAGE &&
apt-get -y clean && rm -rf /var/lib/apt/lists/*"
################
# Build / Test
################
script:
# 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 &&
cmake ${CMAKE_OPTIONS} -DAMQP-CPP_BUILD_EXAMPLES=ON -DAMQP-CPP_LINUX_TCP=ON --config Release -GNinja .. &&
cmake --build . &&
cd .."