mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
fix: error when building libtiff (#481)
* fix: error when building libtiff * Update test-extensions.php * Add test token * Fix windows builds * Fix token * Fix token * Test token * Test token * Test token --------- Co-authored-by: Jerry Ma <jesse2061@outlook.com>
This commit is contained in:
parent
93cb7e9fbb
commit
e9aff8f1d8
20
.github/workflows/tests.yml
vendored
20
.github/workflows/tests.yml
vendored
@ -12,6 +12,9 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
php-cs-fixer:
|
php-cs-fixer:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -129,13 +132,6 @@ jobs:
|
|||||||
extensions: curl, openssl, mbstring
|
extensions: curl, openssl, mbstring
|
||||||
ini-values: memory_limit=-1
|
ini-values: memory_limit=-1
|
||||||
|
|
||||||
- name: "Use test token if exists"
|
|
||||||
if: matrix.os != 'windows-latest'
|
|
||||||
run: |
|
|
||||||
if [ "${{ secrets.TEST_GH_TOKEN }}" != "" ]; then
|
|
||||||
echo "GITHUB_TOKEN=${{ secrets.TEST_GH_TOKEN }}" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: "Cache composer packages"
|
- name: "Cache composer packages"
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@ -170,15 +166,9 @@ jobs:
|
|||||||
bin/spc install-pkg upx
|
bin/spc install-pkg upx
|
||||||
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV
|
echo "UPX_CMD=$(php src/globals/test-extensions.php upx)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
- name: "Run Build Tests (download)"
|
- name: "Run Build Tests (download)"
|
||||||
uses: nick-fields/retry@v3
|
run: |
|
||||||
with:
|
bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src --debug --retry=5
|
||||||
timeout_minutes: 10
|
|
||||||
max_attempts: 3
|
|
||||||
retry_on: error
|
|
||||||
command: |
|
|
||||||
bin/spc download --for-extensions="$(php src/globals/test-extensions.php extensions)" --for-libs="$(php src/globals/test-extensions.php libs)" --with-php=${{ matrix.php }} --ignore-cache-sources=php-src,libcares --debug --retry=3
|
|
||||||
|
|
||||||
- name: "Run Build Tests (build, *nix)"
|
- name: "Run Build Tests (build, *nix)"
|
||||||
if: matrix.os != 'windows-latest'
|
if: matrix.os != 'windows-latest'
|
||||||
|
|||||||
@ -15,14 +15,20 @@ trait libtiff
|
|||||||
*/
|
*/
|
||||||
protected function build(): void
|
protected function build(): void
|
||||||
{
|
{
|
||||||
shell()->cd($this->source_dir)
|
$shell = shell()->cd($this->source_dir)
|
||||||
->exec(
|
->exec(
|
||||||
'./configure ' .
|
'./configure ' .
|
||||||
'--enable-static --disable-shared ' .
|
'--enable-static --disable-shared ' .
|
||||||
'--disable-cxx ' .
|
'--disable-cxx ' .
|
||||||
'--prefix='
|
'--prefix='
|
||||||
)
|
);
|
||||||
->exec('make clean')
|
|
||||||
|
// TODO: Remove this check when https://gitlab.com/libtiff/libtiff/-/merge_requests/635 will be merged and released
|
||||||
|
if (file_exists($this->source_dir . '/html')) {
|
||||||
|
$shell->exec('make clean');
|
||||||
|
}
|
||||||
|
|
||||||
|
$shell
|
||||||
->exec("make -j{$this->builder->concurrency}")
|
->exec("make -j{$this->builder->concurrency}")
|
||||||
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
->exec('make install DESTDIR=' . BUILD_ROOT_PATH);
|
||||||
$this->patchPkgconfPrefix(['libtiff-4.pc']);
|
$this->patchPkgconfPrefix(['libtiff-4.pc']);
|
||||||
|
|||||||
@ -19,13 +19,13 @@ $upx = true;
|
|||||||
|
|
||||||
// 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' => 'libxml,xlswriter,openssl,core,hash,json,standard,SPL,HASH,REFLECTION,zend-opcache',
|
'Linux', 'Darwin' => 'imagick',
|
||||||
'Windows' => 'mbstring,pdo_sqlite,mbregex',
|
'Windows' => 'mbstring,pdo_sqlite,mbregex',
|
||||||
};
|
};
|
||||||
|
|
||||||
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
|
// If you want to test lib-suggests feature with extension, add them below (comma separated, example `libwebp,libavif`).
|
||||||
$with_libs = match (PHP_OS_FAMILY) {
|
$with_libs = match (PHP_OS_FAMILY) {
|
||||||
'Linux', 'Darwin' => '',
|
'Linux', 'Darwin' => 'libtiff',
|
||||||
'Windows' => '',
|
'Windows' => '',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user