Skip to content

Commit d4d0613

Browse files
committed
Fix Solaris tests and enable CI
1 parent 95fb174 commit d4d0613

File tree

89 files changed

+620
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+620
-370
lines changed

.github/actions/solaris/action.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Solaris
2+
inputs:
3+
configurationParameters:
4+
default: ''
5+
required: false
6+
runExtraTests:
7+
default: false
8+
required: false
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Solaris
13+
uses: vmactions/solaris-vm@v1
14+
with:
15+
release: "11.4-gcc"
16+
usesh: true
17+
copyback: false
18+
disable-cache: true
19+
prepare: |
20+
cd $GITHUB_WORKSPACE
21+
pkg install bison developer/icu libzip oniguruma re2c
22+
23+
./buildconf -f
24+
CC=gcc CXX=g++ \
25+
PATH=/usr/gnu/bin:/usr/bin \
26+
PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig \
27+
./configure \
28+
--prefix=/usr/local \
29+
--enable-debug \
30+
--enable-option-checking=fatal \
31+
--enable-fpm \
32+
--without-pear \
33+
--with-bz2 \
34+
--with-jpeg \
35+
--with-webp \
36+
--with-freetype \
37+
--enable-gd \
38+
--enable-exif \
39+
--with-zip \
40+
--with-zlib \
41+
--enable-soap \
42+
--enable-xmlreader \
43+
--with-xsl \
44+
--with-libxml \
45+
--enable-shmop \
46+
--enable-pcntl \
47+
--enable-mbstring \
48+
--with-curl \
49+
--enable-sockets \
50+
--with-openssl \
51+
--enable-bcmath \
52+
--enable-calendar \
53+
--enable-ftp \
54+
--enable-zend-test \
55+
--enable-dl-test=shared \
56+
--enable-intl \
57+
--with-mhash \
58+
--with-config-file-path=/etc \
59+
--with-config-file-scan-dir=/etc/php.d \
60+
${{ inputs.configurationParameters }}
61+
62+
gmake -j2
63+
mkdir /etc/php.d
64+
gmake install > /dev/null
65+
echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
66+
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
67+
echo opcache.preload_user=root >> /etc/php.d/opcache.ini
68+
run: |
69+
cd $GITHUB_WORKSPACE
70+
71+
export SKIP_BROKEN_PSET_CREATE=1
72+
export SKIP_IO_CAPTURE_TESTS=1
73+
export CI_NO_IPV6=1
74+
export STACK_LIMIT_DEFAULTS_CHECK=1
75+
PATH=/usr/gnu/bin:/usr/bin \
76+
sapi/cli/php run-tests.php \
77+
-P -q -j1 \
78+
-g FAIL,BORK,LEAK,XLEAK \
79+
--no-progress \
80+
--offline \
81+
--show-diff \
82+
--show-slow 1000 \
83+
--set-timeout 120
84+
85+
if test "${{ inputs.runExtraTests }}" = "true"; then
86+
sapi/cli/php run-extra-tests.php
87+
fi

.github/workflows/nightly.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
run_freebsd_zts:
2727
required: true
2828
type: boolean
29+
run_solaris:
30+
required: true
31+
type: boolean
2932
ubuntu_version:
3033
required: true
3134
type: string
@@ -1026,3 +1029,18 @@ jobs:
10261029
configurationParameters: >-
10271030
--${{ matrix.zts && 'enable' || 'disable' }}-zts
10281031
runExtraTests: true
1032+
SOLARIS:
1033+
if: inputs.run_solaris
1034+
name: "SOLARIS"
1035+
runs-on: ubuntu-latest
1036+
timeout-minutes: 50
1037+
steps:
1038+
- name: git checkout
1039+
uses: actions/checkout@v5
1040+
with:
1041+
ref: ${{ inputs.branch }}
1042+
- name: Solaris
1043+
uses: ./.github/actions/solaris
1044+
with:
1045+
configurationParameters: --disable-zts
1046+
runExtraTests: true

.github/workflows/push.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- PHP-8.4
1818
- PHP-8.5
1919
- master
20+
- github-solaris-ci
2021
pull_request:
2122
paths-ignore: *ignore_paths
2223
branches:
@@ -409,3 +410,13 @@ jobs:
409410
uses: actions/checkout@v6
410411
- name: FreeBSD
411412
uses: ./.github/actions/freebsd
413+
SOLARIS:
414+
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
415+
name: SOLARIS
416+
runs-on: ubuntu-latest
417+
timeout-minutes: 50
418+
steps:
419+
- name: git checkout
420+
uses: actions/checkout@v5
421+
- name: Solaris
422+
uses: ./.github/actions/solaris

.github/workflows/root.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
run_linux_ppc64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5252
run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5353
run_freebsd_zts: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }}
54+
run_solaris: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 6) || matrix.branch.version[0] >= 9 }}
5455
ubuntu_version: ${{
5556
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
5657
|| '22.04' }}

Zend/tests/stack_limit/stack_limit_010.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ $expectedMaxSize = match(php_uname('s')) {
2727
'true' => 16*1024*1024, // https://github.com/actions/runner-images/pull/3328
2828
default => 8*1024*1024,
2929
},
30-
'SunOS' => 10 * 1024 * 1024,
30+
'SunOS' => preg_match('/(omnios|illumos|smartos|oi-|openindiana|joyent)/i', php_uname('v'))
31+
? 10 * 1024 * 1024
32+
: 8 * 1024 * 1024,
3133
'Windows NT' => 67108864 - 4*4096, // Set by sapi/cli/config.w32
3234
};
3335

ext/calendar/tests/unixtojd.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
--TEST--
22
unixtojd()
3+
--SKIPIF--
4+
<?php
5+
if (PHP_OS_FAMILY === 'Solaris') {
6+
die("skip Solaris localtime() produces different Julian day");
7+
}
8+
?>
39
--EXTENSIONS--
410
calendar
511
--ENV--

ext/ctype/tests/bug25745.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Bug #25745 (ctype functions fail with non-ascii characters)
33
--EXTENSIONS--
44
ctype
5+
--SKIPIF--
6+
<?php
7+
if (PHP_OS_FAMILY === 'Solaris') {
8+
die("skip not valid fo Solaris");
9+
}
10+
?>
511
--INI--
612
error_reporting=E_ALL&~E_DEPRECATED
713
--FILE--

ext/date/tests/bug33532.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error_reporting=2047
55
date.timezone=UTC
66
--SKIPIF--
77
<?php
8-
if(PHP_OS == 'Darwin' || defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip strftime uses system TZ on Darwin and Windows");
8+
if(PHP_OS == 'Darwin' || PHP_OS_FAMILY === 'Solaris' || defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip strftime uses system TZ on Darwin, Solaris and Windows");
99
if (!@strftime('%Z')) die('skip strftime does not support %Z');
1010
?>
1111
--FILE--

ext/date/tests/gmstrftime_variation16.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Test gmstrftime() function : usage variation - Checking time related formats whi
55
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
66
die("skip Test is not valid for Windows");
77
}
8+
if (PHP_OS_FAMILY === 'Solaris') {
9+
die("skip Solaris uses ' 8:08:08 AM' for %r (time format differs)");
10+
}
811
?>
912
--FILE--
1013
<?php

ext/date/tests/strftime_variation16.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Test strftime() function : usage variation - Checking time related formats which
55
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
66
die("skip Test is not valid for Windows");
77
}
8+
if (PHP_OS_FAMILY === 'Solaris') {
9+
die("skip Solaris uses ' 8:08:08 AM' for %r (time format differs)");
10+
}
811
?>
912
--FILE--
1013
<?php

0 commit comments

Comments
 (0)