Compare commits

...

5 Commits

Author SHA1 Message Date
Jerry Ma
d622a12101 Enhance release-build.yml with release deployment step
Added a deployment step for release tags to the self-hosted OSS workflow.
2026-02-13 13:21:25 +08:00
Marc
f680731f9d fix: Postgres build with ancient libc (#1029) 2026-02-11 17:42:36 +01:00
Jerry Ma
0fe1442f7e Bump version from 2.8.0 to 2.8.2 2026-02-12 00:02:38 +08:00
Jerry Ma
1e4780397b Update test-extensions.php for PHP versions and extensions
Commented out older PHP versions and Windows 2025 in the test configuration. Updated the extensions to test for Linux and Darwin.
2026-02-11 23:32:19 +08:00
Kévin Dunglas
6b67cb90fc fix: Postgres build with ancient libc 2026-02-11 16:24:13 +01:00
4 changed files with 26 additions and 29 deletions

View File

@@ -120,7 +120,7 @@ jobs:
with: with:
files: dist/${{ matrix.operating-system.filename }} files: dist/${{ matrix.operating-system.filename }}
- name: "Deploy to self-hosted OSS" - name: "Deploy to self-hosted OSS (nightly)"
# only run this step if the repository is static-php-cli and the branch is main # only run this step if the repository is static-php-cli and the branch is main
if: github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/main' if: github.repository == 'crazywhalecc/static-php-cli' && github.ref == 'refs/heads/main'
uses: static-php/upload-s3-action@v1.0.0 uses: static-php/upload-s3-action@v1.0.0
@@ -132,6 +132,18 @@ jobs:
destination_dir: static-php-cli/spc-bin/nightly/ destination_dir: static-php-cli/spc-bin/nightly/
endpoint: ${{ secrets.AWS_ENDPOINT }} endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Deploy to self-hosted OSS (release)"
# only run this step if the repository is static-php-cli and release tag
if: github.repository == 'crazywhalecc/static-php-cli' && startsWith(github.ref, 'refs/tags/')
uses: static-php/upload-s3-action@v1.0.0
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "dist/"
destination_dir: static-php-cli/spc-bin/${{ github.event.release.tag_name }}/
endpoint: ${{ secrets.AWS_ENDPOINT }}
- name: "Upload Artifact" - name: "Upload Artifact"
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:

View File

@@ -34,7 +34,7 @@ use Symfony\Component\Console\Application;
*/ */
final class ConsoleApplication extends Application final class ConsoleApplication extends Application
{ {
public const string VERSION = '2.8.0'; public const string VERSION = '2.8.2';
public function __construct() public function __construct()
{ {

View File

@@ -4,29 +4,14 @@ declare(strict_types=1);
namespace SPC\builder\unix\library; namespace SPC\builder\unix\library;
use SPC\exception\FileSystemException;
use SPC\store\FileSystem; use SPC\store\FileSystem;
use SPC\util\PkgConfigUtil; use SPC\util\PkgConfigUtil;
use SPC\util\SPCConfigUtil; use SPC\util\SPCConfigUtil;
use SPC\util\SPCTarget;
trait postgresql trait postgresql
{ {
public function patchBeforeBuild(): bool public function patchBeforeBuild(): bool
{ {
// fix aarch64 build on glibc 2.17 (e.g. CentOS 7)
if (SPCTarget::getLibcVersion() === '2.17' && GNU_ARCH === 'aarch64') {
try {
FileSystem::replaceFileStr("{$this->source_dir}/src/port/pg_popcount_aarch64.c", 'HWCAP_SVE', '0');
FileSystem::replaceFileStr(
"{$this->source_dir}/src/port/pg_crc32c_armv8_choose.c",
'#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)',
'#if defined(__linux__) && !defined(HWCAP_CRC32)'
);
} catch (FileSystemException) {
// allow file not-existence to make it compatible with old and new version
}
}
// skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries // skip the test on platforms where libpq infrastructure may be provided by statically-linked libraries
FileSystem::replaceFileStr("{$this->source_dir}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';'); FileSystem::replaceFileStr("{$this->source_dir}/src/interfaces/libpq/Makefile", 'invokes exit\'; exit 1;', 'invokes exit\';');
// disable shared libs build // disable shared libs build

View File

@@ -13,10 +13,10 @@ declare(strict_types=1);
// test php version (8.1 ~ 8.4 available, multiple for matrix) // test php version (8.1 ~ 8.4 available, multiple for matrix)
$test_php_version = [ $test_php_version = [
'8.1', // '8.1',
'8.2', // '8.2',
'8.3', // '8.3',
'8.4', // '8.4',
'8.5', '8.5',
// 'git', // 'git',
]; ];
@@ -26,12 +26,12 @@ $test_os = [
// 'macos-15-intel', // bin/spc for x86_64 // 'macos-15-intel', // bin/spc for x86_64
// 'macos-15', // bin/spc for arm64 // 'macos-15', // bin/spc for arm64
// 'ubuntu-latest', // bin/spc-alpine-docker for x86_64 // 'ubuntu-latest', // bin/spc-alpine-docker for x86_64
// 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64
// 'ubuntu-24.04', // bin/spc for x86_64 'ubuntu-24.04', // bin/spc for x86_64
// 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64
// 'ubuntu-24.04-arm', // bin/spc for arm64 'ubuntu-24.04-arm', // bin/spc for arm64
// 'windows-2022', // .\bin\spc.ps1 // 'windows-2022', // .\bin\spc.ps1
'windows-2025', // 'windows-2025',
]; ];
// whether enable thread safe // whether enable thread safe
@@ -50,13 +50,13 @@ $prefer_pre_built = false;
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) { $extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'mysqli,gmp', 'Linux', 'Darwin' => 'pgsql',
'Windows' => 'com_dotnet', 'Windows' => 'com_dotnet',
}; };
// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`). // If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
$shared_extensions = match (PHP_OS_FAMILY) { $shared_extensions = match (PHP_OS_FAMILY) {
'Linux' => 'grpc,mysqlnd_parsec,mysqlnd_ed25519', 'Linux' => '',
'Darwin' => '', 'Darwin' => '',
'Windows' => '', 'Windows' => '',
}; };
@@ -66,7 +66,7 @@ $with_suggested_libs = false;
// If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true. // If you want to test extra libs for extensions, add them below (comma separated, example `libwebp,libavif`). Unnecessary, when $with_suggested_libs is true.
$with_libs = match (PHP_OS_FAMILY) { $with_libs = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'libwebp', 'Linux', 'Darwin' => '',
'Windows' => '', 'Windows' => '',
}; };