forked from 42ity/fty-srr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
217 lines (197 loc) · 7.25 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# Travis CI script
# This is a skeleton created by zproject.
# You can add hand-written code here.
language:
- cpp
cache:
- ccache
os:
- linux
#Sudo is need because we need to be able to install package for the depencies using apt-get
sudo: required
# The default distro for env:/matrix:/* and unspecified-dist matrix:/* tests;
# for the latter see also addons/apt/sources with the package repos in use.
# See https://docs.travis-ci.com/user/reference/overview/ for up-to-date
# allowed values of "dist" supported by the Travis CI service.
dist:
- xenial
#services:
#- docker
# Set CI_TIME=true to enable build-step profiling in Travis
# Set CI_TRACE=true to enable shell script tracing in Travis
# Set CI_CONFIG_QUIET=true to enable "configure --quiet" (only report stderr)
# Set CI_REQUIRE_GOOD_GITIGNORE=false to NOT fail if "git status -s" is not clean
# Set CI_REQUIRE_GOOD_CLANG_FORMAT=true to fail if "clang-format" check is not clean
env:
global:
- CI_TIME=false
- CI_TRACE=false
- CI_CONFIG_QUIET=true
- CI_REQUIRE_GOOD_GITIGNORE=true
- CI_REQUIRE_GOOD_CLANG_FORMAT=true
- CI_TEST_DISTCHECK=true
# tokens to deploy releases on OBS and create/delete temporary branch on Github.
# 1) Create a token on https://github.com/settings/tokens/new with "public_repo"
# capability and encrypt it with travis encrypt --org -r <org>/<repo> GH_TOKEN="<token>"
# 2) Create 2 OBS tokens with osc token --create network:messaging:zeromq:release-<stable|draft> <project>
# encrypt them with travis encrypt --org -r <org>/<repo> OBS_<STABLE|DRAFT>_TOKEN="<token>"
# 3) Uncomment the three "secure" lines and paste the three generated hashed
# strings, which include each token's name, as parameters
#- secure:
#- secure:
#- secure:
matrix:
- BUILD_TYPE=default
- BUILD_TYPE=default-Werror
### Note: we don't use CMake
# - BUILD_TYPE=cmake
# - BUILD_TYPE=android
# - BUILD_TYPE=check-py
# Prerequisite packages provided by OS distro and used "as is"
pkg_deps_prereqs_distro: &pkg_deps_prereqs_distro
# Prerequisite packages that may be built from source or used from
# prebuilt packages of that source (usually not from an OS distro)
pkg_deps_prereqs_source: &pkg_deps_prereqs_source
- libfty-common-logging-dev
- cxxtools-dev
- libfty-common-dev
- libfty-common-mlm-dev
- libfty-common-messagebus-dev
- libfty-common-dto-dev
- protobuf-dev
# NOTE: Our forks are checked out and built without pkg dependencies in use
pkg_deps_prereqs: &pkg_deps_prereqs
# - *pkg_deps_prereqs_source
- *pkg_deps_prereqs_distro
pkg_deps_doctools: &pkg_deps_doctools
- asciidoc
- xmlto
pkg_deps_devtools: &pkg_deps_devtools
- git
# NOTE: Unlike earlier zproject versions, the pkg_src* objects below do not
# start with a dash, due to peculiarities of YAML alias dereferencing in Travis
# dist==trusty means ubuntu14
pkg_src_zeromq_ubuntu14: &pkg_src_zeromq_ubuntu14
sourceline: 'deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_14.04/ ./'
key_url: 'http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_14.04/Release.key'
# dist==xenial means ubuntu16
pkg_src_zeromq_ubuntu16: &pkg_src_zeromq_ubuntu16
sourceline: 'deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_16.04/ ./'
key_url: 'http://download.opensuse.org/repositories/network:/messaging:/zeromq:/git-draft/xUbuntu_16.04/Release.key'
pkg_deps_common: &pkg_deps_common
- *pkg_deps_devtools
- *pkg_deps_prereqs
# Also note that as of early 2017, either dist==trusty or services==docker
# is needed for some C++11 support; docker envs are usually faster to start up
# A newer dist==xenial completes the C++11 support with gcc-5+
addons:
apt:
packages:
- *pkg_deps_common
matrix:
include:
- env: BUILD_TYPE=default-with-docs
os: linux
addons:
apt:
packages:
- *pkg_deps_common
- *pkg_deps_doctools
- env: BUILD_TYPE=valgrind
os: linux
addons:
apt:
packages:
- valgrind
- *pkg_deps_common
- env: BUILD_TYPE=default ADDRESS_SANITIZER=enabled
os: linux
addons:
apt:
packages:
- *pkg_deps_common
# Shadow-compilation setups below inspired by https://docs.travis-ci.com/user/languages/cpp/
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9 && export CC CXX"
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *pkg_deps_common
- g++-4.9
- gcc-4.9
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && export CC CXX"
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *pkg_deps_common
- g++-5
- gcc-5
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-6 && CXX=g++-6 && export CC CXX"
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *pkg_deps_common
- g++-6
- gcc-6
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && export CC CXX"
os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *pkg_deps_common
- g++-7
- gcc-7
### Note: we don't use CMake
# - env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=clang-format-5.0
# For non-cmake users, there is an autotools solution with a bit more overhead
# to have dependencies ready and pass configure script before making this check).
# Note that the autotools variant will also require dependencies preinstalled to
# pass its configure script:
- env: BUILD_TYPE=clang-format-check CLANG_FORMAT=clang-format-5.0
os: linux
dist: xenial
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
- clang-format-5.0
- *pkg_deps_prereqs
# Note: "env" lines below must exactly describe a matrix option defined above
allow_failures:
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9 && export CC CXX"
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && export CC CXX"
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-6 && CXX=g++-6 && export CC CXX"
- env: BUILD_TYPE=default-Werror MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && export CC CXX"
# - env: BUILD_TYPE=cmake DO_CLANG_FORMAT_CHECK=1 CLANG_FORMAT=clang-format-5.0
- env: BUILD_TYPE=clang-format-check CLANG_FORMAT=clang-format-5.0
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$BUILD_TYPE" == "android" ] ; then brew install binutils ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$BUILD_TYPE" == "valgrind" ] ; then brew install valgrind ; fi
- if [ -n "${MATRIX_EVAL}" ] ; then eval ${MATRIX_EVAL} ; fi
# Hand off to generated script for each BUILD_TYPE
script: ./ci_build.sh
before_deploy: . ./ci_deploy.sh && ./ci_deploy_obs.sh
deploy:
provider: releases
api_key:
# To encrypt your access token run: `travis encrypt -r user/repo`
secure: <encrypted github access token>
file_glob: true
file: ${FTY_SRR_DEPLOYMENT}
skip_cleanup: true
on:
branch: master
tags: true
condition: $TRAVIS_OS_NAME =~ (linux) && $BUILD_TYPE =~ (default)