Skip to content

Commit b08901b

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Migrate i386 to GitHub actions
2 parents cc9ddde + ed1e703 commit b08901b

File tree

16 files changed

+209
-206
lines changed

16 files changed

+209
-206
lines changed

.github/actions/apt-x32/action.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: apt
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
9+
export DEBIAN_FRONTEND=noninteractive
10+
dpkg --add-architecture i386
11+
apt-get update -y | true
12+
# TODO: Reenable postgresql + postgresql-contrib packages once they work again.
13+
apt-get install -y \
14+
autoconf \
15+
bison \
16+
g++-multilib \
17+
gcc-multilib \
18+
language-pack-de \
19+
libaspell-dev:i386 \
20+
libbz2-dev:i386 \
21+
libc6:i386 \
22+
libcurl4-openssl-dev:i386 \
23+
libffi-dev:i386 \
24+
libfreetype6-dev:i386 \
25+
libgmp-dev:i386 \
26+
libgssapi-krb5-2:i386 \
27+
libicu-dev:i386 \
28+
libjpeg-dev:i386 \
29+
libkrb5-dev:i386 \
30+
libonig-dev:i386 \
31+
libpng-dev:i386 \
32+
libpq-dev:i386 \
33+
libpspell-dev:i386 \
34+
libreadline-dev:i386 \
35+
libsasl2-dev:i386 \
36+
libsodium-dev:i386 \
37+
libsqlite3-dev:i386 \
38+
libssl-dev:i386 \
39+
libtidy-dev:i386 \
40+
libwebp-dev:i386 \
41+
libxml2-dev:i386 \
42+
libxml2-dev:i386 \
43+
libxpm-dev:i386 \
44+
libxslt1-dev:i386 \
45+
libzip-dev:i386 \
46+
locales \
47+
make \
48+
pkg-config:i386 \
49+
re2c \
50+
unzip \
51+
wget \
52+
zlib1g-dev:i386

azure/i386/job.yml renamed to .github/actions/configure-x32/action.yml

