12e5b6d6dSopenharmony_ci# Azure Pipelines configuration for Valgrind for ICU4C.
22e5b6d6dSopenharmony_ci# 
32e5b6d6dSopenharmony_ci# Note: The valgrind test configuration is in a separate file
42e5b6d6dSopenharmony_ci# so that it can be run independently from the regular builds.
52e5b6d6dSopenharmony_ci#
62e5b6d6dSopenharmony_ci# The Ubuntu images don't have valgrind installed by default, so we need
72e5b6d6dSopenharmony_ci# install it first.
82e5b6d6dSopenharmony_ci#
92e5b6d6dSopenharmony_ci# Only run valgrind on the master and maint branches, and
102e5b6d6dSopenharmony_ci# batch up any pending changes so that we will only have at most
112e5b6d6dSopenharmony_ci# one build running at a given time (since it takes time).
122e5b6d6dSopenharmony_citrigger:
132e5b6d6dSopenharmony_ci  batch: true
142e5b6d6dSopenharmony_ci  branches:
152e5b6d6dSopenharmony_ci    include:
162e5b6d6dSopenharmony_ci    - master
172e5b6d6dSopenharmony_ci    - maint/maint-*
182e5b6d6dSopenharmony_ci  paths:
192e5b6d6dSopenharmony_ci    include:
202e5b6d6dSopenharmony_ci    - '*'
212e5b6d6dSopenharmony_ci    exclude:
222e5b6d6dSopenharmony_ci    - docs/*
232e5b6d6dSopenharmony_ci    - icu4j/*
242e5b6d6dSopenharmony_ci    - tools/*
252e5b6d6dSopenharmony_ci    - vendor/*
262e5b6d6dSopenharmony_ci    - .appveyor.xml
272e5b6d6dSopenharmony_ci    - .cpyskip.txt
282e5b6d6dSopenharmony_ci    - .travis.yml
292e5b6d6dSopenharmony_ci    - KEYS
302e5b6d6dSopenharmony_ci    - README.md
312e5b6d6dSopenharmony_ci
322e5b6d6dSopenharmony_cijobs:
332e5b6d6dSopenharmony_ci#-------------------------------------------------------------------------
342e5b6d6dSopenharmony_ci- job: ICU4C_Clang_Valgrind_Ubuntu_1604
352e5b6d6dSopenharmony_ci  displayName: 'C: Linux Clang Valgrind (Ubuntu 16.04)'
362e5b6d6dSopenharmony_ci  timeoutInMinutes: 60
372e5b6d6dSopenharmony_ci  pool:
382e5b6d6dSopenharmony_ci    vmImage: 'Ubuntu 16.04'
392e5b6d6dSopenharmony_ci  steps:
402e5b6d6dSopenharmony_ci    - checkout: self
412e5b6d6dSopenharmony_ci      lfs: true
422e5b6d6dSopenharmony_ci      fetchDepth: 1
432e5b6d6dSopenharmony_ci    - script: |
442e5b6d6dSopenharmony_ci        set -ex
452e5b6d6dSopenharmony_ci        sudo apt -y update
462e5b6d6dSopenharmony_ci        sudo apt install -y valgrind
472e5b6d6dSopenharmony_ci      displayName: 'Install valgrind'
482e5b6d6dSopenharmony_ci      timeoutInMinutes: 5
492e5b6d6dSopenharmony_ci    - script: |
502e5b6d6dSopenharmony_ci        cd icu4c/source && ./runConfigureICU --enable-debug Linux --disable-renaming --disable-layout --disable-layoutex && make -j2 tests
512e5b6d6dSopenharmony_ci      displayName: 'Build'
522e5b6d6dSopenharmony_ci      timeoutInMinutes: 10
532e5b6d6dSopenharmony_ci      env:
542e5b6d6dSopenharmony_ci        CC: clang
552e5b6d6dSopenharmony_ci        CXX: clang++
562e5b6d6dSopenharmony_ci    - script: |
572e5b6d6dSopenharmony_ci        cd icu4c/source/test/intltest && LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH valgrind --tool=memcheck --error-exitcode=1 --leak-check=full --show-reachable=yes ./intltest
582e5b6d6dSopenharmony_ci      displayName: 'Valgrind intltest'
592e5b6d6dSopenharmony_ci      timeoutInMinutes: 45
602e5b6d6dSopenharmony_ci    - script: |
612e5b6d6dSopenharmony_ci        cd icu4c/source/test/cintltst && LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH valgrind --tool=memcheck --error-exitcode=1 --leak-check=full --show-reachable=yes ./cintltst
622e5b6d6dSopenharmony_ci      displayName: 'Valgrind cintltst'
632e5b6d6dSopenharmony_ci      timeoutInMinutes: 15
642e5b6d6dSopenharmony_ci    - script: |
652e5b6d6dSopenharmony_ci        cd icu4c/source/test/iotest && LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH valgrind --tool=memcheck --error-exitcode=1 --leak-check=full --show-reachable=yes ./iotest
662e5b6d6dSopenharmony_ci      displayName: 'Valgrind iotest'
672e5b6d6dSopenharmony_ci      timeoutInMinutes: 5
682e5b6d6dSopenharmony_ci    - script: |
692e5b6d6dSopenharmony_ci        cd icu4c/source/tools/icuinfo && LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH valgrind --tool=memcheck --error-exitcode=1 --leak-check=full --show-reachable=yes ./icuinfo
702e5b6d6dSopenharmony_ci      displayName: 'Valgrind icuinfo'
712e5b6d6dSopenharmony_ci      timeoutInMinutes: 5
722e5b6d6dSopenharmony_ci
732e5b6d6dSopenharmony_ci#-------------------------------------------------------------------------
74