Skip to content

Commit 0e42ca2

Browse files
authored
[ci skip] Revert "Drop libmysql build from nightly" as PDO still accepts libmysql (#8664)
1 parent ab67b52 commit 0e42ca2

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ jobs:
6666
configurationName: DEBUG_NTS_REPEAT
6767
configurationParameters: '--enable-debug --disable-zts'
6868
runTestsParameters: '--repeat 2'
69+
- template: azure/libmysqlclient_job.yml
70+
parameters:
71+
configurationName: LIBMYSQLCLIENT_DEBUG_NTS
72+
configurationParameters: '--enable-debug --disable-zts'
6973
- template: azure/job.yml
7074
parameters:
7175
configurationName: VARIATION_DEBUG_ZTS

azure/libmysqlclient_job.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
parameters:
2+
configurationName: ''
3+
configurationParameters: ''
4+
runTestsParameters: ''
5+
timeoutInMinutes: 60
6+
7+
jobs:
8+
- job: ${{ parameters.configurationName }}
9+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
10+
pool:
11+
vmImage: 'ubuntu-20.04'
12+
steps:
13+
- script: |
14+
sudo apt-get update -y | true
15+
sudo apt install bison re2c
16+
displayName: 'APT'
17+
- script: |
18+
set -o
19+
sudo service mysql start
20+
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
21+
# Ensure local_infile tests can run.
22+
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
23+
displayName: 'Setup MySQL server'
24+
# Does not support caching_sha2_auth :(
25+
#- template: libmysqlclient_test.yml
26+
# parameters:
27+
# configurationName: ${{ parameters.configurationName }} - MySQL 5.6.49
28+
# libmysql: mysql-5.6.49-linux-glibc2.12-x86_64.tar.gz
29+
- template: libmysqlclient_test.yml
30+
parameters:
31+
configurationName: ${{ parameters.configurationName }} - MySQL 5.7.38
32+
libmysql: mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
33+
- template: libmysqlclient_test.yml
34+
parameters:
35+
configurationName: ${{ parameters.configurationName }} - MySQL 8.0.27
36+
libmysql: mysql-8.0.27-linux-glibc2.12-x86_64.tar.xz
37+
configurationParameters: ${{ parameters.configurationParameters }} --enable-werror

azure/libmysqlclient_test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
parameters:
2+
configurationName: ''
3+
configurationParameters: ''
4+
libmysql: ''
5+
6+
steps:
7+
- script: |
8+
set -e
9+
LIBMYSQL=${{ parameters.libmysql }}
10+
MYSQL_BASE=${LIBMYSQL%%-linux-*}
11+
MYSQL_VERSION=${MYSQL_BASE#*-}
12+
MYSQL_DIR=$HOME/$MYSQL_BASE
13+
mkdir -p $MYSQL_DIR
14+
URL=https://cdn.mysql.com/Downloads/MySQL-${MYSQL_VERSION%.*}/$LIBMYSQL
15+
wget -nv $URL
16+
tar -xf $LIBMYSQL --strip-components=1 -C $MYSQL_DIR
17+
PDO_MYSQL=${MYSQL_DIR}
18+
./buildconf --force
19+
./configure ${{ parameters.configurationParameters }} \
20+
--enable-option-checking=fatal \
21+
--disable-all \
22+
--enable-pdo \
23+
--with-pdo-mysql=${PDO_MYSQL}
24+
make clean
25+
make -j$(/usr/bin/nproc) >/dev/null
26+
displayName: 'Build ${{ parameters.configurationName }}'
27+
condition: or(succeeded(), failed())
28+
- script: |
29+
export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
30+
export PDO_MYSQL_TEST_HOST=127.0.0.1
31+
export PDO_MYSQL_TEST_USER=root
32+
export PDO_MYSQL_TEST_PASS=root
33+
export TEST_PHP_JUNIT=junit.xml
34+
export REPORT_EXIT_STATUS=no
35+
rm -rf junit.xml | true
36+
sapi/cli/php run-tests.php -P -q \
37+
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
38+
--offline --show-diff --show-slow 1000 --set-timeout 120 \
39+
ext/pdo_mysql
40+
displayName: 'Test ${{ parameters.configurationName }}'
41+
condition: or(succeeded(), failed())
42+
- task: PublishTestResults@2
43+
inputs:
44+
testResultsFormat: 'JUnit'
45+
testResultsFiles: junit.xml
46+
testRunTitle: '${{ parameters.configurationName }}'
47+
failTaskOnFailedTests: true
48+
displayName: 'Export ${{ parameters.configurationName }} Results'
49+
condition: or(succeeded(), failed())

0 commit comments

Comments
 (0)