This commit is contained in:
DubbleClick 2025-07-26 23:46:36 +07:00
parent 5beb083c55
commit 42b4272965
3 changed files with 5 additions and 11 deletions

View File

@ -177,11 +177,6 @@ jobs:
- name: "Install Dependencies"
run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: "Prepare Zig for Linux"
if: ${{ startsWith(matrix.os, 'ubuntu-24') }}
run: |
SPC_TARGET=native-native php bin/spc install-pkg zig
- name: "Run Build Tests (doctor)"
run: php src/globals/test-extensions.php doctor_cmd ${{ matrix.os }} ${{ matrix.php }}
@ -207,6 +202,6 @@ jobs:
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: php src/globals/test-extensions.php build_embed_cmd ${{ matrix.os }} ${{ matrix.php }}
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3

View File

@ -99,7 +99,6 @@ abstract class BaseCommand extends Command
// init GlobalEnv
if (!$this instanceof BuildCommand) {
GlobalEnvManager::init();
GlobalEnvManager::afterInit();
f_putenv('SPC_SKIP_TOOLCHAIN_CHECK=yes');
}
if ($this->shouldExecute()) {

View File

@ -17,8 +17,6 @@ class ZigToolchain implements ToolchainInterface
GlobalEnvManager::putenv('SPC_LINUX_DEFAULT_CXX=zig-c++');
GlobalEnvManager::putenv('SPC_LINUX_DEFAULT_AR=zig-ar');
GlobalEnvManager::putenv('SPC_LINUX_DEFAULT_LD=ld');
GlobalEnvManager::putenv('RANLIB=zig-ranlib');
GlobalEnvManager::putenv('OBJCOPY=zig-objcopy');
// Generate additional objects needed for zig toolchain
$paths = ['/usr/lib/gcc', '/usr/local/lib/gcc'];
@ -61,6 +59,8 @@ class ZigToolchain implements ToolchainInterface
GlobalEnvManager::putenv("SPC_DEFAULT_C_FLAGS={$cflags}");
GlobalEnvManager::putenv("SPC_DEFAULT_CXX_FLAGS={$cxxflags}");
GlobalEnvManager::putenv("SPC_CMD_VAR_PHP_MAKE_EXTRA_CFLAGS={$extraCflags}");
GlobalEnvManager::putenv('RANLIB=zig-ranlib');
GlobalEnvManager::putenv('OBJCOPY=zig-objcopy');
$extra_libs = getenv('SPC_EXTRA_LIBS') ?: '';
if (!str_contains($extra_libs, '-lunwind')) {
// Add unwind library if not already present