Skip to content

Commit 7597007

Browse files
committed
Migrate i386 to GitHub actions
Closes GH-9856
1 parent d1c9ff5 commit 7597007

File tree

16 files changed

+209
-205
lines changed

16 files changed

+209
-205
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
--prefix=/usr \
2220
--enable-phpdbg \
@@ -67,27 +65,3 @@ jobs:
6765
--enable-werror \
6866
--with-config-file-path=/etc \
6967
--with-config-file-scan-dir=/etc/php.d
70-
displayName: 'Configure Build'
71-
- script: make -j$(/usr/bin/nproc) >/dev/null
72-
displayName: 'Make Build'
73-
- script: |
74-
set -e
75-
sudo make install
76-
sudo mkdir /etc/php.d
77-
sudo chmod 777 /etc/php.d
78-
echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini
79-
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
80-
echo opcache.enable_cli=1 >> /etc/php.d/opcache.ini
81-
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
82-
displayName: 'Install Build'
83-
- script: |
84-
set -e
85-
sudo service mysql start
86-
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
87-
#sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
88-
#sudo -u postgres psql -c "CREATE DATABASE test;"
89-
displayName: 'Setup'
90-
- template: ../tests.yml
91-
parameters:
92-
configurationName: ${{ parameters.configurationName }}
93-
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
@@ -11,7 +11,9 @@ runs:
1111
set -x
1212
export MYSQL_TEST_USER=root
1313
export MYSQL_TEST_PASSWD=root
14-
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
14+
if [[ -z "$PDO_MYSQL_TEST_DSN" ]]; then
15+
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
16+
fi
1517
export PDO_MYSQL_TEST_USER=root
1618
export PDO_MYSQL_TEST_PASS=root
1719
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
@@ -102,6 +102,77 @@ jobs:
102102
-d opcache.jit=1205
103103
- name: Verify generated files are up to date
104104
uses: ./.github/actions/verify-generated-files
105+
LINUX_X32:
106+
needs: GENERATE_MATRIX
107+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
108+
strategy:
109+
fail-fast: false
110+
matrix:
111+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
112+
debug: [true, false]
113+
zts: [true, false]
114+
name: "${{ matrix.branch.name }}_LINUX_X32_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
115+
runs-on: ubuntu-latest
116+
container:
117+
image: ubuntu:20.04
118+
env:
119+
MYSQL_TEST_HOST: mysql
120+
PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test
121+
PDO_MYSQL_TEST_HOST: mysql
122+
services:
123+
mysql:
124+
image: mysql:8
125+
ports:
126+
- 3306:3306
127+
env:
128+
MYSQL_DATABASE: test
129+
MYSQL_ROOT_PASSWORD: root
130+
steps:
131+
- name: git checkout
132+
uses: actions/checkout@v3
133+
with:
134+
ref: ${{ matrix.branch.ref }}
135+
- name: apt
136+
uses: ./.github/actions/apt-x32
137+
- name: ./configure
138+
uses: ./.github/actions/configure-x32
139+
with:
140+
configurationParameters: >-
141+
--${{ matrix.debug && 'enable' || 'disable' }}-debug
142+
--${{ matrix.zts && 'enable' || 'disable' }}-zts
143+
- name: make
144+
run: make -j$(/usr/bin/nproc) >/dev/null
145+
- name: make install
146+
uses: ./.github/actions/install-linux-x32
147+
- name: Test
148+
uses: ./.github/actions/test-linux
149+
with:
150+
runTestsParameters: >-
151+
${{ matrix.run_tests_parameters }}
152+
- name: Test Tracing JIT
153+
uses: ./.github/actions/test-linux
154+
with:
155+
runTestsParameters: >-
156+
${{ matrix.run_tests_parameters }}
157+
-d zend_extension=opcache.so
158+
-d opcache.enable_cli=1
159+
-d opcache.jit_buffer_size=16M
160+
- name: Test OpCache
161+
uses: ./.github/actions/test-linux
162+
with:
163+
runTestsParameters: >-
164+
${{ matrix.run_tests_parameters }}
165+
-d zend_extension=opcache.so
166+
-d opcache.enable_cli=1
167+
- name: Test Function JIT
168+
uses: ./.github/actions/test-linux
169+
with:
170+
runTestsParameters: >-
171+
${{ matrix.run_tests_parameters }}
172+
-d zend_extension=opcache.so
173+
-d opcache.enable_cli=1
174+
-d opcache.jit_buffer_size=16M
175+
-d opcache.jit=1205
105176
MACOS:
106177
needs: GENERATE_MATRIX
107178
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}

.github/workflows/push.yml

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

azure-pipelines.yml

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

azure/i386/apt.yml

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

0 commit comments

Comments
 (0)