-
-
Notifications
You must be signed in to change notification settings - Fork 744
119 lines (112 loc) · 4.36 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# 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*'
paths:
- 'icu4c/**'
- 'testdata/**'
- '.github/workflows/**'
pull_request:
branches: '**'
paths:
- 'icu4c/**'
- 'testdata/**'
- '.github/workflows/**'
# For non-release branches (namely: PRs), only run CI on the most recent commit. Cancel
# runs on previous commits mid-flight when new commits are pushed.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-on-specific-branches
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'maint/') && github.ref != 'main' }}
permissions:
contents: read
jobs:
clang-valgrind-test:
runs-on: ubuntu-22.04 # Updated in BRS
steps:
- name: Install valgrind
run: |
set -ex;
sudo apt-get -y update;
sudo apt-get install -y valgrind;
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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 -l4.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-22.04 # Updated in BRS
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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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 -l4.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 }};