From c21af8c598f07ed3f4363850717e3455c8057be3 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 4 Mar 2026 10:11:00 +0100 Subject: [PATCH] Backport .github changes for Solaris --- .github/actions/solaris/action.yml | 88 ++++++++++++++++++++++++++++++ .github/matrix.php | 4 ++ .github/workflows/test-suite.yml | 15 +++++ 3 files changed, 107 insertions(+) create mode 100644 .github/actions/solaris/action.yml diff --git a/.github/actions/solaris/action.yml b/.github/actions/solaris/action.yml new file mode 100644 index 00000000000..ef7cffe32ab --- /dev/null +++ b/.github/actions/solaris/action.yml @@ -0,0 +1,88 @@ +name: Solaris +inputs: + configurationParameters: + default: '' + required: false + runExtraTests: + default: false + required: false +runs: + using: composite + steps: + - name: Solaris + uses: vmactions/solaris-vm@v1 + with: + release: "11.4-gcc" + usesh: true + copyback: false + disable-cache: true + prepare: | + cd $GITHUB_WORKSPACE + pkg install bison developer/icu libzip oniguruma re2c + + ./buildconf -f + CC=gcc CXX=g++ \ + CFLAGS="-Wno-char-subscripts" \ + PATH=/usr/gnu/bin:/usr/bin \ + PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig \ + ./configure \ + --prefix=/usr/local \ + --enable-debug \ + --enable-werror \ + --enable-option-checking=fatal \ + --enable-fpm \ + --without-pear \ + --with-bz2 \ + --with-jpeg \ + --with-webp \ + --with-freetype \ + --enable-gd \ + --enable-exif \ + --with-zip \ + --with-zlib \ + --enable-soap \ + --enable-xmlreader \ + --with-xsl \ + --with-libxml \ + --enable-shmop \ + --enable-pcntl \ + --enable-mbstring \ + --with-curl \ + --enable-sockets \ + --with-openssl \ + --enable-bcmath \ + --enable-calendar \ + --enable-ftp \ + --enable-zend-test \ + --enable-dl-test=shared \ + --enable-intl \ + --with-mhash \ + --with-config-file-path=/etc \ + --with-config-file-scan-dir=/etc/php.d \ + ${{ inputs.configurationParameters }} + + gmake -j2 + mkdir /etc/php.d + gmake install > /dev/null + 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 + run: | + cd $GITHUB_WORKSPACE + + export SKIP_IO_CAPTURE_TESTS=1 + export CI_NO_IPV6=1 + export STACK_LIMIT_DEFAULTS_CHECK=1 + PATH=/usr/gnu/bin:/usr/bin \ + sapi/cli/php run-tests.php \ + -P -q -j1 \ + -g FAIL,BORK,LEAK,XLEAK \ + --no-progress \ + --offline \ + --show-diff \ + --show-slow 1000 \ + --set-timeout 120 + + if test "${{ inputs.runExtraTests }}" = "true"; then + sapi/cli/php run-extra-tests.php + fi diff --git a/.github/matrix.php b/.github/matrix.php index 64bb60519de..2ce59cb657b 100644 --- a/.github/matrix.php +++ b/.github/matrix.php @@ -62,6 +62,7 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re $test_msan = in_array('CI: MSAN', $labels, true); $test_opcache_variation = in_array('CI: Opcache Variation', $labels, true); $test_pecl = in_array('CI: PECL', $labels, true); + $test_solaris = in_array('CI: Solaris', $labels, true); $test_windows = in_array('CI: Windows', $labels, true); $jobs = []; @@ -132,6 +133,9 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re if (($all_jobs && $ref === 'master') || $test_pecl) { $jobs['PECL'] = true; } + if (version_compare($php_version, '8.6', '>=') && ($all_jobs || $test_solaris)) { + $jobs['SOLARIS'] = true; + } if ($all_jobs || !$no_jobs || $test_windows) { $jobs['WINDOWS']['matrix'] = $all_variations ? ['include' => [ diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 9f5496d1d69..83aae655a3c 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -979,6 +979,21 @@ jobs: configurationParameters: >- --${{ matrix.zts && 'enable' || 'disable' }}-zts runExtraTests: true + SOLARIS: + if: ${{ fromJson(inputs.branch).jobs.SOLARIS }} + name: "SOLARIS" + runs-on: ubuntu-latest + timeout-minutes: 50 + steps: + - name: git checkout + uses: actions/checkout@v5 + with: + ref: ${{ fromJson(inputs.branch).ref }} + - name: Solaris + uses: ./.github/actions/solaris + with: + configurationParameters: --disable-zts + runExtraTests: true BENCHMARKING: name: BENCHMARKING if: ${{ fromJson(inputs.branch).jobs.BENCHMARKING }}