-
Notifications
You must be signed in to change notification settings - Fork 81
/
.travis.yml
137 lines (116 loc) · 3.15 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
# Based on https://habrahabr.ru/post/329264/
# Additional GCC / clang versions:
# - https://docs.travis-ci.com/user/languages/cpp/
# - https://gist.github.com/nabijaczleweli/e53219d037c4ccb34f3c
# Useful samples:
# - https://github.com/catchorg/Catch2/blob/master/.travis.yml
# - https://github.com/pinam45/dynamic_bitset/blob/master/.travis.yml
#
dist: focal
language: cpp
git:
#depth: 1
submodules: true
cache:
apt: true
addons:
#apt:
#sources: &apt_sources
# - ubuntu-toolchain-r-test
#packages:
# - meson
# - g++-5
homebrew: &homebrew
packages:
- python
- ffmpeg
- meson
# Is there any way to avoid duplication for combination of BUILD_CONFIGURATION and COMPILER?
# in case, when non-default compiler is used?
jobs:
include:
# GCC 10 / Debug
- os: linux
addons: &gcc10
apt:
#sources: *apt_sources
packages:
- g++-10
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TYPE=Debug && CC=gcc-10 && CXX=g++-10"
# GCC 10 / Release
- os: linux
addons: *gcc10
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TYPE=Release && CC=gcc-10 && CXX=g++-10"
# GCC 7 / Debug
- os: linux
addons: &gcc7
apt:
#sources: *apt_sources
packages:
- g++-7
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TYPE=Debug && CC=gcc-7 && CXX=g++-7"
# GCC 7 / Release
- os: linux
addons: *gcc7
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TYPE=Release && CC=gcc-7 && CXX=g++-7"
# Xenial, GCC 5.4
- os: linux
dist: xenial
compiler: gcc
env:
- MATRIX_EVAL="BUILD_TYPE=Release && SKIP_MESON=yes"
- os: osx
osx_image: xcode11.3
compiler: clang
env:
- MATRIX_EVAL="BUILD_TYPE=Debug"
- os: osx
osx_image: xcode11.3
compiler: clang
env:
- MATRIX_EVAL="BUILD_TYPE=Release"
# exclude:
# exclude some elements from build matrix:
# - os: osx
# compiler: gcc
#- compiler: gcc
# env: BUILD_CONFIGURATION=Debug
#- compiler: gcc
# env: BUILD_CONFIGURATION=Release
#before_install:
# - eval "${MATRIX_EVAL}"
install:
# setup env:
- eval "${MATRIX_EVAL}"
- source ci/travis/install-$TRAVIS_OS_NAME.sh
script:
- eval "${MATRIX_EVAL}"
# build and test project with cmake:
- mkdir cmake-build
- cd cmake-build
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- cmake --build .
- ctest --output-on-failure
- cd ..
# build and test project with meson:
- source ci/travis/meson-build.sh
#deploy:
# # push tagged-commits to GitHub Releases:
# provider: releases
# file: <package-file>
# skip_cleanup: true
# overwrite: true
#
# api_key:
# secure: <encrypted-github-token>
#
# on:
# tags: true