Skip to content

Commit 86af42b

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Migrate i386 to GitHub actions
2 parents a9231e7 + b08901b commit 86af42b

File tree

16 files changed

+209
-206
lines changed

16 files changed

+209
-206
lines changed

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

Lines changed: 52 additions & 0 deletions
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

Lines changed: 12 additions & 38 deletions
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 }}
Lines changed: 15 additions & 0 deletions
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

Lines changed: 3 additions & 1 deletion
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

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

.github/workflows/push.yml

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

azure-pipelines.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

azure/i386/apt.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)