Skip to content
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

Alpine ci nightly #9

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0b61b8d
PHP-8.3 is now for PHP-8.3.12-dev
bukka Aug 13, 2024
bf1b0eb
Merge branch 'PHP-8.3'
bukka Aug 13, 2024
5c9c275
Checks getrandom availability on solaris.
devnexen Aug 13, 2024
f1e5c63
Checks getrandom availability on solaris.
devnexen Aug 13, 2024
445ea01
Merge branch 'PHP-8.3'
devnexen Aug 13, 2024
8c3f5f9
[ci skip] update NEWS
devnexen Aug 13, 2024
4f58201
Merge branch 'PHP-8.2' into PHP-8.3
devnexen Aug 13, 2024
6e2bbc4
Merge branch 'PHP-8.3'
devnexen Aug 13, 2024
0b8fbac
ext/standard/info.c: Remove unreachable conditional branch
Girgias Aug 13, 2024
40d88ca
Fix test expectation for "Built by..." (#15383)
remicollet Aug 13, 2024
6f44a0d
Autotools: Use AS_* macros in embed SAPI (#15387)
petk Aug 13, 2024
b56f81c
Add configure phase dependencies to mysqlnd extension (#15380)
petk Aug 13, 2024
65a101f
Disable LSAN for crashing SOAP tests (GH-14562)
iluuu1994 Jun 13, 2024
2054c3d
Merge branch 'PHP-8.3'
iluuu1994 Aug 14, 2024
0217784
Replace uses of php_dirname() with zend_dirname() (#15393)
Girgias Aug 14, 2024
a79c70f
[RFC] Convert exit (and die) from language constructs to functions (…
Girgias Aug 14, 2024
d100caa
[skip ci] Add NEWS/UPGRADING + wording amendment for GH-13483
Girgias Aug 14, 2024
74bf894
ext/standard/info.c: Throw ValueErrors on invalid inputs to php_uname…
Girgias Aug 14, 2024
a2a3c5b
hash: Consistently check for PHP_HASH_INTRIN_SHA_* to guard compilati…
TimWolla Aug 14, 2024
cc0cce1
Alpine/Musl CI
arnaud-lb Apr 4, 2024
421d6f0
Review
arnaud-lb Jul 30, 2024
3ec9f2b
Nightly
arnaud-lb Aug 13, 2024
8069274
Remove redundancy
arnaud-lb Aug 14, 2024
14fbc0b
Add slack notif
arnaud-lb Aug 14, 2024
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
61 changes: 61 additions & 0 deletions .github/actions/apk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: apk
runs:
using: composite
steps:
- shell: sh
run: |
set -x

apk update -q
apk add \
util-linux \
bash \
sudo \
build-base \
autoconf \
unzip \
tar \
bison \
re2c \
pkgconf \
mysql-client \
aspell-dev \
hunspell-dev \
hunspell-en \
bzip2-dev \
curl-dev \
freetype-dev \
gettext-dev \
gnu-libiconv-dev \
gmp-dev \
icu-dev \
icu-data-full \
jpeg-dev \
libffi-dev \
libpng-dev \
libsodium-dev \
libwebp-dev \
libxml2-dev \
libxpm-dev \
libxslt-dev \
libzip-dev \
oniguruma-dev \
openssl-dev \
readline-dev \
sqlite-dev \
tidyhtml-dev \
krb5-dev \
gdbm-dev \
lmdb-dev \
argon2-dev \
enchant2-dev \
enchant2-hunspell \
freetds-dev \
imap-dev \
net-snmp-dev \
openldap-dev \
unixodbc-dev \
postgresql14-dev \
tzdata \
musl-locales \
musl-locales-lang
79 changes: 79 additions & 0 deletions .github/actions/configure-alpine/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: ./configure
inputs:
configurationParameters:
default: ''
required: false
skipSlow:
default: false
required: false
runs:
using: composite
steps:
- shell: bash
run: |
set -x
./buildconf --force
./configure \
--enable-option-checking=fatal \
--prefix=/usr \
--enable-phpdbg \
--enable-fpm \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
${{ inputs.skipSlow == 'false' && '--with-pgsql' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-pgsql' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-sqlite' || '' }} \
--enable-intl \
--without-pear \
--enable-gd \
--with-jpeg \
--with-webp \
--with-freetype \
--with-xpm \
--enable-exif \
--with-zip \
--with-zlib \
--enable-soap \
--enable-xmlreader \
--with-xsl \
${{ inputs.skipSlow == 'false' && '--with-tidy' || '' }} \
--enable-sysvsem \
--enable-sysvshm \
--enable-shmop \
--enable-pcntl \
--with-readline \
--enable-mbstring \
--with-iconv=/usr \
--with-curl \
--with-gettext \
--enable-sockets \
--with-bz2 \
--with-openssl \
--with-gmp \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \
--enable-sysvmsg \
--with-ffi \
--enable-zend-test \
${{ inputs.skipSlow == 'false' && '--enable-dl-test=shared' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-ldap' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-ldap-sasl' || '' }} \
--with-password-argon2 \
--with-mhash \
--with-sodium \
--enable-dba \
--with-cdb \
--enable-flatfile \
--enable-inifile \
--with-lmdb \
--with-gdbm \
${{ inputs.skipSlow == 'false' && '--with-snmp' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-unixODBC' || '' }} \
${{ inputs.skipSlow == 'false' && '--with-pdo-odbc=unixODBC,/usr' || '' }} \
--with-config-file-path=/etc \
--with-config-file-scan-dir=/etc/php.d \
${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \
--enable-werror \
${{ inputs.configurationParameters }}
10 changes: 10 additions & 0 deletions .github/actions/install-alpine/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Install
runs:
using: composite
steps:
- shell: bash
run: |
set -x
sudo make install
sudo mkdir -p /etc/php.d
sudo chmod 777 /etc/php.d
25 changes: 25 additions & 0 deletions .github/actions/test-alpine/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test
inputs:
runTestsParameters:
default: ''
required: false
jitType:
default: 'disable'
required: false
runs:
using: composite
steps:
- shell: bash
run: |
set -x
export SKIP_IO_CAPTURE_TESTS=1
export STACK_LIMIT_DEFAULTS_CHECK=1
sapi/cli/php run-tests.php -P -q ${{ inputs.runTestsParameters }} \
-d opcache.jit=${{ inputs.jitType }} \
-d opcache.jit_buffer_size=64M \
-j$(nproc) \
-g FAIL,BORK,LEAK,XLEAK \
--no-progress \
--show-diff \
--show-slow 1000 \
--set-timeout 120
22 changes: 22 additions & 0 deletions .github/nightly_matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,26 @@ function get_macos_matrix_include(array $branches) {
return $jobs;
}

function get_alpine_matrix_include(array $branches) {
$jobs = [];
foreach ($branches as $branch) {
if ([$branch['version']['major'], $branch['version']['minor']] < [8, 4]) {
continue;
}
$jobs[] = [
'name' => '_ASAN_UBSAN',
'branch' => $branch,
'debug' => true,
'zts' => true,
'asan' => true,
'test_jit' => true,
'configuration_parameters' => "CFLAGS='-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address -fno-sanitize=function' CC=clang-17 CXX=clang++-17",
'run_tests_parameters' => '--asan -x',
];
}
return $jobs;
}

function get_current_version(): array {
$file = dirname(__DIR__) . '/main/php_version.h';
$content = file_get_contents($file);
Expand All @@ -145,10 +165,12 @@ function get_current_version(): array {
$matrix_include = get_matrix_include($branches);
$windows_matrix_include = get_windows_matrix_include($branches);
$macos_matrix_include = get_macos_matrix_include($branches);
$alpine_matrix_include = get_alpine_matrix_include($branches);

$f = fopen(getenv('GITHUB_OUTPUT'), 'a');
fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n");
fwrite($f, 'matrix-include=' . json_encode($matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
fwrite($f, 'windows-matrix-include=' . json_encode($windows_matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
fwrite($f, 'macos-matrix-include=' . json_encode($macos_matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
fwrite($f, 'alpine-matrix-include=' . json_encode($alpine_matrix_include, JSON_UNESCAPED_SLASHES) . "\n");
fclose($f);
60 changes: 60 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix-include: ${{ steps.set-matrix.outputs.matrix-include }}
windows-matrix-include: ${{ steps.set-matrix.outputs.windows-matrix-include }}
macos-matrix-include: ${{ steps.set-matrix.outputs.macos-matrix-include }}
alpine-matrix-include: ${{ steps.set-matrix.outputs.alpine-matrix-include }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -39,6 +40,65 @@ jobs:
uses: ./.github/actions/notify-slack
with:
token: ${{ secrets.ACTION_MONITORING_SLACK }}
ALPINE:
needs: GENERATE_MATRIX
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.GENERATE_MATRIX.outputs.alpine-matrix-include) }}
name: "${{ matrix.branch.name }}_ALPINE_X64${{ matrix.name }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
runs-on: ubuntu-22.04
container:
image: 'alpine:3.20.1'
steps:
- name: git checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch.ref }}
- name: apk
uses: ./.github/actions/apk
- name: LLVM 17 (ASAN-only)
if: ${{ matrix.asan }}
# libclang_rt.asan-x86_64.a is provided by compiler-rt, and only for clang17:
# https://pkgs.alpinelinux.org/contents?file=libclang_rt.asan-x86_64.a&path=&name=&branch=v3.20
run: |
apk add clang17 compiler-rt
- name: System info
run: |
echo "::group::Show host CPU info"
lscpu
echo "::endgroup::"
echo "::group::Show installed package versions"
apk list
echo "::endgroup::"
- name: ./configure
uses: ./.github/actions/configure-alpine
with:
configurationParameters: >-
${{ matrix.configuration_parameters }}
--${{ matrix.debug && 'enable' || 'disable' }}-debug
--${{ matrix.zts && 'enable' || 'disable' }}-zts
skipSlow: ${{ matrix.asan }}
- name: make
run: make -j$(/usr/bin/nproc) >/dev/null
- name: make install
uses: ./.github/actions/install-alpine
- name: Test Tracing JIT
if: matrix.test_jit
uses: ./.github/actions/test-alpine
with:
jitType: tracing
runTestsParameters: >-
${{ matrix.run_tests_parameters }}
-d zend_extension=opcache.so
-d opcache.enable_cli=1
- name: Notify Slack
if: failure()
uses: ./.github/actions/notify-slack
with:
token: ${{ secrets.ACTION_MONITORING_SLACK }}

LINUX_X64:
needs: GENERATE_MATRIX
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
Expand Down
12 changes: 12 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ PHP NEWS

- Core:
. Exiting a namespace now clears seen symbols. (ilutov)
. The exit (and die) language constructs now behave more like a function.
They can be passed liked callables, are affected by the strict_types
declare statement, and now perform the usual type coercions instead of
casting any non-integer value to a string.
As such, passing invalid types to exit/die may now result in a TypeError
being thrown. (Girgias)

- Hash:
. Fix GH-15384 (Build fails on Alpine / Musl for amd64). (timwolla)

- Standard:
. php_uname() now throws ValueErrors on invalid inputs. (Girgias)

15 Aug 2024, PHP 8.4.0beta1

Expand Down
8 changes: 8 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ PHP 8.4 UPGRADE NOTES
allowed, e.g. $ref = &$this->readonly. This was already forbidden for
readonly initialization, and was an oversight in the "readonly
reinitialization during cloning" implementation.
. The exit (and die) language constructs now behave more like a function.
They can be passed liked callables, are affected by the strict_types
declare statement, and now perform the usual type coercions instead of
casting any non-integer value to a string.
As such, passing invalid types to exit/die may now result in a TypeError
being thrown.
RFC: https://wiki.php.net/rfc/exit-as-function

- DBA:
. dba_open() and dba_popen() will now return a Dba\Connection
Expand Down Expand Up @@ -193,6 +200,7 @@ PHP 8.4 UPGRADE NOTES
$enclosure arguments are not one byte long, or if the $escape is not one
byte long or the empty string. This aligns the behaviour to be identical
to that of fputcsv() and fgetcsv().
. php_uname() now throws ValueErrors on invalid inputs.

- Tidy:
. Failures in the constructor now throw exceptions rather than emitting
Expand Down
4 changes: 1 addition & 3 deletions Zend/Optimizer/block_pass.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,6 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
break;

case ZEND_RETURN:
case ZEND_EXIT:
if (opline->op1_type == IS_TMP_VAR) {
src = VAR_SOURCE(opline->op1);
if (src && src->opcode == ZEND_QM_ASSIGN) {
Expand Down Expand Up @@ -1221,8 +1220,7 @@ static void zend_jmp_optimization(zend_basic_block *block, zend_op_array *op_arr
target = op_array->opcodes + target_block->start;
if ((target->opcode == ZEND_RETURN ||
target->opcode == ZEND_RETURN_BY_REF ||
target->opcode == ZEND_GENERATOR_RETURN ||
target->opcode == ZEND_EXIT) &&
target->opcode == ZEND_GENERATOR_RETURN) &&
!(op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
/* JMP L, L: RETURN to immediate RETURN */
*last_op = *target;
Expand Down
1 change: 0 additions & 1 deletion Zend/Optimizer/pass1.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx)
case ZEND_RETURN:
case ZEND_RETURN_BY_REF:
case ZEND_GENERATOR_RETURN:
case ZEND_EXIT:
case ZEND_THROW:
case ZEND_MATCH_ERROR:
case ZEND_CATCH:
Expand Down
3 changes: 1 addition & 2 deletions Zend/Optimizer/pass3.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ void zend_optimizer_pass3(zend_op_array *op_array, zend_optimizer_ctx *ctx)
MAKE_NOP(opline);
} else if ((target->opcode == ZEND_RETURN ||
target->opcode == ZEND_RETURN_BY_REF ||
target->opcode == ZEND_GENERATOR_RETURN ||
target->opcode == ZEND_EXIT) &&
target->opcode == ZEND_GENERATOR_RETURN) &&
!(op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK)) {
/* JMP L, L: RETURN to immediate RETURN */
*opline = *target;
Expand Down
4 changes: 0 additions & 4 deletions Zend/Optimizer/zend_call_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ ZEND_API void zend_analyze_calls(zend_arena **arena, zend_script *script, uint32
call_info->send_unpack = 1;
}
break;
case ZEND_EXIT:
/* In this case the DO_CALL opcode may have been dropped
* and caller_call_opline will be NULL. */
break;
}
opline++;
}
Expand Down
2 changes: 0 additions & 2 deletions Zend/Optimizer/zend_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array,
}
break;
case ZEND_MATCH_ERROR:
case ZEND_EXIT:
case ZEND_THROW:
/* Don't treat THROW as terminator if it's used in expression context,
* as we may lose live ranges when eliminating unreachable code. */
Expand Down Expand Up @@ -506,7 +505,6 @@ ZEND_API void zend_build_cfg(zend_arena **arena, const zend_op_array *op_array,
case ZEND_RETURN:
case ZEND_RETURN_BY_REF:
case ZEND_GENERATOR_RETURN:
case ZEND_EXIT:
case ZEND_THROW:
case ZEND_MATCH_ERROR:
case ZEND_VERIFY_NEVER_TYPE:
Expand Down
Loading
Loading