Skip to content

Commit 1ff70a5

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: [skip ci] Attempt to fix libmysqlclient build for >=PHP-8.2
2 parents e061084 + a79e0ee commit 1ff70a5

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

.github/actions/build-libmysqlclient/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ inputs:
55
required: false
66
libmysql:
77
required: true
8+
withMysqli:
9+
required: true
810
runs:
911
using: composite
1012
steps:
@@ -20,13 +22,13 @@ runs:
2022
wget -nv $URL
2123
tar -xf $LIBMYSQL --strip-components=1 -C $MYSQL_DIR
2224
PDO_MYSQL=${MYSQL_DIR}
23-
MYSQLI=${MYSQL_DIR}/bin/mysql_config
25+
${{ inputs.withMysqli && 'MYSQLI=${MYSQL_DIR}/bin/mysql_config' }}
2426
./buildconf --force
2527
./configure ${{ inputs.configurationParameters }} \
2628
--enable-option-checking=fatal \
2729
--disable-all \
2830
--enable-pdo \
2931
--with-pdo-mysql=${PDO_MYSQL} \
30-
--with-mysqli=${MYSQLI}
32+
${{ inputs.withMysqli && '--with-mysqli=${MYSQLI}' }}
3133
make clean
3234
make -j$(/usr/bin/nproc) >/dev/null

.github/actions/test-libmysqlclient/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
name: Test libmysqlclient
2+
inputs:
3+
withMysqli:
4+
required: true
25
runs:
36
using: composite
47
steps:
58
- shell: bash
69
run: |
710
set -x
8-
export MYSQL_TEST_USER=root
9-
export MYSQL_TEST_PASSWD=root
11+
${{ inputs.withMysqli && 'export MYSQL_TEST_USER=root' }}
12+
${{ inputs.withMysqli && 'export MYSQL_TEST_PASSWD=root' }}
1013
export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test"
1114
export PDO_MYSQL_TEST_HOST=127.0.0.1
1215
export PDO_MYSQL_TEST_USER=root

.github/workflows/nightly.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,8 @@ jobs:
467467
fail-fast: false
468468
matrix:
469469
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
470+
exclude:
471+
- branch: { name: 'PHP-80', ref: 'PHP-8.0' }
470472
name: "${{ matrix.branch.name }}_LIBMYSQLCLIENT"
471473
runs-on: ubuntu-20.04
472474
steps:
@@ -495,15 +497,21 @@ jobs:
495497
uses: ./.github/actions/build-libmysqlclient
496498
with:
497499
libmysql: mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
500+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
498501
- name: Test mysql-5.7
499502
uses: ./.github/actions/test-libmysqlclient
503+
with:
504+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
500505
- name: Build mysql-8.0
501506
uses: ./.github/actions/build-libmysqlclient
502507
with:
503508
# FIXME: There are new warnings
504509
# configurationParameters: --enable-werror
505510
libmysql: mysql-8.0.30-linux-glibc2.12-x86_64.tar.xz
511+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
506512
- name: Test mysql-8.0
507513
uses: ./.github/actions/test-libmysqlclient
514+
with:
515+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
508516
- name: Verify generated files are up to date
509517
uses: ./.github/actions/verify-generated-files

0 commit comments

Comments
 (0)