• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1matrix:
2  include:
3
4    # ICU4C Docs Build
5    #    TODO: publish the latest built docs from master on GitHub pages.
6    #          See https://gist.github.com/vidavidorra/548ffbcdae99d752da02 for ideas.
7    - name:     "c: docs"
8      dist:     xenial
9      language: cpp
10      addons:
11         apt:
12           update: true
13           packages:
14             - doxygen
15      before_script:
16        - cd icu4c/source
17        - ./runConfigureICU Linux --disable-renaming
18      script:
19        # fail if 'warning:' appears in doxygen's output, but ignore warnings from file Doxyfile.
20        # The Doxygen version from Travis is down-rev, and doesn't recognize some options
21        # in the Doxyfile config file.
22        # Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present.
23        - set +o pipefail && make doc 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file Doxyfile)' doxygen.log )
24
25
26    - name: "j"
27      language: java
28      addons:
29        apt:
30          packages:
31            - ant
32            - ant-optional
33      env:      BUILD=ICU4J
34      before_script:
35        - cd icu4j
36        - ant init
37      script:
38        - ant check
39      after_failure:
40          -  cat `find out/junit-results -name "*.txt" -exec grep -l FAILED {} \;`
41
42    - name: "c: linux gcc 8 Wextra"
43      dist:     bionic
44      language: cpp
45      addons:
46         apt:
47           packages:
48             - g++-8
49      env: PREFIX=/tmp/icu-prefix CC=gcc-8 CXX=g++-8 CXXFLAGS="-Wextra"
50      before_script:
51        - mkdir build
52        - cd build
53        - ../icu4c/source/runConfigureICU Linux --disable-debug --enable-release --disable-layoutex --prefix="${PREFIX}" || (tail -100 config.log ; false)
54        - make -j2
55      script:
56        - make -j2 check
57        - make install
58        - PATH="${PREFIX}/bin:$PATH" make -C test/hdrtst check
59
60    # gcc debug build.
61    # Includes dependency checker.
62    # Note - the dependency checker needs to be run on both a debug and an optimized build.
63    # This one (gcc) for debug, and linux clang (below) for optimized.
64    #
65    # Test both out-of-source and in-source builds. This one (gcc) for out-of-source,
66    # and linux clang (below) for in-source.
67    #
68    # Invokes test/hdrtst to check public headers compliance.
69
70    - name: "c: linux gcc"
71      dist:     xenial
72      language: cpp
73      compiler: gcc
74      env:      PREFIX=/tmp/icu-prefix
75      before_script:
76        - mkdir build
77        - cd build
78        - ../icu4c/source/runConfigureICU --enable-debug --disable-release Linux --prefix="${PREFIX}" --enable-tracing
79        - make -j2
80      script:
81        - make -j2 check
82        - ( cd ../icu4c/source/test/depstest && ./depstest.py ../../../../build/ )
83        - make install
84        - PATH="${PREFIX}/bin:$PATH" make -C test/hdrtst check
85
86    # clang release build with some options to enforce useful constraints.
87    # Includes dependency checker on an in-source, optimized build.
88    # Includes checking @draft etc. API tags vs. ifndef guards like
89    # U_HIDE_DRAFT_API and U_FORCE_HIDE_DRAFT_API.
90    # (FORCE guards make this tool pass but won't compile to working code.
91    # See the testtagsguards.sh script for details.)
92    - name: "c: linux clang"
93      dist:     xenial
94      language: cpp
95      env:
96        - CPPFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
97        - CFLAGS="-Wimplicit-fallthrough"
98        - CXXFLAGS="-Wimplicit-fallthrough"
99      compiler: clang
100      before_install:
101        - sudo apt-get -y install doxygen  # for make dist
102      before_script:
103        - cd icu4c/source
104        - ./runConfigureICU Linux
105        - make -j2
106      script:
107        - make -j2 check
108        - ( cd test/depstest && python3 depstest.py ../../../source/ )
109        - ( cd .. && source/test/hdrtst/testtagsguards.sh )
110        - make dist # not sure if this is -j safe everywhere.
111
112    - name: "c: osx clang"
113      language: cpp
114      env:      BUILD=MACINTOSH
115      os:       osx
116      compiler: clang
117      # Use the macOS target to test Python 2 in data build script.
118      # TODO(ICU-20301): Change this back to the default Python version 3.
119      script:   cd icu4c/source && PYTHON=python2 ./runConfigureICU MacOSX && make -j2 check
120
121    # Clang Linux with address sanitizer.
122    # Note - the 'sudo: true' option forces Travis to use a Virtual machine on GCE instead of
123    #        a Container on EC2 or Packet. Asan builds of ICU fail otherwise.
124    - name: "c: linux asan"
125      language: cpp
126      env:
127        - CPPFLAGS="-fsanitize=address"
128        - LDFLAGS="-fsanitize=address"
129      os:       linux
130      dist:     xenial
131      sudo:     true
132      compiler: clang
133      before_script:
134        - cd icu4c/source
135        - ./runConfigureICU --enable-debug --disable-release Linux --disable-renaming --enable-tracing
136        - make -j2
137      script:
138        - make -j2 check
139
140
141    # Clang Linux with thread sanitizer.
142    #
143    - name: "c: linux tsan"
144      language: cpp
145      env:
146          - INTLTEST_OPTS="utility/MultithreadTest"
147          - CPPFLAGS="-fsanitize=thread"
148          - LDFLAGS=-fsanitize=thread
149      os:       linux
150      dist:     xenial
151      sudo:     true
152      compiler: clang
153      script:
154          - cd icu4c/source
155          - ./runConfigureICU --enable-debug --disable-release Linux --disable-renaming
156          - make -j2
157          - make -j2 -C test
158          - make -j2 -C test/intltest check
159
160    # copyright scan / future linter
161    - name: "lint"
162      script:
163          - perl tools/scripts/cpysearch/cpyscan.pl
164
165    - name: "j: icu4c release tools"
166      language: "java"
167      script:
168        - mvn -f tools/release/java/pom.xml package dependency:analyze
169      cache:
170        directories:
171        - $HOME/.m2
172