12e5b6d6dSopenharmony_cimatrix:
22e5b6d6dSopenharmony_ci  include:
32e5b6d6dSopenharmony_ci
42e5b6d6dSopenharmony_ci    # ICU4C Docs Build
52e5b6d6dSopenharmony_ci    #    TODO: publish the latest built docs from master on GitHub pages.
62e5b6d6dSopenharmony_ci    #          See https://gist.github.com/vidavidorra/548ffbcdae99d752da02 for ideas.
72e5b6d6dSopenharmony_ci    - name:     "c: docs"
82e5b6d6dSopenharmony_ci      dist:     xenial
92e5b6d6dSopenharmony_ci      language: cpp
102e5b6d6dSopenharmony_ci      addons:
112e5b6d6dSopenharmony_ci         apt:
122e5b6d6dSopenharmony_ci           update: true
132e5b6d6dSopenharmony_ci           packages:
142e5b6d6dSopenharmony_ci             - doxygen
152e5b6d6dSopenharmony_ci      before_script:
162e5b6d6dSopenharmony_ci        - cd icu4c/source
172e5b6d6dSopenharmony_ci        - ./runConfigureICU Linux --disable-renaming
182e5b6d6dSopenharmony_ci      script:
192e5b6d6dSopenharmony_ci        # fail if 'warning:' appears in doxygen's output, but ignore warnings from file Doxyfile.
202e5b6d6dSopenharmony_ci        # The Doxygen version from Travis is down-rev, and doesn't recognize some options
212e5b6d6dSopenharmony_ci        # in the Doxyfile config file.
222e5b6d6dSopenharmony_ci        # Regex note: (?! ... ) is a negative lookahead. Succeed if the pattern is not present.
232e5b6d6dSopenharmony_ci        - set +o pipefail && make doc 2>&1 | tee doxygen.log && ( ! grep -P 'warning:(?! .* file Doxyfile)' doxygen.log )
242e5b6d6dSopenharmony_ci
252e5b6d6dSopenharmony_ci
262e5b6d6dSopenharmony_ci    - name: "j"
272e5b6d6dSopenharmony_ci      language: java
282e5b6d6dSopenharmony_ci      addons:
292e5b6d6dSopenharmony_ci        apt:
302e5b6d6dSopenharmony_ci          packages:
312e5b6d6dSopenharmony_ci            - ant
322e5b6d6dSopenharmony_ci            - ant-optional
332e5b6d6dSopenharmony_ci      env:      BUILD=ICU4J
342e5b6d6dSopenharmony_ci      before_script:
352e5b6d6dSopenharmony_ci        - cd icu4j
362e5b6d6dSopenharmony_ci        - ant init
372e5b6d6dSopenharmony_ci      script:
382e5b6d6dSopenharmony_ci        - ant check
392e5b6d6dSopenharmony_ci      after_failure:
402e5b6d6dSopenharmony_ci          -  cat `find out/junit-results -name "*.txt" -exec grep -l FAILED {} \;`
412e5b6d6dSopenharmony_ci
422e5b6d6dSopenharmony_ci    - name: "c: linux gcc 8 Wextra"
432e5b6d6dSopenharmony_ci      dist:     bionic
442e5b6d6dSopenharmony_ci      language: cpp
452e5b6d6dSopenharmony_ci      addons:
462e5b6d6dSopenharmony_ci         apt:
472e5b6d6dSopenharmony_ci           packages:
482e5b6d6dSopenharmony_ci             - g++-8
492e5b6d6dSopenharmony_ci      env: PREFIX=/tmp/icu-prefix CC=gcc-8 CXX=g++-8 CXXFLAGS="-Wextra"
502e5b6d6dSopenharmony_ci      before_script:
512e5b6d6dSopenharmony_ci        - mkdir build
522e5b6d6dSopenharmony_ci        - cd build
532e5b6d6dSopenharmony_ci        - ../icu4c/source/runConfigureICU Linux --disable-debug --enable-release --disable-layoutex --prefix="${PREFIX}" || (tail -100 config.log ; false)
542e5b6d6dSopenharmony_ci        - make -j2
552e5b6d6dSopenharmony_ci      script:
562e5b6d6dSopenharmony_ci        - make -j2 check
572e5b6d6dSopenharmony_ci        - make install
582e5b6d6dSopenharmony_ci        - PATH="${PREFIX}/bin:$PATH" make -C test/hdrtst check
592e5b6d6dSopenharmony_ci
602e5b6d6dSopenharmony_ci    # gcc debug build.
612e5b6d6dSopenharmony_ci    # Includes dependency checker.
622e5b6d6dSopenharmony_ci    # Note - the dependency checker needs to be run on both a debug and an optimized build.
632e5b6d6dSopenharmony_ci    # This one (gcc) for debug, and linux clang (below) for optimized.
642e5b6d6dSopenharmony_ci    #
652e5b6d6dSopenharmony_ci    # Test both out-of-source and in-source builds. This one (gcc) for out-of-source,
662e5b6d6dSopenharmony_ci    # and linux clang (below) for in-source.
672e5b6d6dSopenharmony_ci    #
682e5b6d6dSopenharmony_ci    # Invokes test/hdrtst to check public headers compliance.
692e5b6d6dSopenharmony_ci
702e5b6d6dSopenharmony_ci    - name: "c: linux gcc"
712e5b6d6dSopenharmony_ci      dist:     xenial
722e5b6d6dSopenharmony_ci      language: cpp
732e5b6d6dSopenharmony_ci      compiler: gcc
742e5b6d6dSopenharmony_ci      env:      PREFIX=/tmp/icu-prefix
752e5b6d6dSopenharmony_ci      before_script:
762e5b6d6dSopenharmony_ci        - mkdir build
772e5b6d6dSopenharmony_ci        - cd build
782e5b6d6dSopenharmony_ci        - ../icu4c/source/runConfigureICU --enable-debug --disable-release Linux --prefix="${PREFIX}" --enable-tracing
792e5b6d6dSopenharmony_ci        - make -j2
802e5b6d6dSopenharmony_ci      script:
812e5b6d6dSopenharmony_ci        - make -j2 check
822e5b6d6dSopenharmony_ci        - ( cd ../icu4c/source/test/depstest && ./depstest.py ../../../../build/ )
832e5b6d6dSopenharmony_ci        - make install
842e5b6d6dSopenharmony_ci        - PATH="${PREFIX}/bin:$PATH" make -C test/hdrtst check
852e5b6d6dSopenharmony_ci
862e5b6d6dSopenharmony_ci    # clang release build with some options to enforce useful constraints.
872e5b6d6dSopenharmony_ci    # Includes dependency checker on an in-source, optimized build.
882e5b6d6dSopenharmony_ci    # Includes checking @draft etc. API tags vs. ifndef guards like
892e5b6d6dSopenharmony_ci    # U_HIDE_DRAFT_API and U_FORCE_HIDE_DRAFT_API.
902e5b6d6dSopenharmony_ci    # (FORCE guards make this tool pass but won't compile to working code.
912e5b6d6dSopenharmony_ci    # See the testtagsguards.sh script for details.)
922e5b6d6dSopenharmony_ci    - name: "c: linux clang"
932e5b6d6dSopenharmony_ci      dist:     xenial
942e5b6d6dSopenharmony_ci      language: cpp
952e5b6d6dSopenharmony_ci      env:
962e5b6d6dSopenharmony_ci        - CPPFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
972e5b6d6dSopenharmony_ci        - CFLAGS="-Wimplicit-fallthrough"
982e5b6d6dSopenharmony_ci        - CXXFLAGS="-Wimplicit-fallthrough"
992e5b6d6dSopenharmony_ci      compiler: clang
1002e5b6d6dSopenharmony_ci      before_install:
1012e5b6d6dSopenharmony_ci        - sudo apt-get -y install doxygen  # for make dist
1022e5b6d6dSopenharmony_ci      before_script:
1032e5b6d6dSopenharmony_ci        - cd icu4c/source
1042e5b6d6dSopenharmony_ci        - ./runConfigureICU Linux
1052e5b6d6dSopenharmony_ci        - make -j2
1062e5b6d6dSopenharmony_ci      script:
1072e5b6d6dSopenharmony_ci        - make -j2 check
1082e5b6d6dSopenharmony_ci        - ( cd test/depstest && python3 depstest.py ../../../source/ )
1092e5b6d6dSopenharmony_ci        - ( cd .. && source/test/hdrtst/testtagsguards.sh )
1102e5b6d6dSopenharmony_ci        - make dist # not sure if this is -j safe everywhere.
1112e5b6d6dSopenharmony_ci
1122e5b6d6dSopenharmony_ci    - name: "c: osx clang"
1132e5b6d6dSopenharmony_ci      language: cpp
1142e5b6d6dSopenharmony_ci      env:      BUILD=MACINTOSH
1152e5b6d6dSopenharmony_ci      os:       osx
1162e5b6d6dSopenharmony_ci      compiler: clang
1172e5b6d6dSopenharmony_ci      # Use the macOS target to test Python 2 in data build script.
1182e5b6d6dSopenharmony_ci      # TODO(ICU-20301): Change this back to the default Python version 3.
1192e5b6d6dSopenharmony_ci      script:   cd icu4c/source && PYTHON=python2 ./runConfigureICU MacOSX && make -j2 check
1202e5b6d6dSopenharmony_ci
1212e5b6d6dSopenharmony_ci    # Clang Linux with address sanitizer.
1222e5b6d6dSopenharmony_ci    # Note - the 'sudo: true' option forces Travis to use a Virtual machine on GCE instead of
1232e5b6d6dSopenharmony_ci    #        a Container on EC2 or Packet. Asan builds of ICU fail otherwise.
1242e5b6d6dSopenharmony_ci    - name: "c: linux asan"
1252e5b6d6dSopenharmony_ci      language: cpp
1262e5b6d6dSopenharmony_ci      env:
1272e5b6d6dSopenharmony_ci        - CPPFLAGS="-fsanitize=address"
1282e5b6d6dSopenharmony_ci        - LDFLAGS="-fsanitize=address"
1292e5b6d6dSopenharmony_ci      os:       linux
1302e5b6d6dSopenharmony_ci      dist:     xenial
1312e5b6d6dSopenharmony_ci      sudo:     true
1322e5b6d6dSopenharmony_ci      compiler: clang
1332e5b6d6dSopenharmony_ci      before_script:
1342e5b6d6dSopenharmony_ci        - cd icu4c/source
1352e5b6d6dSopenharmony_ci        - ./runConfigureICU --enable-debug --disable-release Linux --disable-renaming --enable-tracing
1362e5b6d6dSopenharmony_ci        - make -j2
1372e5b6d6dSopenharmony_ci      script:
1382e5b6d6dSopenharmony_ci        - make -j2 check
1392e5b6d6dSopenharmony_ci
1402e5b6d6dSopenharmony_ci
1412e5b6d6dSopenharmony_ci    # Clang Linux with thread sanitizer.
1422e5b6d6dSopenharmony_ci    #
1432e5b6d6dSopenharmony_ci    - name: "c: linux tsan"
1442e5b6d6dSopenharmony_ci      language: cpp
1452e5b6d6dSopenharmony_ci      env:
1462e5b6d6dSopenharmony_ci          - INTLTEST_OPTS="utility/MultithreadTest"
1472e5b6d6dSopenharmony_ci          - CPPFLAGS="-fsanitize=thread"
1482e5b6d6dSopenharmony_ci          - LDFLAGS=-fsanitize=thread
1492e5b6d6dSopenharmony_ci      os:       linux
1502e5b6d6dSopenharmony_ci      dist:     xenial
1512e5b6d6dSopenharmony_ci      sudo:     true
1522e5b6d6dSopenharmony_ci      compiler: clang
1532e5b6d6dSopenharmony_ci      script:
1542e5b6d6dSopenharmony_ci          - cd icu4c/source
1552e5b6d6dSopenharmony_ci          - ./runConfigureICU --enable-debug --disable-release Linux --disable-renaming
1562e5b6d6dSopenharmony_ci          - make -j2
1572e5b6d6dSopenharmony_ci          - make -j2 -C test
1582e5b6d6dSopenharmony_ci          - make -j2 -C test/intltest check
1592e5b6d6dSopenharmony_ci
1602e5b6d6dSopenharmony_ci    # copyright scan / future linter
1612e5b6d6dSopenharmony_ci    - name: "lint"
1622e5b6d6dSopenharmony_ci      script:
1632e5b6d6dSopenharmony_ci          - perl tools/scripts/cpysearch/cpyscan.pl
1642e5b6d6dSopenharmony_ci
1652e5b6d6dSopenharmony_ci    - name: "j: icu4c release tools"
1662e5b6d6dSopenharmony_ci      language: "java"
1672e5b6d6dSopenharmony_ci      script:
1682e5b6d6dSopenharmony_ci        - mvn -f tools/release/java/pom.xml package dependency:analyze
1692e5b6d6dSopenharmony_ci      cache:
1702e5b6d6dSopenharmony_ci        directories:
1712e5b6d6dSopenharmony_ci        - $HOME/.m2
172