forked from cpputest/cpputest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
196 lines (172 loc) · 5.22 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
# Global environment
language: cpp
os: linux
dist: bionic
# Avoid double build because of the tagging in the build.
branches:
except:
- latest-passing-build
# Build stages and the conditionals for the stages
stages:
- name: extensive daily tests
if: type = cron
- name: basic build & test
if: type != cron
- name: extended build & test
if: type != cron
- name: deploy latest
if: "(NOT type IN (pull_request)) AND (branch = master) AND (type != cron)"
jobs:
include:
# Basic builds
# Mac OSX
- stage: basic build & test
compiler: gcc
os: osx
env: BUILD=autotools
- compiler: clang
env: BUILD=autotools
os: osx
# Windows
- compiler: msbuild
os: windows
env: BUILD=vc_windows CPP_STD=17
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- VCTargetsPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets"
# Linux
- compiler: gcc
env: BUILD=cmake CPP_STD=17
- compiler: gcc
env: BUILD=autotools
- compiler: clang
env: BUILD=autotools
# Extended builds, different C++ version and build tools
- stage: extended build & test
# Mac OSX
compiler: clang
os: osx
env: BUILD=cmake CPP_STD=17
- compiler: gcc
os: osx
env: BUILD=cmake CPP_STD=14
# Linux
# CMake different C++ versions with clang
- compiler: clang
env: BUILD=cmake CPP_STD=98
- compiler: clang
env: BUILD=cmake CPP_STD=11
- compiler: clang
env: BUILD=cmake CPP_STD=14
- compiler: clang
env: BUILD=cmake CPP_STD=17
# CMake different C++ versions with gcc
- compiler: gcc
env: BUILD=cmake CPP_STD=98
- compiler: gcc
env: BUILD=cmake CPP_STD=11
- compiler: gcc
env: BUILD=cmake CPP_STD=14
- compiler: gcc
env: BUILD=cmake CPP_STD=17
# New compilers can be added here. Need to be cleared when compiler becomes standard
- compiler: gcc
env: BUILD=cmake CPP_STD=17
- CC=gcc-10
- CXX=g++-10
addons:
apt:
packages: ['g++-10']
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- compiler: clang
env: BUILD=cmake CPP_STD=17
- CC=clang-11
- CXX=clang++-11
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages: ['clang-11', 'libc++-11-dev', 'libc++abi-11-dev']
# Specific other tests
- compiler: gcc
env: BUILD=test_report
addons:
apt:
packages:
- ant-optional
- compiler: gcc
env: BUILD=cmake_coverage
- compiler: gcc
env: BUILD=cmake_gtest
- compiler: clang
env: BUILD=autotools_gtest
- compiler: gcc
env: BUILD=autotools_cmake_install_test
# MS DOS Build
- env: BUILD=make_dos
addons:
apt:
packages:
- dosbox
# Docker images. Need to be cleared at times
- env: BUILD=docker_ubuntu_autotools
- env: BUILD=docker_ubuntu_dos
- env: BUILD=autotools_dist
- stage: extensive daily tests
compiler: gcc
env: BUILD=extensive_check
- compiler: clang
env: BUILD=extensive_check
- arch: ppc64le
compiler: gcc
env: BUILD=autotools
- arch: s390x
compiler: gcc
env: BUILD=autotools
- arch: arm64
compiler: gcc
env: BUILD=autotools
- compiler: gcc
env: BUILD=makefileworker
- compiler: clang
env: BUILD=autotools_install_and_test_examples
# Deploy to github releases
- stage: deploy latest
env: BUILD=autotools_dist
script:
- export DATE=`date`
- git tag -f latest-passing-build -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER at $DATE"
- git push -f https://cpputest-travis:[email protected]/cpputest/cpputest.git --tags
- ../scripts/travis_ci_build.sh
- pwd
- ls
deploy:
provider: releases
#:
edge: true
token: $GH_TOKEN
tag_name: latest-passing-build
name: Latest passing build
release_notes: "This is the automatic release from Travis CI.\n\nWhenever a build passes, it gets released as Latest Passing Build.\n\nBuild number: $TRAVIS_BUILD_NUMBER\nDate: $DATE\nLog: $TRAVIS_BUILD_WEB_URL"
file:
- cpputest-latest.tar.gz
- cpputest-latest.zip
overwrite: true
on:
tags: false
before_script:
- export CPPUTEST_BUILD_DIR=$TRAVIS_BUILD_DIR/cpputest_build
- mkdir -p $CPPUTEST_BUILD_DIR && cd $CPPUTEST_BUILD_DIR
script:
- "../scripts/travis_ci_build.sh"
after_failure:
- "../scripts/travis_ci_after.sh"
after_success:
- "../scripts/travis_ci_after.sh"
notifications:
slack:
secure: oOx4AGIiJB+j1pkIxlLeQh5qp7TF89Sj+3RzJRQuo6z0HocTz9yJgXPlDh1H9rLj5SxK/UKsk+WFafVuPdWakQ40LeYO49C/+e+mCDcS0ujLka6dvIE8v0SEb1PuaAGjJWdhiviAhSqu9YOKPYZs37lD3oqepuEpxeiXwsur9QU=
env:
global:
secure: H6djbn5YP1P62n//ergaRZ4lIkneCzWp1Ok4F71kvvNiwlRzYDGll4kJT6MhVq6bBHeR81W/lwUd+RdjyqsJpVhj7DHXC/0k0h0xpAAm7LUhOl+6mIII1uhcMFqbeHvilwvDCzTQ6qv8Mzd1g0QfUECrmti9/U+/TTFJG0r0Zuc=