+12-38
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
parameters:
2-
configurationName: ''
3-
configurationParameters: ''
4-
timeoutInMinutes: 75
1+
name: ./configure
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
runs:
7+
using: composite
8+
steps:
9+
- shell: bash
10+
run: |
11+
set -x
512
6-
jobs:
7-
- job: ${{ parameters.configurationName }}
8-
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
9-
pool:
10-
vmImage: 'ubuntu-20.04'
11-
steps:
12-
- template: apt.yml
13-
- script: |
1413
./buildconf --force
1514
export CFLAGS="-m32 -msse2"
1615
export CXXFLAGS="-m32 -msse2"
1716
export LDFLAGS=-L/usr/lib/i386-linux-gnu
18-
export PKG_CONFIG=/usr/bin/i686-linux-gnu-pkg-config
19-
./configure ${{ parameters.configurationParameters }} \
17+
./configure ${{ inputs.configurationParameters }} \
2018
--enable-option-checking=fatal \
2119
--build=i686-pc-linux-gnu \
2220
--prefix=/usr \
@@ -69,27 +67,3 @@ jobs:
6967
--enable-werror \
7068
--with-config-file-path=/etc \
7169
--with-config-file-scan-dir=/etc/php.d
72-
displayName: 'Configure Build'
73-
- script: make -j$(/usr/bin/nproc) >/dev/null
74-
displayName: 'Make Build'
75-
- script: |
76-
set -e
77-
sudo make install
78-
sudo mkdir /etc/php.d
79-
sudo chmod 777 /etc/php.d
80-
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
81-
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
82-
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
83-
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
84-
displayName: 'Install Build'
85-
- script: |
86-
set -e
87-
sudo service mysql start
88-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
89-
#sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
90-
#sudo -u postgres psql -c "CREATE DATABASE test;"
91-
displayName: 'Setup'
92-
- template: ../tests.yml
93-
parameters:
94-
configurationName: ${{ parameters.configurationName }}
95-
runTestsParameters: ${{ parameters.runTestsParameters }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Install
2+
runs:
3+
using: composite
4+
steps:
5+
- shell: bash
6+
run: |
7+
set -x
8+
make install
9+
mkdir /etc/php.d
10+
chmod 777 /etc/php.d
11+
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
12+
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
13+
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
14+
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
15+
echo opcache.preload_user=root >> /etc/php.d/opcache.ini

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ runs:
1414
set -x
1515
export MYSQL_TEST_USER=root
1616
export MYSQL_TEST_PASSWD=root
17-
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
17+
if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
18+
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
19+
fi
1820
export PDO_MYSQL_TEST_USER=root
1921
export PDO_MYSQL_TEST_PASS=root
2022
export PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0"
File renamed without changes.

.github/workflows/nightly.yml

+71
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,77 @@ jobs:
106106
-d opcache.jit=1205
107107
- name: Verify generated files are up to date
108108
uses: ./.github/actions/verify-generated-files
109+
LINUX_X32:
110+
needs: GENERATE_MATRIX
111+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
112+
strategy:
113+
fail-fast: false
114+
matrix:
115+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
116+
debug: [true, false]
117+
zts: [true, false]
118+
name: "${{ matrix.branch.name }}_LINUX_X32_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
119+
runs-on: ubuntu-latest
120+
container:
121+
image: ubuntu:20.04
122+
env:
123+
MYSQL_TEST_HOST: mysql
124+
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
125+
PDO_MYSQL_TEST_HOST: mysql
126+
services:
127+
mysql:
128+
image: mysql:8
129+
ports:
130+
- 3306:3306
131+
env:
132+
MYSQL_DATABASE: test
133+
MYSQL_ROOT_PASSWORD: root
134+
steps:
135+
- name: git checkout
136+
uses: actions/checkout@v3
137+
with:
138+
ref: ${{ matrix.branch.ref }}
139+
- name: apt
140+
uses: ./.github/actions/apt-x32
141+
- name: ./configure
142+
uses: ./.github/actions/configure-x32
143+
with:
144+
configurationParameters: >-
145+
--${{ matrix.debug && 'enable' || 'disable' }}-debug
146+
--${{ matrix.zts && 'enable' || 'disable' }}-zts
147+
- name: make
148+
run: make -j$(/usr/bin/nproc) >/dev/null
149+
- name: make install
150+
uses: ./.github/actions/install-linux-x32
151+
- name: Test
152+
uses: ./.github/actions/test-linux
153+
with:
154+
runTestsParameters: >-
155+
${{ matrix.run_tests_parameters }}
156+
- name: Test Tracing JIT
157+
uses: ./.github/actions/test-linux
158+
with:
159+
runTestsParameters: >-
160+
${{ matrix.run_tests_parameters }}
161+
-d zend_extension=opcache.so
162+
-d opcache.enable_cli=1
163+
-d opcache.jit_buffer_size=16M
164+
- name: Test OpCache
165+
uses: ./.github/actions/test-linux
166+
with:
167+
runTestsParameters: >-
168+
${{ matrix.run_tests_parameters }}
169+
-d zend_extension=opcache.so
170+
-d opcache.enable_cli=1
171+
- name: Test Function JIT
172+
uses: ./.github/actions/test-linux
173+
with:
174+
runTestsParameters: >-
175+
${{ matrix.run_tests_parameters }}
176+
-d zend_extension=opcache.so
177+
-d opcache.enable_cli=1
178+
-d opcache.jit_buffer_size=16M
179+
-d opcache.jit=1205
109180
MACOS:
110181
needs: GENERATE_MATRIX
111182
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}

.github/workflows/push.yml

+41
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,47 @@ jobs:
6565
-d opcache.jit_buffer_size=16M
6666
- name: Verify generated files are up to date
6767
uses: ./.github/actions/verify-generated-files
68+
LINUX_X32:
69+
name: LINUX_X32_DEBUG_ZTS
70+
runs-on: ubuntu-latest
71+
container:
72+
image: ubuntu:20.04
73+
env:
74+
MYSQL_TEST_HOST: mysql
75+
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
76+
PDO_MYSQL_TEST_HOST: mysql
77+
services:
78+
mysql:
79+
image: mysql:8
80+
ports:
81+
- 3306:3306
82+
env:
83+
MYSQL_DATABASE: test
84+
MYSQL_ROOT_PASSWORD: root
85+
steps:
86+
- name: git checkout
87+
uses: actions/checkout@v3
88+
- name: apt
89+
uses: ./.github/actions/apt-x32
90+
- name: ./configure
91+
uses: ./.github/actions/configure-x32
92+
with:
93+
configurationParameters: >-
94+
--enable-debug
95+
--enable-zts
96+
- name: make
97+
run: make -j$(/usr/bin/nproc) >/dev/null
98+
- name: make install
99+
uses: ./.github/actions/install-linux-x32
100+
- name: Test
101+
uses: ./.github/actions/test-linux
102+
- name: Test Tracing JIT
103+
uses: ./.github/actions/test-linux
104+
with:
105+
runTestsParameters: >-
106+
-d zend_extension=opcache.so
107+
-d opcache.enable_cli=1
108+
-d opcache.jit_buffer_size=16M
68109
MACOS_DEBUG_NTS:
69110
runs-on: macos-11
70111
steps:

azure-pipelines.yml

-48
This file was deleted.

azure/i386/apt.yml

-46
This file was deleted.

0 commit comments

Comments
 (0)