Skip to content

Commit 1671c9b

Browse files
committed
Add Solaris CI
1 parent a4bb5b9 commit 1671c9b

Some content is hidden

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

59 files changed

+537
-324
lines changed

.github/actions/solaris/action.yml

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

.github/workflows/nightly.yml

Lines changed: 24 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_zts:
30+
required: true
31+
type: boolean
2932
ubuntu_version:
3033
required: true
3134
type: string
@@ -1080,3 +1083,24 @@ jobs:
10801083
configurationParameters: >-
10811084
--${{ matrix.zts && 'enable' || 'disable' }}-zts
10821085
runExtraTests: true
1086+
SOLARIS:
1087+
strategy:
1088+
fail-fast: false
1089+
matrix:
1090+
zts: [true, false]
1091+
exclude:
1092+
- zts: ${{ !inputs.run_solaris_zts && true || '*never*' }}
1093+
name: "FREEBSD_${{ matrix.zts && 'ZTS' || 'NTS' }}"
1094+
runs-on: ubuntu-latest
1095+
timeout-minutes: 50
1096+
steps:
1097+
- name: git checkout
1098+
uses: actions/checkout@v5
1099+
with:
1100+
ref: ${{ inputs.branch }}
1101+
- name: FreeBSD
1102+
uses: ./.github/actions/solaris
1103+
with:
1104+
configurationParameters: >-
1105+
--${{ matrix.zts && 'enable' || 'disable' }}-zts
1106+
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.3
1818
- PHP-8.4
1919
- master
20+
- github-solaris-ci
2021
pull_request:
2122
paths-ignore:
2223
- docs/**
@@ -373,3 +374,13 @@ jobs:
373374
uses: actions/checkout@v5
374375
- name: FreeBSD
375376
uses: ./.github/actions/freebsd
377+
SOLARIS:
378+
if: github.repository == 'psumbera/php-src' || github.event_name == 'pull_request'
379+
name: SOLARIS
380+
runs-on: ubuntu-latest
381+
timeout-minutes: 150
382+
steps:
383+
- name: git checkout
384+
uses: actions/checkout@v5
385+
- name: Solaris
386+
uses: ./.github/actions/solaris

.github/workflows/root.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
run_linux_ppc64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5757
run_macos_arm64: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5858
run_freebsd_zts: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }}
59+
run_solaris_zts: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 3) || matrix.branch.version[0] >= 9 }}
5960
ubuntu_version: ${{
6061
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
6162
|| '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 (stripos(PHP_OS, 'SunOS') !== false) {
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 (stripos(PHP_OS, 'SunOS') !== false) {
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: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,15 @@ 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+
* PHP requires full abbreviations, so enforce a sane minimum of 6.
177+
*/
178+
#if defined(__sun__) && _POSIX_TZNAME_MAX < 6
179+
#define MAX_ABBR_LEN 6
180+
#else
181+
#define MAX_ABBR_LEN _POSIX_TZNAME_MAX
182+
#endif
175183
#elif defined(TZNAME_MAX)
176184
# define MAX_ABBR_LEN TZNAME_MAX
177185
#else
@@ -24860,10 +24868,10 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain
2486024868
in.errors->error_messages = NULL;
2486124869

2486224870
if (len > 0) {
24863-
while (isspace(*s) && s < e) {
24871+
while (isspace((unsigned char)*s) && s < e) {
2486424872
s++;
2486524873
}
24866-
while (isspace(*e) && e > s) {
24874+
while (isspace((unsigned char)*e) && e > s) {
2486724875
e--;
2486824876
}
2486924877
}

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 == 'SunOS' || 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 (stripos(PHP_OS, 'SunOS') !== false) {
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)