forked from unicode-org/icu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
203 lines (187 loc) · 6.63 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
matrix:
include:
# ICU4C Docs Build
# TODO: publish the latest built docs from master on GitHub pages.
# See https://gist.github.com/vidavidorra/548ffbcdae99d752da02 for ideas.
- name: "c: docs"
dist: xenial
language: cpp
addons:
apt:
update: true
packages:
- doxygen
before_script:
- cd icu4c/source
- ./runConfigureICU Linux --disable-renaming
script:
# fail if 'warning:' appears in doxygen's output, but ignore warnings from file Doxyfile.
# The Doxygen version from Travis is down-rev, and doesn't recognize some options
# in the Doxyfile config file.
# Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present.
- set +o pipefail && make doc 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file Doxyfile)' doxygen.log )
- name: "j"
language: java
addons:
apt:
packages:
- ant
- ant-optional
env: BUILD=ICU4J
before_script:
- cd icu4j
- ant init
script:
- ant check
after_failure:
- cat `find out/junit-results -name "*.txt" -exec grep -l FAILED {} \;`
- name: "c: linux gcc 8 Wextra"
dist: bionic
language: cpp
addons:
apt:
packages:
- g++-8
env: PREFIX=/tmp/icu-prefix CC=gcc-8 CXX=g++-8 CXXFLAGS="-Wextra"
before_script:
- mkdir build
- cd build
- ../icu4c/source/runConfigureICU Linux --disable-debug --enable-release --disable-layoutex --prefix="${PREFIX}" || (tail -100 config.log ; false)
- make -j2
script:
- make -j2 check
- make install
- PATH="${PREFIX}/bin:$PATH" make -C test/hdrtst check
# gcc debug build.
# Includes dependency checker.
# Note - the dependency checker needs to be run on both a debug and an optimized build.
# This one (gcc) for debug, and linux clang (below) for optimized.
#
# Test both out-of-source and in-source builds. This one (gcc) for out-of-source,
# and linux clang (below) for in-source.
#
# Invokes test/hdrtst to check public headers compliance.
- name: "c: linux gcc (debug)"
dist: xenial
language: cpp
compiler: gcc
env: PREFIX=/tmp/icu-prefix
before_script:
- mkdir build
- cd build
- ../icu4c/source/runConfigureICU --enable-debug --disable-release Linux --prefix="${PREFIX}" --enable-tracing
- make -j2
script:
- make -j2 check
- ( cd ../icu4c/source/test/depstest && ./depstest.py ../../../../build/ )
- make install
- PATH="${PREFIX}/bin:$PATH" make -C test/hdrtst check
# clang release build with some options to enforce useful constraints.
# Includes dependency checker on an in-source, optimized build.
# Includes checking @draft etc. API tags vs. ifndef guards like
# U_HIDE_DRAFT_API and U_FORCE_HIDE_DRAFT_API.
# (FORCE guards make this tool pass but won't compile to working code.
# See the testtagsguards.sh script for details.)
- name: "c: linux clang"
dist: xenial
language: cpp
env:
- CPPFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
- CFLAGS="-Wimplicit-fallthrough"
- CXXFLAGS="-Wimplicit-fallthrough"
compiler: clang
before_install:
- sudo apt-get -y install doxygen # for make dist
before_script:
- cd icu4c/source
- ./runConfigureICU Linux
- make -j2
script:
- make -j2 check
- ( cd test/depstest && python3 depstest.py ../../../source/ )
- ( cd .. && source/test/hdrtst/testtagsguards.sh )
- make dist # not sure if this is -j safe everywhere.
- name: "c: osx clang"
language: cpp
env: BUILD=MACINTOSH
os: osx
compiler: clang
# Use the macOS target to test Python 2 in data build script.
# TODO(ICU-20301): Change this back to the default Python version 3.
script: cd icu4c/source && PYTHON=python2 ./runConfigureICU MacOSX && make -j2 check
# out of source gcc 8 build with c++14, runs icuinfo
- name: "c: linux gcc 8 c++14"
dist: bionic
language: cpp
addons:
apt:
packages:
- g++-8
env: PREFIX=/tmp/icu-prefix CC=gcc-8 CXX=g++-8 CXXFLAGS="-std=c++14"
before_script:
- mkdir build && cd build
- ../icu4c/source/runConfigureICU Linux --disable-layout --disable-layoutex --prefix="${PREFIX}"
- make -j2
script:
- make -j2 check && make install
- cd "${PREFIX}/bin" && LD_LIBRARY_PATH=../lib ./icuinfo
# Clang Linux with address sanitizer.
# Note - the 'sudo: true' option forces Travis to use a Virtual machine on GCE instead of
# a Container on EC2 or Packet. Asan builds of ICU fail otherwise.
- name: "c: linux asan (debug)"
language: cpp
env:
- CPPFLAGS="-fsanitize=address"
- LDFLAGS="-fsanitize=address"
os: linux
dist: xenial
sudo: true
compiler: clang
before_script:
- cd icu4c/source
- ./runConfigureICU --enable-debug --disable-release Linux --disable-renaming --enable-tracing
- make -j2
script:
- make -j2 check
# Clang Linux with thread sanitizer.
#
- name: "c: linux tsan (debug)"
language: cpp
env:
- INTLTEST_OPTS="utility/MultithreadTest"
- CPPFLAGS="-fsanitize=thread"
- LDFLAGS=-fsanitize=thread
os: linux
dist: xenial
sudo: true
compiler: clang
script:
- cd icu4c/source
- ./runConfigureICU --enable-debug --disable-release Linux --disable-renaming
- make -j2
- make -j2 -C test
- make -j2 -C test/intltest check
# copyright scan / future linter
- name: "lint"
script:
- perl tools/scripts/cpysearch/cpyscan.pl
- name: "j: icu4c release tools"
language: "java"
script:
- mvn -f tools/release/java/pom.xml package dependency:analyze
cache:
directories:
- $HOME/.m2
# Check compilation of internal headers.
- name: "internal header compilation check"
language: cpp
os: linux
before_script:
- cd icu4c/source
script:
- test/hdrtst/testinternalheaders.sh
# Check source files for valid UTF-8 and for absence of BOM.
- name: "UTF-8 and BOM check"
os: linux
script:
- tools/scripts/icu-file-utf8-check.py