Skip to content

Skip re-extract ext-imap source #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
11 changes: 9 additions & 2 deletions src/SPC/store/SourceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static function initSource(?array $sources = null, ?array $libs = null, ?
$check = LockFile::getExtractPath($lock_name, SOURCE_PATH . '/' . $source);
// $check = $lock[$lock_name]['move_path'] === null ? (SOURCE_PATH . '/' . $source) : (SOURCE_PATH . '/' . $lock[$lock_name]['move_path']);
if (!is_dir($check)) {
logger()->debug('Extracting source [' . $source . '] to ' . $check . ' ...');
logger()->debug("Extracting source [{$source}] to {$check} ...");
$filename = LockFile::getLockFullPath($lock_content);
FileSystem::extractSource($source, $lock_content['source_type'], $filename, $check);
LockFile::putLockSourceHash($lock_content, $check);
Expand All @@ -81,7 +81,14 @@ public static function initSource(?array $sources = null, ?array $libs = null, ?

// when source already extracted, detect if the extracted source hash is the same as the lock file one
if (file_exists("{$check}/.spc-hash") && FileSystem::readFile("{$check}/.spc-hash") === $hash) {
logger()->debug('Source [' . $source . '] already extracted in ' . $check . ', skip !');
logger()->debug("Source [{$source}] already extracted in {$check}, skip !");
continue;
}

// ext imap was embeded in php <= 8.3, if php version < 8.4, we should not extract
// but since it's not simple to compare php version, for now we just skip it
if ($source === 'ext-imap') {
logger()->debug("Source [ext-imap] already extracted in {$check}, skip !");
continue;
}

Expand Down
12 changes: 6 additions & 6 deletions src/globals/test-extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
$test_os = [
// 'macos-13',
// 'macos-14',
// 'macos-15',
// 'ubuntu-latest',
'macos-15',
'ubuntu-latest',
// 'ubuntu-22.04',
// 'ubuntu-24.04',
'ubuntu-22.04-arm',
Expand All @@ -33,7 +33,7 @@
];

// whether enable thread safe
$zts = true;
$zts = false;

$no_strip = false;

Expand All @@ -48,13 +48,13 @@

// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
$extensions = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'apcu,ast,bcmath,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,iconv,libxml,mbregex,mbstring,opcache,openssl,pcntl,phar,posix,readline,session,simplexml,sockets,sodium,tokenizer,xml,xmlreader,xmlwriter,zip,zlib',
'Linux', 'Darwin' => 'openssl',
'Windows' => 'xlswriter,openssl',
};

// If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`).
$shared_extensions = match (PHP_OS_FAMILY) {
'Linux' => 'uv',
'Linux' => '',
'Darwin' => '',
'Windows' => '',
};
Expand All @@ -72,7 +72,7 @@
// You can use `common`, `bulk`, `minimal` or `none`.
// note: combination is only available for *nix platform. Windows must use `none` combination
$base_combination = match (PHP_OS_FAMILY) {
'Linux', 'Darwin' => 'minimal',
'Linux', 'Darwin' => 'bulk',
'Windows' => 'none',
};

Expand Down
Loading