Skip to content

Commit 0baa63a

Browse files
PS-10065 feature: Integrate 8.4 testing into the CI (#63)
https://perconadev.atlassian.net/browse/PS-10065 GitHub Workflow Actions now perform MTR testing not only with MySQL Server 8.0 but with 8.4 as well. Changed the way how MySQL Server is installed on the system: instead of relying on the system packages we now download tarballs directly from the Oracle web site: * linux-glibc2.28-x86_64 for 8.0 * linux-glibc2.28-x86_64-minimal for 8.4 Removed apparmor invocation / package installation. Added manual "libaio.so.1" symlink creation (required by MySQL Server tarball binaries).
1 parent d4ce512 commit 0baa63a

1 file changed

Lines changed: 64 additions & 19 deletions

File tree

.github/workflows/cmake.yml

Lines changed: 64 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ env:
1313
BOOST_MAJOR: 1
1414
BOOST_MINOR: 88
1515
BOOST_PATCH: 0
16+
MYSQL_DOWNLOADS_URL: https://dev.mysql.com/get/Downloads
17+
MYSQL_80_VERSION: 8.0.44
18+
MYSQL_84_VERSION: 8.4.7
19+
MYSQL_GLIBC_SUFFIX: linux-glibc2.28-x86_64
1620

1721
jobs:
1822
formatting-check:
@@ -118,23 +122,22 @@ jobs:
118122
sudo apt-get update
119123
sudo apt-get install libmysqlclient-dev libcurl4-openssl-dev
120124
121-
- name: Install MySQL server and MTR
122-
if: matrix.config.run_mtr
123-
run: |
124-
sudo apt-get install mysql-client mysql-server mysql-testsuite apparmor-utils
125-
126125
- name: Install Clang dependencies on ubuntu
127126
if: startsWith(matrix.config.name, 'Clang')
128127
run: |
129-
sudo apt-get update
130128
sudo apt-get install clang-19 lld-19 clang-tidy-19 libc++-19-dev libc++abi-19-dev
131129
132130
- name: Install GCC dependencies on ubuntu
133131
if: startsWith(matrix.config.name, 'GCC')
134132
run: |
135-
sudo apt-get update
136133
sudo apt-get install g++-14
137134
135+
- name: Fixing libaio1 for MySQL Server tarball
136+
if: matrix.config.run_mtr
137+
run: |
138+
sudo apt-get install libaio-dev
139+
sudo ln -s libaio.so /lib/x86_64-linux-gnu/libaio.so.1
140+
138141
- name: Info CMake
139142
run: cmake --version
140143

@@ -245,21 +248,63 @@ jobs:
245248
working-directory: ${{github.workspace}}/src-build-${{matrix.config.label}}
246249
run: ./binlog_server version
247250

248-
- name: MTR tests
251+
- name: Creating DIST directory for MySQL Server tarballs
252+
if: matrix.config.run_mtr
253+
run: mkdir -p ${{github.workspace}}/dist
254+
255+
- name: Unpacking MySQL Server 8.0 tarballs
256+
if: matrix.config.run_mtr
257+
working-directory: ${{github.workspace}}/dist
258+
run: |
259+
# https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.44-linux-glibc2.28-x86_64.tar.xz
260+
DIST_BASE_NAME=${{format('mysql-{0}-{1}', env.MYSQL_80_VERSION, env.MYSQL_GLIBC_SUFFIX)}}
261+
DIST_TARBALL_FILE_NAME=${DIST_BASE_NAME}.tar.xz
262+
wget -q ${{env.MYSQL_DOWNLOADS_URL}}/MySQL-8.0/${DIST_TARBALL_FILE_NAME}
263+
tar xf ${DIST_TARBALL_FILE_NAME}
264+
rm -f ${DIST_TARBALL_FILE_NAME}
265+
# https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-test-8.0.44-linux-glibc2.28-x86_64.tar.xz
266+
TEST_TARBALL_FILE_NAME=${{format('mysql-test-{0}-{1}.tar.xz', env.MYSQL_80_VERSION, env.MYSQL_GLIBC_SUFFIX)}}
267+
wget -q ${{env.MYSQL_DOWNLOADS_URL}}/MySQL-8.0/${TEST_TARBALL_FILE_NAME}
268+
tar xf ${TEST_TARBALL_FILE_NAME}
269+
rm -f ${TEST_TARBALL_FILE_NAME}
270+
# Linking the "binlog_streaming" from the source tree into the MTR suits directory
271+
sudo ln -s ${{github.workspace}}/src/mtr/binlog_streaming ${{github.workspace}}/dist/${DIST_BASE_NAME}/mysql-test/suite/binlog_streaming
272+
./${DIST_BASE_NAME}/bin/mysqld --version
273+
274+
- name: Unpacking MySQL Server 8.4 tarballs
275+
if: matrix.config.run_mtr
276+
working-directory: ${{github.workspace}}/dist
277+
run: |
278+
# https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-8.4.7-linux-glibc2.28-x86_64-minimal.tar.xz
279+
DIST_BASE_NAME=${{format('mysql-{0}-{1}-minimal', env.MYSQL_84_VERSION, env.MYSQL_GLIBC_SUFFIX)}}
280+
DIST_TARBALL_FILE_NAME=${DIST_BASE_NAME}.tar.xz
281+
wget -q ${{env.MYSQL_DOWNLOADS_URL}}/MySQL-8.4/${DIST_TARBALL_FILE_NAME}
282+
tar xf ${DIST_TARBALL_FILE_NAME}
283+
rm -f ${DIST_TARBALL_FILE_NAME}
284+
# https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-test-8.4.7-linux-glibc2.28-x86_64-minimal.tar.xz
285+
TEST_TARBALL_FILE_NAME=${{format('mysql-test-{0}-{1}-minimal.tar.xz', env.MYSQL_84_VERSION, env.MYSQL_GLIBC_SUFFIX)}}
286+
wget -q ${{env.MYSQL_DOWNLOADS_URL}}/MySQL-8.4/${TEST_TARBALL_FILE_NAME}
287+
tar xf ${TEST_TARBALL_FILE_NAME}
288+
rm -f ${TEST_TARBALL_FILE_NAME}
289+
# Linking the "binlog_streaming" from the source tree into the MTR suits directory
290+
sudo ln -s ${{github.workspace}}/src/mtr/binlog_streaming ${{github.workspace}}/dist/${DIST_BASE_NAME}/mysql-test/suite/binlog_streaming
291+
./${DIST_BASE_NAME}/bin/mysqld --version
292+
293+
- name: MTR 8.0 tests
294+
if: matrix.config.run_mtr
295+
working-directory: ${{github.workspace}}/dist/${{format('mysql-{0}-{1}', env.MYSQL_80_VERSION, env.MYSQL_GLIBC_SUFFIX)}}/mysql-test
296+
run: |
297+
BINSRV=${{github.workspace}}/src-build-${{matrix.config.label}}/binlog_server ./mtr \
298+
--vardir=${{runner.temp}}/mtrvardir80 \
299+
--force --max-test-fail=0 --retry=0 --nounit-tests --big-test --repeat=2 --parallel=${{steps.cpu-cores.outputs.count}} \
300+
--suite=binlog_streaming ${{matrix.config.mtr_options}}
301+
302+
- name: MTR 8.4 tests
249303
if: matrix.config.run_mtr
250-
working-directory: /usr/lib/mysql-test
304+
working-directory: ${{github.workspace}}/dist/${{format('mysql-{0}-{1}-minimal', env.MYSQL_84_VERSION, env.MYSQL_GLIBC_SUFFIX)}}/mysql-test
251305
run: |
252-
# TODO: consider adding ${{runner.temp}}/mtrvardir into the list of
253-
# writable directories in '/etc/apparmor.d/usr.sbin.mysqld' AppArmor
254-
# profile instead of disabling it completely.
255-
# Disabling MySQL Server Apparmor profile as we are creating a custom data directory
256-
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable
257-
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
258-
# Linking the "binlog_streaming" from the source tree into the MTR suits directory on the system
259-
sudo ln -s ${{github.workspace}}/src/mtr/binlog_streaming /usr/lib/mysql-test/suite/binlog_streaming
260-
# Running MTR from the system package
261306
BINSRV=${{github.workspace}}/src-build-${{matrix.config.label}}/binlog_server ./mtr \
262-
--client-bindir=/usr/lib/mysql-test/bin --vardir=${{runner.temp}}/mtrvardir \
307+
--vardir=${{runner.temp}}/mtrvardir84 \
263308
--force --max-test-fail=0 --retry=0 --nounit-tests --big-test --repeat=2 --parallel=${{steps.cpu-cores.outputs.count}} \
264309
--suite=binlog_streaming ${{matrix.config.mtr_options}}
265310

0 commit comments

Comments
 (0)