Skip to content

Commit a79e0ee

Browse files
committed
[skip ci] Attempt to fix libmysqlclient build for >=PHP-8.2
1 parent 85641ae commit a79e0ee

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
@@ -458,6 +458,8 @@ jobs:
458458
fail-fast: false
459459
matrix:
460460
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
461+
exclude:
462+
- branch: { name: 'PHP-80', ref: 'PHP-8.0' }
461463
name: "${{ matrix.branch.name }}_LIBMYSQLCLIENT"
462464
runs-on: ubuntu-20.04
463465
steps:
@@ -486,15 +488,21 @@ jobs:
486488
uses: ./.github/actions/build-libmysqlclient
487489
with:
488490
libmysql: mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
491+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
489492
- name: Test mysql-5.7
490493
uses: ./.github/actions/test-libmysqlclient
494+
with:
495+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
491496
- name: Build mysql-8.0
492497
uses: ./.github/actions/build-libmysqlclient
493498
with:
494499
# FIXME: There are new warnings
495500
# configurationParameters: --enable-werror
496501
libmysql: mysql-8.0.30-linux-glibc2.12-x86_64.tar.xz
502+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
497503
- name: Test mysql-8.0
498504
uses: ./.github/actions/test-libmysqlclient
505+
with:
506+
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
499507
- name: Verify generated files are up to date
500508
uses: ./.github/actions/verify-generated-files

0 commit comments

Comments
 (0)