Skip to content

Migrate libmysqlclient job to GitHub actions #9608

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

Closed
Closed
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
32 changes: 32 additions & 0 deletions .github/actions/build-libmysqlclient/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build libmysqlclient
inputs:
configurationParameters:
default: ''
required: false
libmysql:
required: true
runs:
using: composite
steps:
- shell: bash
run: |
set -x
LIBMYSQL=${{ inputs.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}
MYSQLI=${MYSQL_DIR}/bin/mysql_config
./buildconf --force
./configure ${{ inputs.configurationParameters }} \
--enable-option-checking=fatal \
--disable-all \
--enable-pdo \
--with-pdo-mysql=${PDO_MYSQL} \
--with-mysqli=${MYSQLI}
make clean
make -j$(/usr/bin/nproc) >/dev/null
20 changes: 20 additions & 0 deletions .github/actions/test-libmysqlclient/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test libmysqlclient
runs:
using: composite
steps:
- shell: bash
run: |
set -x
export MYSQL_TEST_USER=root
export MYSQL_TEST_PASSWD=root
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
48 changes: 48 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,51 @@ jobs:
-d opcache.jit_buffer_size=16M
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
LIBMYSQLCLIENT:
#needs: GENERATE_MATRIX
#if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
strategy:
fail-fast: false
matrix:
# branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
include:
- branch: { name: 'PR', ref: '' }
name: "${{ matrix.branch.name }}_LIBMYSQLCLIENT"
runs-on: ubuntu-20.04
steps:
- name: git checkout
uses: actions/checkout@v2
# with:
# ref: ${{ matrix.branch.ref }}
- name: apt
run: |
sudo apt-get update -y | true
sudo apt install bison re2c
- name: Setup
run: |
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"
# Does not support caching_sha2_auth :(
# - name: Build mysql-5.6
# uses: ./.github/actions/build-libmysqlclient
# with:
# libmysql: mysql-5.6.49-linux-glibc2.12-x86_64.tar.gz
# - name: Test mysql-5.6
# uses: ./.github/actions/test-libmysqlclient
- name: Build mysql-5.7
uses: ./.github/actions/build-libmysqlclient
with:
libmysql: mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
- name: Test mysql-5.7
uses: ./.github/actions/test-libmysqlclient
- name: Build mysql-8.0
uses: ./.github/actions/build-libmysqlclient
with:
# configurationParameters: --enable-werror
libmysql: mysql-8.0.30-linux-glibc2.12-x86_64.tar.xz
- name: Test mysql-8.0
uses: ./.github/actions/test-libmysqlclient
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
4 changes: 0 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ 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: 0 additions & 37 deletions azure/libmysqlclient_job.yml

This file was deleted.

53 changes: 0 additions & 53 deletions azure/libmysqlclient_test.yml

This file was deleted.