Skip to content

Commit a11b05f

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Migrate libmysqlclient job to GitHub actions
2 parents f505457 + 1ee5b65 commit a11b05f

File tree

6 files changed

+99
-91
lines changed

6 files changed

+99
-91
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build libmysqlclient
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
libmysql:
7+
required: true
8+
runs:
9+
using: composite
10+
steps:
11+
- shell: bash
12+
run: |
13+
set -x
14+
LIBMYSQL=${{ inputs.libmysql }}
15+
MYSQL_BASE=${LIBMYSQL%%-linux-*}
16+
MYSQL_VERSION=${MYSQL_BASE#*-}
17+
MYSQL_DIR=$HOME/$MYSQL_BASE
18+
mkdir -p $MYSQL_DIR
19+
URL=https://cdn.mysql.com/Downloads/MySQL-${MYSQL_VERSION%.*}/$LIBMYSQL
20+
wget -nv $URL
21+
tar -xf $LIBMYSQL --strip-components=1 -C $MYSQL_DIR
22+
PDO_MYSQL=${MYSQL_DIR}
23+
MYSQLI=${MYSQL_DIR}/bin/mysql_config
24+
./buildconf --force
25+
./configure ${{ inputs.configurationParameters }} \
26+
--enable-option-checking=fatal \
27+
--disable-all \
28+
--enable-pdo \
29+
--with-pdo-mysql=${PDO_MYSQL} \
30+
--with-mysqli=${MYSQLI}
31+
make clean
32+
make -j$(/usr/bin/nproc) >/dev/null
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test libmysqlclient
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
export MYSQL_TEST_USER=root
9+
export MYSQL_TEST_PASSWD=root
10+
export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
11+
export PDO_MYSQL_TEST_HOST=127.0.0.1
12+
export PDO_MYSQL_TEST_USER=root
13+
export PDO_MYSQL_TEST_PASS=root
14+
export TEST_PHP_JUNIT=junit.xml
15+
export REPORT_EXIT_STATUS=no
16+
rm -rf junit.xml | true
17+
sapi/cli/php run-tests.php -P -q \
18+
-g FAIL,BORK,LEAK,XLEAK \
19+
--offline --show-diff --show-slow 1000 --set-timeout 120 \
20+
ext/pdo_mysql

.github/workflows/nightly.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,3 +461,50 @@ jobs:
461461
-d opcache.enable_cli=1
462462
- name: Verify generated files are up to date
463463
uses: ./.github/actions/verify-generated-files
464+
LIBMYSQLCLIENT:
465+
needs: GENERATE_MATRIX
466+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
467+
strategy:
468+
fail-fast: false
469+
matrix:
470+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
471+
name: "${{ matrix.branch.name }}_LIBMYSQLCLIENT"
472+
runs-on: ubuntu-20.04
473+
steps:
474+
- name: git checkout
475+
uses: actions/checkout@v2
476+
with:
477+
ref: ${{ matrix.branch.ref }}
478+
- name: apt
479+
run: |
480+
sudo apt-get update -y | true
481+
sudo apt install bison re2c
482+
- name: Setup
483+
run: |
484+
sudo service mysql start
485+
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
486+
# Ensure local_infile tests can run.
487+
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
488+
# Does not support caching_sha2_auth :(
489+
# - name: Build mysql-5.6
490+
# uses: ./.github/actions/build-libmysqlclient
491+
# with:
492+
# libmysql: mysql-5.6.49-linux-glibc2.12-x86_64.tar.gz
493+
# - name: Test mysql-5.6
494+
# uses: ./.github/actions/test-libmysqlclient
495+
- name: Build mysql-5.7
496+
uses: ./.github/actions/build-libmysqlclient
497+
with:
498+
libmysql: mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
499+
- name: Test mysql-5.7
500+
uses: ./.github/actions/test-libmysqlclient
501+
- name: Build mysql-8.0
502+
uses: ./.github/actions/build-libmysqlclient
503+
with:
504+
# FIXME: There are new warnings
505+
# configurationParameters: --enable-werror
506+
libmysql: mysql-8.0.30-linux-glibc2.12-x86_64.tar.xz
507+
- name: Test mysql-8.0
508+
uses: ./.github/actions/test-libmysqlclient
509+
- name: Verify generated files are up to date
510+
uses: ./.github/actions/verify-generated-files

azure-pipelines.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,3 @@ jobs:
4646
parameters:
4747
configurationName: I386_RELEASE_ZTS
4848
configurationParameters: '--disable-debug --enable-zts'
49-
- template: azure/libmysqlclient_job.yml
50-
parameters:
51-
configurationName: LIBMYSQLCLIENT_DEBUG_NTS
52-
configurationParameters: '--enable-debug --disable-zts'

azure/libmysqlclient_job.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

azure/libmysqlclient_test.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)