mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Migrate i386 to GitHub actions
This commit is contained in:
commit
ed1e703716
16 changed files with 209 additions and 203 deletions
52
.github/actions/apt-x32/action.yml
vendored
Normal file
52
.github/actions/apt-x32/action.yml
vendored
Normal file
|
@ -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
|
|
@ -1,22 +1,20 @@
|
|||
parameters:
|
||||
configurationName: ''
|
||||
configurationParameters: ''
|
||||
timeoutInMinutes: 75
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.configurationName }}
|
||||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
||||
pool:
|
||||
vmImage: 'ubuntu-20.04'
|
||||
name: ./configure
|
||||
inputs:
|
||||
configurationParameters:
|
||||
default: ''
|
||||
required: false
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- template: apt.yml
|
||||
- script: |
|
||||
- shell: bash
|
||||
run: |
|
||||
set -x
|
||||
|
||||
./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 \
|
||||
--build=i686-pc-linux-gnu \
|
||||
--prefix=/usr \
|
||||
|
@ -69,27 +67,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
.github/actions/install-linux-x32/action.yml
vendored
Normal file
15
.github/actions/install-linux-x32/action.yml
vendored
Normal file
|
@ -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
|
2
.github/actions/test-linux/action.yml
vendored
2
.github/actions/test-linux/action.yml
vendored
|
@ -11,7 +11,9 @@ runs:
|
|||
set -x
|
||||
export MYSQL_TEST_USER=root
|
||||
export MYSQL_TEST_PASSWD=root
|
||||
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"
|
||||
|
|
71
.github/workflows/nightly.yml
vendored
71
.github/workflows/nightly.yml
vendored
|
@ -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 != '[]' }}
|
||||
|
|
41
.github/workflows/push.yml
vendored
41
.github/workflows/push.yml
vendored
|
@ -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:
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- PHP-7.4
|
||||
- PHP-8.0
|
||||
- PHP-8.1
|
||||
- master
|
||||
paths:
|
||||
exclude:
|
||||
- docs/*
|
||||
- NEWS
|
||||
- UPGRADING
|
||||
- UPGRADING.INTERNALS
|
||||
- README.md
|
||||
- CONTRIBUTING.md
|
||||
- CODING_STANDARDS.md
|
||||
|
||||
schedules:
|
||||
- cron: "0 1 * * *"
|
||||
displayName: Nightly build
|
||||
branches:
|
||||
include:
|
||||
- PHP-7.4
|
||||
- PHP-8.0
|
||||
- PHP-8.1
|
||||
- master
|
||||
|
||||
jobs:
|
||||
- template: azure/i386/job.yml
|
||||
parameters:
|
||||
configurationName: I386_DEBUG_ZTS
|
||||
configurationParameters: '--enable-debug --enable-zts'
|
||||
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
|
||||
- template: azure/i386/job.yml
|
||||
parameters:
|
||||
configurationName: I386_DEBUG_NTS
|
||||
configurationParameters: '--enable-debug --disable-zts'
|
||||
- template: azure/i386/job.yml
|
||||
parameters:
|
||||
configurationName: I386_RELEASE_NTS
|
||||
configurationParameters: '--disable-debug --disable-zts'
|
||||
- template: azure/i386/job.yml
|
||||
parameters:
|
||||
configurationName: I386_RELEASE_ZTS
|
||||
configurationParameters: '--disable-debug --enable-zts'
|
|
@ -1,46 +0,0 @@
|
|||
parameters:
|
||||
packages: ''
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update -y | true
|
||||
sudo apt-get install -y gcc-multilib
|
||||
sudo apt-get install -y g++-multilib
|
||||
sudo apt-get purge -y libxml2
|
||||
# TODO: Reenable postgresql + postgresql-contrib packages once they work again.
|
||||
sudo apt-get purge -y libpq5
|
||||
sudo apt-get install -y libc6:i386
|
||||
sudo apt-get install -y bison \
|
||||
re2c \
|
||||
locales \
|
||||
language-pack-de \
|
||||
libssl-dev:i386 \
|
||||
zlib1g-dev:i386 \
|
||||
libxml2-dev:i386 \
|
||||
libgmp-dev:i386 \
|
||||
libicu-dev:i386 \
|
||||
libtidy-dev:i386 \
|
||||
libaspell-dev:i386 \
|
||||
libpspell-dev:i386 \
|
||||
libsasl2-dev:i386 \
|
||||
libxpm-dev:i386 \
|
||||
libjpeg-dev:i386 \
|
||||
libpng-dev:i386 \
|
||||
libzip-dev:i386 \
|
||||
libbz2-dev:i386 \
|
||||
libsqlite3-dev:i386 \
|
||||
libwebp-dev:i386 \
|
||||
libonig-dev:i386 \
|
||||
libkrb5-dev:i386 \
|
||||
libgssapi-krb5-2:i386 \
|
||||
libcurl4-openssl-dev:i386 \
|
||||
libxml2-dev:i386 \
|
||||
libxslt1-dev:i386 \
|
||||
libpq-dev:i386 \
|
||||
libreadline-dev:i386 \
|
||||
libffi-dev:i386 \
|
||||
libfreetype6-dev:i386 \
|
||||
libsodium-dev:i386 \
|
||||
${{ parameters.packages }}
|
||||
displayName: 'APT'
|
|
@ -1,36 +0,0 @@
|
|||
parameters:
|
||||
runTestsName: ''
|
||||
runTestsParameters: ''
|
||||
|
||||
steps:
|
||||
- script: |
|
||||
export MYSQL_TEST_USER=root
|
||||
export MYSQL_TEST_PASSWD=root
|
||||
export PDO_MYSQL_TEST_DSN="mysql:host=localhost;dbname=test"
|
||||
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"
|
||||
export PDO_DBLIB_TEST_USER="pdo_test"
|
||||
export PDO_DBLIB_TEST_PASS="password"
|
||||
export TEST_PHP_JUNIT=junit.xml
|
||||
export REPORT_EXIT_STATUS=no
|
||||
export SKIP_IO_CAPTURE_TESTS=1
|
||||
rm -rf junit.xml | true
|
||||
sapi/cli/php run-tests.php -P -q \
|
||||
-j$(/usr/bin/nproc) \
|
||||
-g FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP \
|
||||
--offline \
|
||||
--show-diff \
|
||||
--show-slow 1000 \
|
||||
--set-timeout 120 \
|
||||
${{ parameters.runTestsParameters }}
|
||||
displayName: 'Test ${{ parameters.configurationName }} ${{ parameters.runTestsName }}'
|
||||
condition: or(succeeded(), failed())
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: 'JUnit'
|
||||
testResultsFiles: junit.xml
|
||||
testRunTitle: '${{ parameters.configurationName }} ${{ parameters.runTestsName }}'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: 'Export ${{ parameters.configurationName }} ${{ parameters.runTestsName }} Results'
|
||||
condition: or(succeeded(), failed())
|
|
@ -1,35 +0,0 @@
|
|||
parameters:
|
||||
configurationName: ''
|
||||
runTestsParameters: ''
|
||||
|
||||
steps:
|
||||
- template: test.yml
|
||||
parameters:
|
||||
configurationName: ${{ parameters.configurationName }}
|
||||
runTestsParameters: ${{ parameters.runTestsParameters }}
|
||||
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
|
||||
- template: test.yml
|
||||
parameters:
|
||||
configurationName: ${{ parameters.configurationName }}
|
||||
runTestsName: 'OpCache'
|
||||
runTestsParameters: >-
|
||||
${{ parameters.runTestsParameters }}
|
||||
-d zend_extension=opcache.so
|
||||
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
|
||||
- template: test.yml
|
||||
parameters:
|
||||
configurationName: ${{ parameters.configurationName }}
|
||||
runTestsName: 'Function JIT'
|
||||
runTestsParameters: >-
|
||||
${{ parameters.runTestsParameters }}
|
||||
-d zend_extension=opcache.so
|
||||
-d opcache.jit_buffer_size=16M
|
||||
-d opcache.jit=1205
|
||||
- template: test.yml
|
||||
parameters:
|
||||
configurationName: ${{ parameters.configurationName }}
|
||||
runTestsName: 'Tracing JIT'
|
||||
runTestsParameters: >-
|
||||
${{ parameters.runTestsParameters }}
|
||||
-d zend_extension=opcache.so
|
||||
-d opcache.jit_buffer_size=16M
|
|
@ -3,10 +3,12 @@ FFI 300: FFI preloading
|
|||
--EXTENSIONS--
|
||||
ffi
|
||||
opcache
|
||||
posix
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') die('skip not for Windows');
|
||||
if (ini_get('opcache.preload_user')) die('skip FFI::load() does not support opcache.preload_user');
|
||||
if (posix_geteuid() == 0) die('skip Cannot run test as root.');
|
||||
?>
|
||||
--INI--
|
||||
ffi.enable=1
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
Bug #78761 (Zend memory heap corruption with preload and casting)
|
||||
--EXTENSIONS--
|
||||
ffi
|
||||
posix
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
|
||||
if (ini_get('opcache.preload_user')) die('skip FFI::load() does not support opcache.preload_user');
|
||||
if (posix_geteuid() == 0) die('skip Cannot run test as root.');
|
||||
?>
|
||||
--INI--
|
||||
opcache.enable_cli=1
|
||||
|
|
|
@ -6,6 +6,11 @@ posix
|
|||
--SKIPIF--
|
||||
<?php
|
||||
if (!function_exists("pcntl_unshare")) die("skip pcntl_unshare is not available");
|
||||
try {
|
||||
if (@pcntl_unshare(42) == false && pcntl_get_last_error() == PCNTL_EPERM) {
|
||||
die('skip Insufficient previleges');
|
||||
}
|
||||
} catch (\ValueError $e) {}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -14,6 +14,11 @@ if ($is_writable) die("skip cannot make file read-only");
|
|||
--INI--
|
||||
sendmail_path={MAIL:{PWD}/gh7875.mail.out}
|
||||
mail.log={PWD}/gh7875.mail.log
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('posix')) die('skip POSIX extension not loaded');
|
||||
if (posix_geteuid() == 0) die('skip Cannot run test as root.');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
function exception_error_handler($severity, $message, $file, $line) {
|
||||
|
|
|
@ -584,7 +584,7 @@ function main(): void
|
|||
$environment['SKIP_MSAN'] = 1;
|
||||
}
|
||||
|
||||
$lsanSuppressions = __DIR__ . '/azure/lsan-suppressions.txt';
|
||||
$lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt';
|
||||
if (file_exists($lsanSuppressions)) {
|
||||
$environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions
|
||||
. ':print_suppressions=0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue