Skip to content

Commit bbc1c07

Browse files
committed
Fix Solaris tests and enable CI
1 parent bc79897 commit bbc1c07

File tree

94 files changed

+647
-391
lines changed

Some content is hidden

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

94 files changed

+647
-391
lines changed

.github/actions/solaris/action.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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+
# Temporarily disable sqlite, as FreeBSD ships it with disabled double quotes. We'll need to fix our tests.
19+
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269889
20+
prepare: |
21+
cd $GITHUB_WORKSPACE
22+
pkg install bison developer/icu libzip oniguruma re2c
23+
24+
./buildconf -f
25+
CC=gcc CXX=g++ \
26+
PATH=/usr/gnu/bin:/usr/bin \
27+
PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig \
28+
./configure \
29+
--prefix=/usr/local \
30+
--enable-debug \
31+
--enable-option-checking=fatal \
32+
--enable-fpm \
33+
--without-sqlite3 \
34+
--without-pdo-sqlite \
35+
--without-pear \
36+
--with-bz2 \
37+
--with-jpeg \
38+
--with-webp \
39+
--with-freetype \
40+
--enable-gd \
41+
--enable-exif \
42+
--with-zip \
43+
--with-zlib \
44+
--enable-soap \
45+
--enable-xmlreader \
46+
--with-xsl \
47+
--with-libxml \
48+
--enable-shmop \
49+
--enable-pcntl \
50+
--enable-mbstring \
51+
--with-curl \
52+
--enable-sockets \
53+
--with-openssl \
54+
--enable-bcmath \
55+
--enable-calendar \
56+
--enable-ftp \
57+
--enable-zend-test \
58+
--enable-dl-test=shared \
59+
--enable-intl \
60+
--with-mhash \
61+
--with-config-file-path=/etc \
62+
--with-config-file-scan-dir=/etc/php.d \
63+
${{ inputs.configurationParameters }}
64+
65+
gmake -j2
66+
mkdir /etc/php.d
67+
gmake install > /dev/null
68+
echo opcache.enable_cli=1 > /etc/php.d/opcache.ini
69+
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
70+
echo opcache.preload_user=root >> /etc/php.d/opcache.ini
71+
run: |
72+
cd $GITHUB_WORKSPACE
73+
74+
export SKIP_IO_CAPTURE_TESTS=1
75+
export CI_NO_IPV6=1
76+
export STACK_LIMIT_DEFAULTS_CHECK=1
77+
PATH=/usr/gnu/bin:/usr/bin \
78+
sapi/cli/php run-tests.php \
79+
-P -q -j1 \
80+
-g FAIL,BORK,LEAK,XLEAK \
81+
--no-progress \
82+
--offline \
83+
--show-diff \
84+
--show-slow 1000 \
85+
--set-timeout 120
86+
87+
if test "${{ inputs.runExtraTests }}" = "true"; then
88+
sapi/cli/php run-extra-tests.php
89+
fi

.github/workflows/nightly.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ on:
2929
run_freebsd_zts:
3030
required: true
3131
type: boolean
32+
run_solaris_zts:
33+
required: true
34+
type: boolean
3235
ubuntu_version:
3336
required: true
3437
type: string
@@ -1034,3 +1037,24 @@ jobs:
10341037
configurationParameters: >-
10351038
--${{ matrix.zts && 'enable' || 'disable' }}-zts
10361039
runExtraTests: true
1040+
SOLARIS:
1041+
strategy:
1042+
fail-fast: false
1043+
matrix:
1044+
zts: [true, false]
1045+
exclude:
1046+
- zts: ${{ !inputs.run_solaris_zts && true || '*never*' }}
1047+
name: "SOLARIS_${{ matrix.zts && 'ZTS' || 'NTS' }}"
1048+
runs-on: ubuntu-latest
1049+
timeout-minutes: 50
1050+
steps:
1051+
- name: git checkout
1052+
uses: actions/checkout@v5
1053+
with:
1054+
ref: ${{ inputs.branch }}
1055+
- name: Solaris
1056+
uses: ./.github/actions/solaris
1057+
with:
1058+
configurationParameters: >-
1059+
--${{ matrix.zts && 'enable' || 'disable' }}-zts
1060+
runExtraTests: true

.github/workflows/push.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- PHP-8.4
1919
- PHP-8.5
2020
- master
21+
- github-solaris-ci
2122
pull_request:
2223
paths-ignore: *ignore_paths
2324
branches:
@@ -409,3 +410,13 @@ jobs:
409410
uses: actions/checkout@v5
410411
- name: FreeBSD
411412
uses: ./.github/actions/freebsd
413+
SOLARIS:
414+
if: github.repository == 'psumbera/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
@@ -52,6 +52,7 @@ jobs:
5252
run_linux_ppc64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5353
run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5454
run_freebsd_zts: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }}
55+
run_solaris_zts: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }}
5556
ubuntu_version: ${{
5657
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
5758
|| '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/lib/parse_date.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,14 @@ static const timelib_tz_lookup_table timelib_timezone_utc[] = {
171171
};
172172

173173
#if defined(_POSIX_TZNAME_MAX)
174-
# define MAX_ABBR_LEN _POSIX_TZNAME_MAX
174+
/* Solaris exposes _POSIX_TZNAME_MAX = 3 unless _XPG6 is defined.
175+
* That is too small for real-world timezone abbreviations ("EDT", "CEST", ...).
176+
*/
177+
#if defined(__sun__) && _POSIX_TZNAME_MAX < 6
178+
#define MAX_ABBR_LEN 6
179+
#else
180+
#define MAX_ABBR_LEN _POSIX_TZNAME_MAX
181+
#endif
175182
#elif defined(TZNAME_MAX)
176183
# define MAX_ABBR_LEN TZNAME_MAX
177184
#else
@@ -24863,10 +24870,10 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain
2486324870
in.errors->error_messages = NULL;
2486424871

2486524872
if (len > 0) {
24866-
while (isspace(*s) && s < e) {
24873+
while (isspace((unsigned char)*s) && s < e) {
2486724874
s++;
2486824875
}
24869-
while (isspace(*e) && e > s) {
24876+
while (isspace((unsigned char)*e) && e > s) {
2487024877
e--;
2487124878
}
2487224879
}

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 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

0 commit comments

Comments
 (0)