Skip to content

Commit 86a9f39

Browse files
PS-10014 feature: Add Valgrind testing to the CI
https://perconadev.atlassian.net/browse/PS-10014 Added new step to GitHub Actions. We now run MTR under Valgrind for "GCC 14 Debug" configuration.
1 parent 4d73e97 commit 86a9f39

1 file changed

Lines changed: 36 additions & 10 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,38 +66,39 @@ jobs:
6666
- {
6767
name: "GCC 14 Debug",
6868
label: "debug_gcc14",
69-
run_mtr: true,
69+
# run_mtr: true,
70+
run_valgrind_mtr: true,
7071
run_ctest: true
7172
}
7273
- {
7374
name: "GCC 14 RelWithDebInfo",
7475
label: "release_gcc14",
75-
run_mtr: true,
76+
# run_mtr: true,
7677
run_ctest: true
7778
}
7879
- {
7980
name: "GCC 14 ASan",
8081
label: "asan_gcc14",
81-
run_mtr: true,
82+
# run_mtr: true,
8283
mtr_options: "--sanitize",
8384
run_ctest: true
8485
}
8586
- {
8687
name: "Clang 20 Debug",
8788
label: "debug_clang20",
88-
run_clang_tidy: true,
89+
# run_clang_tidy: true,
8990
run_ctest: true
9091
}
9192
- {
9293
name: "Clang 20 RelWithDebInfo",
9394
label: "release_clang20",
94-
run_clang_tidy: true,
95+
# run_clang_tidy: true,
9596
run_ctest: true
9697
}
9798
- {
9899
name: "Clang 20 ASan",
99100
label: "asan_clang20",
100-
run_mtr: true,
101+
# run_mtr: true,
101102
mtr_options: "--sanitize",
102103
run_ctest: true
103104
}
@@ -136,8 +137,15 @@ jobs:
136137
run: |
137138
sudo apt-get install g++-14
138139
140+
- name: Install Valgrind on ubuntu
141+
if: matrix.config.run_valgrind_mtr
142+
run: |
143+
wget -q http://mirrors.kernel.org/ubuntu/pool/main/v/valgrind/valgrind_3.24.0-0ubuntu2_amd64.deb
144+
sudo dpkg -i valgrind_3.24.0-0ubuntu2_amd64.deb
145+
rm -f valgrind_3.24.0-0ubuntu2_amd64.deb
146+
139147
- name: Fixing libaio1 for MySQL Server tarball
140-
if: matrix.config.run_mtr
148+
if: matrix.config.run_mtr || matrix.config.run_valgrind_mtr
141149
run: |
142150
sudo apt-get install libaio-dev
143151
sudo ln -s libaio.so /lib/x86_64-linux-gnu/libaio.so.1
@@ -253,11 +261,11 @@ jobs:
253261
run: ./binlog_server version
254262

255263
- name: Creating DIST directory for MySQL Server tarballs
256-
if: matrix.config.run_mtr
264+
if: matrix.config.run_mtr || matrix.config.run_valgrind_mtr
257265
run: mkdir -p ${{github.workspace}}/dist
258266

259267
- name: Unpacking MySQL Server 8.0 tarballs
260-
if: matrix.config.run_mtr
268+
if: matrix.config.run_mtr || matrix.config.run_valgrind_mtr
261269
working-directory: ${{github.workspace}}/dist
262270
run: |
263271
# https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.45-linux-glibc2.28-x86_64.tar.xz
@@ -276,7 +284,7 @@ jobs:
276284
./${DIST_BASE_NAME}/bin/mysqld --version
277285
278286
- name: Unpacking MySQL Server 8.4 tarballs
279-
if: matrix.config.run_mtr
287+
if: matrix.config.run_mtr || matrix.config.run_valgrind_mtr
280288
working-directory: ${{github.workspace}}/dist
281289
run: |
282290
# https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.8-linux-glibc2.28-x86_64-minimal.tar.xz
@@ -303,6 +311,15 @@ jobs:
303311
--force --max-test-fail=0 --retry=0 --nounit-tests --big-test --repeat=2 --parallel=${{steps.cpu-cores.outputs.count}} \
304312
--suite=binlog_streaming ${{matrix.config.mtr_options}}
305313
314+
- name: MTR 8.0 tests (Valgrind)
315+
if: matrix.config.run_valgrind_mtr
316+
working-directory: ${{github.workspace}}/dist/${{format('mysql-{0}-{1}', env.MYSQL_80_VERSION, env.MYSQL_GLIBC_SUFFIX)}}/mysql-test
317+
run: |
318+
BINSRV=${{github.workspace}}/src-build-${{matrix.config.label}}/binlog_server ./mtr \
319+
--vardir=${{runner.temp}}/mtrvardir80 \
320+
--force --max-test-fail=0 --retry=0 --nounit-tests --big-test --parallel=${{steps.cpu-cores.outputs.count}} \
321+
--suite=binlog_streaming --valgrind
322+
306323
- name: MTR 8.4 tests
307324
if: matrix.config.run_mtr
308325
working-directory: ${{github.workspace}}/dist/${{format('mysql-{0}-{1}-minimal', env.MYSQL_84_VERSION, env.MYSQL_GLIBC_SUFFIX)}}/mysql-test
@@ -312,6 +329,15 @@ jobs:
312329
--force --max-test-fail=0 --retry=0 --nounit-tests --big-test --repeat=2 --parallel=${{steps.cpu-cores.outputs.count}} \
313330
--suite=binlog_streaming ${{matrix.config.mtr_options}}
314331
332+
- name: MTR 8.4 tests (Valgrind)
333+
if: matrix.config.run_valgrind_mtr
334+
working-directory: ${{github.workspace}}/dist/${{format('mysql-{0}-{1}-minimal', env.MYSQL_84_VERSION, env.MYSQL_GLIBC_SUFFIX)}}/mysql-test
335+
run: |
336+
BINSRV=${{github.workspace}}/src-build-${{matrix.config.label}}/binlog_server ./mtr \
337+
--vardir=${{runner.temp}}/mtrvardir84 \
338+
--force --max-test-fail=0 --retry=0 --nounit-tests --big-test --parallel=${{steps.cpu-cores.outputs.count}} \
339+
--suite=binlog_streaming --valgrind
340+
315341
- name: CTest
316342
if: matrix.config.run_ctest
317343
working-directory: ${{github.workspace}}/src-build-${{matrix.config.label}}

0 commit comments

Comments
 (0)