Skip to content

Revert "[skip-ci] Drop libmysql build from nightly" as PDO still accepts libmysql #8664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
configurationName: DEBUG_NTS_REPEAT
configurationParameters: '--enable-debug --disable-zts'
runTestsParameters: '--repeat 2'
- template: azure/libmysqlclient_job.yml
parameters:
configurationName: LIBMYSQLCLIENT_DEBUG_NTS
configurationParameters: '--enable-debug --disable-zts'
- template: azure/job.yml
parameters:
configurationName: VARIATION_DEBUG_ZTS
Expand Down
37 changes: 37 additions & 0 deletions azure/libmysqlclient_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
parameters:
configurationName: ''
configurationParameters: ''
runTestsParameters: ''
timeoutInMinutes: 60

jobs:
- job: ${{ parameters.configurationName }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: |
sudo apt-get update -y | true
sudo apt install bison re2c
displayName: 'APT'
- script: |
set -o
sudo service mysql start
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
# Ensure local_infile tests can run.
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
displayName: 'Setup MySQL server'
# Does not support caching_sha2_auth :(
#- template: libmysqlclient_test.yml
# parameters:
# configurationName: ${{ parameters.configurationName }} - MySQL 5.6.49
# libmysql: mysql-5.6.49-linux-glibc2.12-x86_64.tar.gz
- template: libmysqlclient_test.yml
parameters:
configurationName: ${{ parameters.configurationName }} - MySQL 5.7.38
libmysql: mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
- template: libmysqlclient_test.yml
parameters:
configurationName: ${{ parameters.configurationName }} - MySQL 8.0.27
libmysql: mysql-8.0.27-linux-glibc2.12-x86_64.tar.xz
configurationParameters: ${{ parameters.configurationParameters }} --enable-werror
49 changes: 49 additions & 0 deletions azure/libmysqlclient_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
parameters:
configurationName: ''
configurationParameters: ''
libmysql: ''

steps:
- script: |
set -e
LIBMYSQL=${{ parameters.libmysql }}
MYSQL_BASE=${LIBMYSQL%%-linux-*}
MYSQL_VERSION=${MYSQL_BASE#*-}
MYSQL_DIR=$HOME/$MYSQL_BASE
mkdir -p $MYSQL_DIR
URL=https://cdn.mysql.com/Downloads/MySQL-${MYSQL_VERSION%.*}/$LIBMYSQL
wget -nv $URL
tar -xf $LIBMYSQL --strip-components=1 -C $MYSQL_DIR
PDO_MYSQL=${MYSQL_DIR}
./buildconf --force
./configure ${{ parameters.configurationParameters }} \
--enable-option-checking=fatal \
--disable-all \
--enable-pdo \
--with-pdo-mysql=${PDO_MYSQL}
make clean
make -j$(/usr/bin/nproc) >/dev/null
displayName: 'Build ${{ parameters.configurationName }}'
condition: or(succeeded(), failed())
- script: |
export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
export PDO_MYSQL_TEST_HOST=127.0.0.1
export PDO_MYSQL_TEST_USER=root
export PDO_MYSQL_TEST_PASS=root
export TEST_PHP_JUNIT=junit.xml
export REPORT_EXIT_STATUS=no
rm -rf junit.xml | true
sapi/cli/php run-tests.php -P -q \
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
--offline --show-diff --show-slow 1000 --set-timeout 120 \
ext/pdo_mysql
displayName: 'Test ${{ parameters.configurationName }}'
condition: or(succeeded(), failed())
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: junit.xml
testRunTitle: '${{ parameters.configurationName }}'
failTaskOnFailedTests: true
displayName: 'Export ${{ parameters.configurationName }} Results'
condition: or(succeeded(), failed())