mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Remove icu tools
This commit is contained in:
parent
cdf3e76528
commit
c8355d8381
125
.github/workflows/test-pack-lib.yml
vendored
125
.github/workflows/test-pack-lib.yml
vendored
@ -1,125 +0,0 @@
|
||||
name: Tests for PHP Pack Lib
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'config/**'
|
||||
- '.github/workflows/tests.yml'
|
||||
- 'bin/**'
|
||||
- 'composer.json'
|
||||
- 'box.json'
|
||||
- '.php-cs-fixer.php'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Pack Lib Test (${{ matrix.lib }} for ${{ matrix.runner }})"
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 120
|
||||
strategy:
|
||||
matrix:
|
||||
runner:
|
||||
- ubuntu-latest
|
||||
- ubuntu-20.04
|
||||
- macos-13
|
||||
- windows-latest
|
||||
- macos-14
|
||||
lib:
|
||||
- zlib
|
||||
- pkg-config
|
||||
- bzip2
|
||||
- gmp
|
||||
exclude:
|
||||
- { runner: "windows-latest", lib: "pkg-config" }
|
||||
- { runner: "windows-latest", lib: "gmp" }
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: "Process env string"
|
||||
id: process-env
|
||||
shell: bash
|
||||
run: |
|
||||
case "${{ matrix.runner }}" in
|
||||
ubuntu-latest)
|
||||
echo "OS=linux" >> "$GITHUB_OUTPUT"
|
||||
echo "ARCH=x86_64" >> "$GITHUB_OUTPUT"
|
||||
echo "CMD=bin/spc" >> "$GITHUB_OUTPUT"
|
||||
;;
|
||||
ubuntu-20.04)
|
||||
echo "OS=linux" >> "$GITHUB_OUTPUT"
|
||||
echo "ARCH=aarch64" >> "$GITHUB_OUTPUT"
|
||||
echo CMD="SPC_USE_ARCH=aarch64 bin/spc-alpine-docker" >> "$GITHUB_OUTPUT"
|
||||
;;
|
||||
windows-latest)
|
||||
echo "OS=windows" >> "$GITHUB_OUTPUT"
|
||||
echo "ARCH=x86_64" >> "$GITHUB_OUTPUT"
|
||||
echo "CMD=bin/spc" >> "$GITHUB_OUTPUT"
|
||||
;;
|
||||
macos-13)
|
||||
echo "OS=darwin" >> "$GITHUB_OUTPUT"
|
||||
echo "ARCH=x86_64" >> "$GITHUB_OUTPUT"
|
||||
echo "CMD=bin/spc" >> "$GITHUB_OUTPUT"
|
||||
;;
|
||||
macos-14)
|
||||
echo "OS=darwin" >> "$GITHUB_OUTPUT"
|
||||
echo "ARCH=aarch64" >> "$GITHUB_OUTPUT"
|
||||
echo "CMD=bin/spc" >> "$GITHUB_OUTPUT"
|
||||
;;
|
||||
esac
|
||||
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: "Setup PHP"
|
||||
if: matrix.runner != 'ubuntu-20.04'
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
tools: pecl, composer
|
||||
extensions: curl, openssl, mbstring
|
||||
ini-values: memory_limit=-1
|
||||
|
||||
- name: "Cache composer packages"
|
||||
id: composer-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php
|
||||
|
||||
# Cache downloaded source
|
||||
- id: cache-download
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: downloads
|
||||
key: pack-lib-dependencies
|
||||
|
||||
- name: "Install Dependencies"
|
||||
if: matrix.runner != 'ubuntu-20.04'
|
||||
run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
||||
|
||||
- run: ${{ steps.process-env.outputs.CMD }} doctor --auto-fix
|
||||
|
||||
- run: ${{ steps.process-env.outputs.CMD }} download --for-libs="${{ matrix.lib }}" --debug --retry=5 --shallow-clone
|
||||
|
||||
- name: "Download pre-built pkg-config for ${{ matrix.runner }}"
|
||||
if: matrix.runner != 'windows-latest' && matrix.lib != 'pkg-config'
|
||||
run: |
|
||||
${{ steps.process-env.outputs.CMD }} download --for-libs="pkg-config" --debug --retry=5 --shallow-clone --prefer-pre-built
|
||||
${{ steps.process-env.outputs.CMD }} build:libs pkg-config --debug
|
||||
|
||||
- if: matrix.runner != 'windows-latest' || matrix.lib != 'pkg-config'
|
||||
run: ${{ steps.process-env.outputs.CMD }} dev:pack-lib --debug ${{ matrix.lib }}
|
||||
|
||||
- name: "Upload packed lib (${{ matrix.lib }} for ${{ steps.process-env.outputs.ARCH }}-${{ steps.process-env.outputs.OS }})"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: dist/${{ matrix.lib }}-${{ steps.process-env.outputs.ARCH }}-${{ steps.process-env.outputs.OS }}.txz
|
||||
name: ${{ matrix.lib }}-${{ steps.process-env.outputs.ARCH }}-${{ steps.process-env.outputs.OS }}
|
||||
@ -21,10 +21,10 @@ class icu extends LinuxLibraryBase
|
||||
'--disable-shared ' .
|
||||
'--with-data-packaging=static ' .
|
||||
'--enable-release=yes ' .
|
||||
'--enable-extras=yes ' .
|
||||
'--enable-extras=no ' .
|
||||
'--enable-icuio=yes ' .
|
||||
'--enable-dyload=no ' .
|
||||
'--enable-tools=yes ' .
|
||||
'--enable-tools=no ' .
|
||||
'--enable-tests=no ' .
|
||||
'--enable-samples=no ' .
|
||||
'--prefix=' . BUILD_ROOT_PATH
|
||||
|
||||
@ -12,7 +12,7 @@ class icu extends MacOSLibraryBase
|
||||
{
|
||||
$root = BUILD_ROOT_PATH;
|
||||
shell()->cd($this->source_dir . '/source')
|
||||
->exec("./runConfigureICU MacOSX --enable-static --disable-shared --prefix={$root}")
|
||||
->exec("./runConfigureICU MacOSX --enable-static --disable-shared --disable-extras --disable-samples --disable-tests --disable-tools --prefix={$root}")
|
||||
->exec('make clean')
|
||||
->exec("make -j{$this->builder->concurrency}")
|
||||
->exec('make install');
|
||||
|
||||
@ -19,7 +19,7 @@ $upx = true;
|
||||
|
||||
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
|
||||
$extensions = match (PHP_OS_FAMILY) {
|
||||
'Linux', 'Darwin' => 'spx',
|
||||
'Linux', 'Darwin' => 'intl',
|
||||
'Windows' => 'mbstring,pdo_sqlite,mbregex,bz2,sqlsrv,pdo_sqlsrv,yaml',
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user