mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-22297 Speed up valgrind tests
Remove the valgrind build in azure pipeline which is slow (about 50-75 mins to run) and replace with a set in github action that run 17 testing jobs in parallel to speed it up to about 25 mins the longest.
This commit is contained in:
parent
95d905a9e9
commit
981c182a7f
2 changed files with 97 additions and 70 deletions
|
@ -1,70 +0,0 @@
|
|||
# Azure Pipelines configuration for Valgrind for ICU4C.
|
||||
#
|
||||
# Note: The valgrind test configuration is in a separate file
|
||||
# as it used to be run independently from the regular CI builds.
|
||||
#
|
||||
# The Ubuntu images don't have valgrind installed by default, so we need
|
||||
# install it first.
|
||||
#
|
||||
# Run Valgrind for every Pull Request that goes into main
|
||||
# or a maint- branch. This lets us catch any issues sooner rather than later.
|
||||
pr:
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- maint/maint-*
|
||||
paths:
|
||||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- docs/*
|
||||
- icu4j/*
|
||||
- tools/*
|
||||
- vendor/*
|
||||
- .cpyskip.txt
|
||||
- .travis.yml
|
||||
- KEYS
|
||||
- README.md
|
||||
|
||||
jobs:
|
||||
#-------------------------------------------------------------------------
|
||||
- job: ICU4C_Clang_Valgrind_Ubuntu_2004
|
||||
displayName: 'C: Linux Clang Valgrind (Ubuntu 20.04)'
|
||||
timeoutInMinutes: 75
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
steps:
|
||||
- checkout: self
|
||||
lfs: true
|
||||
fetchDepth: 10
|
||||
- script: |
|
||||
set -ex
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y valgrind
|
||||
displayName: 'Install valgrind'
|
||||
timeoutInMinutes: 5
|
||||
- script: |
|
||||
cd icu4c/source && ./runConfigureICU --enable-debug Linux --disable-renaming && make -j2 tests
|
||||
displayName: 'Build'
|
||||
timeoutInMinutes: 10
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
- script: |
|
||||
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
|
||||
displayName: 'Valgrind intltest'
|
||||
timeoutInMinutes: 60
|
||||
- script: |
|
||||
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
|
||||
displayName: 'Valgrind cintltst'
|
||||
timeoutInMinutes: 15
|
||||
- script: |
|
||||
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
|
||||
displayName: 'Valgrind iotest'
|
||||
timeoutInMinutes: 5
|
||||
- script: |
|
||||
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
|
||||
displayName: 'Valgrind icuinfo'
|
||||
timeoutInMinutes: 5
|
||||
|
||||
#-------------------------------------------------------------------------
|
97
.github/workflows/icu_valgrind.yml
vendored
Normal file
97
.github/workflows/icu_valgrind.yml
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
# Copyright (C) 2023 and later: Unicode, Inc. and others.
|
||||
# License & terms of use: http://www.unicode.org/copyright.html
|
||||
#
|
||||
# GitHub Action configuration script for ICU continuous integration tasks
|
||||
# for Valgrind
|
||||
|
||||
name: GHA CI Valgrind
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'maint/maint*'
|
||||
pull_request:
|
||||
branches: '**'
|
||||
|
||||
jobs:
|
||||
clang-valgrind-test:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Install valgrind
|
||||
run: |
|
||||
set -ex;
|
||||
sudo apt-get -y update;
|
||||
sudo apt-get install -y valgrind;
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Build with debug enable
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
run: |
|
||||
cd icu4c/source;
|
||||
./runConfigureICU --enable-debug Linux --disable-renaming && make -j4 tests;
|
||||
- name: Test iotest with valgrind
|
||||
run: |
|
||||
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
|
||||
- name: Test cintltst with valgrind
|
||||
run: |
|
||||
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
|
||||
- name: Test icuinfo with valgrind
|
||||
run: |
|
||||
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;
|
||||
|
||||
clang-valgrind-intltest:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
# "fail-fast: false" lets other jobs keep running even if the test breaks in some other test.
|
||||
fail-fast: false
|
||||
matrix:
|
||||
case: [utility, normalize, collator, regex, format, translit,
|
||||
rbbi, rbnf, rbnfrt, icuserv, idna, convert, rbnfp, csdet,
|
||||
spoof, bidi]
|
||||
steps:
|
||||
- name: Install valgrind
|
||||
run: |
|
||||
set -ex;
|
||||
sudo apt-get -y update;
|
||||
sudo apt-get install -y valgrind;
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Build with debug enable
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
run: |
|
||||
cd icu4c/source;
|
||||
./runConfigureICU --enable-debug Linux --disable-renaming && make -j4 tests;
|
||||
- name: Check all top path in intltest is covered
|
||||
run: |
|
||||
cd icu4c/source/test/intltest;
|
||||
if [ $(LD_LIBRARY_PATH=../../lib:../../stubdata:../../tools/ctestfw:$LD_LIBRARY_PATH \
|
||||
./intltest LIST |
|
||||
egrep "^ [a-z]+$" | awk '{print $1;}' | sort | tr '\n' '|') != \
|
||||
"bidi|collate|convert|csdet|format|icuserv|idna|normalize|rbbi|rbnf|rbnfp|rbnfrt|regex|spoof|translit|utility|" ]
|
||||
then
|
||||
echo ICU has made changes to the top level tests in intltest!
|
||||
echo Please update this workflow file to include those top level tests in
|
||||
echo the "case" list.
|
||||
exit -1
|
||||
fi
|
||||
|
||||
- name: Test with valgrind
|
||||
run: |
|
||||
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 ${{ matrix.case }};
|
Loading…
Add table
Reference in a new issue