Skip to content

Migrate i386 to GitHub actions #9856

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
wants to merge 1 commit into from
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
52 changes: 52 additions & 0 deletions .github/actions/apt-x32/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: apt
runs:
using: composite
steps:
- shell: bash
run: |
set -x

export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture i386
apt-get update -y | true
# TODO: Reenable postgresql + postgresql-contrib packages once they work again.
apt-get install -y \
autoconf \
bison \
g++-multilib \
gcc-multilib \
language-pack-de \
libaspell-dev:i386 \
libbz2-dev:i386 \
libc6:i386 \
libcurl4-openssl-dev:i386 \
libffi-dev:i386 \
libfreetype6-dev:i386 \
libgmp-dev:i386 \
libgssapi-krb5-2:i386 \
libicu-dev:i386 \
libjpeg-dev:i386 \
libkrb5-dev:i386 \
libonig-dev:i386 \
libpng-dev:i386 \
libpq-dev:i386 \
libpspell-dev:i386 \
libreadline-dev:i386 \
libsasl2-dev:i386 \
libsodium-dev:i386 \
libsqlite3-dev:i386 \
libssl-dev:i386 \
libtidy-dev:i386 \
libwebp-dev:i386 \
libxml2-dev:i386 \
libxml2-dev:i386 \
libxpm-dev:i386 \
libxslt1-dev:i386 \
libzip-dev:i386 \
locales \
make \
pkg-config:i386 \
re2c \
unzip \
wget \
zlib1g-dev:i386
50 changes: 12 additions & 38 deletions azure/i386/job.yml → .github/actions/configure-x32/action.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
parameters:
configurationName: ''
configurationParameters: ''
timeoutInMinutes: 75
name: ./configure
inputs:
configurationParameters:
default: ''
required: false
runs:
using: composite
steps:
- shell: bash
run: |
set -x

jobs:
- job: ${{ parameters.configurationName }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
pool:
vmImage: 'ubuntu-20.04'
steps:
- template: apt.yml
- script: |
./buildconf --force
export CFLAGS="-m32 -msse2"
export CXXFLAGS="-m32 -msse2"
export LDFLAGS=-L/usr/lib/i386-linux-gnu
export PKG_CONFIG=/usr/bin/i686-linux-gnu-pkg-config
./configure ${{ parameters.configurationParameters }} \
./configure ${{ inputs.configurationParameters }} \
--enable-option-checking=fatal \
--prefix=/usr \
--enable-phpdbg \
Expand Down Expand Up @@ -67,27 +65,3 @@ jobs:
--enable-werror \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d
displayName: 'Configure Build'
- script: make -j$(/usr/bin/nproc) >/dev/null
displayName: 'Make Build'
- script: |
set -e
sudo make install
sudo mkdir /etc/php.d
sudo chmod 777 /etc/php.d
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
displayName: 'Install Build'
- script: |
set -e
sudo service mysql start
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
#sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
#sudo -u postgres psql -c "CREATE DATABASE test;"
displayName: 'Setup'
- template: ../tests.yml
parameters:
configurationName: ${{ parameters.configurationName }}
runTestsParameters: ${{ parameters.runTestsParameters }}
15 changes: 15 additions & 0 deletions .github/actions/install-linux-x32/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Install
runs:
using: composite
steps:
- shell: bash
run: |
set -x
make install
mkdir /etc/php.d
chmod 777 /etc/php.d
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
echo opcache.preload_user=root >> /etc/php.d/opcache.ini
4 changes: 3 additions & 1 deletion .github/actions/test-linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ runs:
set -x
export MYSQL_TEST_USER=root
export MYSQL_TEST_PASSWD=root
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
fi
export PDO_MYSQL_TEST_USER=root
export PDO_MYSQL_TEST_PASS=root
export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
Expand Down
File renamed without changes.
71 changes: 71 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,77 @@ jobs:
-d opcache.jit=1205
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
LINUX_X32:
needs: GENERATE_MATRIX
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
strategy:
fail-fast: false
matrix:
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
debug: [true, false]
zts: [true, false]
name: "${{ matrix.branch.name }}_LINUX_X32_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
MYSQL_TEST_HOST: mysql
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
PDO_MYSQL_TEST_HOST: mysql
services:
mysql:
image: mysql:8
ports:
- 3306:3306
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
steps:
- name: git checkout
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch.ref }}
- name: apt
uses: ./.github/actions/apt-x32
- name: ./configure
uses: ./.github/actions/configure-x32
with:
configurationParameters: >-
--${{ matrix.debug && 'enable' || 'disable' }}-debug
--${{ matrix.zts && 'enable' || 'disable' }}-zts
- name: make
run: make -j$(/usr/bin/nproc) >/dev/null
- name: make install
uses: ./.github/actions/install-linux-x32
- name: Test
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
- name: Test Tracing JIT
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable_cli=1
-d opcache.jit_buffer_size=16M
- name: Test OpCache
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable_cli=1
- name: Test Function JIT
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable_cli=1
-d opcache.jit_buffer_size=16M
-d opcache.jit=1205
MACOS:
needs: GENERATE_MATRIX
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,47 @@ jobs:
-d opcache.jit_buffer_size=16M
- name: Verify generated files are up to date
uses: ./.github/actions/verify-generated-files
LINUX_X32:
name: LINUX_X32_DEBUG_ZTS
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
MYSQL_TEST_HOST: mysql
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
PDO_MYSQL_TEST_HOST: mysql
services:
mysql:
image: mysql:8
ports:
- 3306:3306
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
steps:
- name: git checkout
uses: actions/checkout@v3
- name: apt
uses: ./.github/actions/apt-x32
- name: ./configure
uses: ./.github/actions/configure-x32
with:
configurationParameters: >-
--enable-debug
--enable-zts
- name: make
run: make -j$(/usr/bin/nproc) >/dev/null
- name: make install
uses: ./.github/actions/install-linux-x32
- name: Test
uses: ./.github/actions/test-linux
- name: Test Tracing JIT
uses: ./.github/actions/test-linux
with:
runTestsParameters: >-
-d zend_extension=opcache.so
-d opcache.enable_cli=1
-d opcache.jit_buffer_size=16M
MACOS_DEBUG_NTS:
runs-on: macos-11
steps:
Expand Down
51 changes: 0 additions & 51 deletions azure-pipelines.yml

This file was deleted.

46 changes: 0 additions & 46 deletions azure/i386/apt.yml

This file was deleted.

Loading