-
-
Notifications
You must be signed in to change notification settings - Fork 743
104 lines (98 loc) · 3.65 KB
/
icu_valgrind.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
# 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: '**'
permissions:
contents: read
jobs:
clang-valgrind-test:
runs-on: ubuntu-latest
steps:
- name: Install valgrind
run: |
set -ex;
sudo apt-get -y update;
sudo apt-get install -y valgrind;
- name: Checkout
uses: actions/checkout@v3
- name: Build with debug enable
env:
CC: clang
CFLAGS: -gdwarf-4
CXX: clang++
CXXFLAGS: -gdwarf-4
run: |
cd icu4c/source;
./runConfigureICU --enable-debug Linux --disable-renaming && make -j -l2.5 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-latest
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@v3
- name: Build with debug enable
env:
CC: clang
CFLAGS: -gdwarf-4
CXX: clang++
CXXFLAGS: -gdwarf-4
run: |
cd icu4c/source;
./runConfigureICU --enable-debug Linux --disable-renaming && make -j -l2.5 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 }};