From e8f4043a965e9ff90ceb54c85fac265ca707336b Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Wed, 23 Jul 2025 15:01:49 +0800 Subject: [PATCH 1/7] Remove attr and libtiff --- .github/workflows/pack-libs.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pack-libs.yml b/.github/workflows/pack-libs.yml index aeca84c..3eb5145 100644 --- a/.github/workflows/pack-libs.yml +++ b/.github/workflows/pack-libs.yml @@ -36,7 +36,6 @@ jobs: - windows-2022 - macos-14 lib: - - attr - gmssl - jbig - lerc @@ -54,7 +53,6 @@ jobs: - libiconv - libavif - libpng - - libtiff - icu - libcares - libevent @@ -77,7 +75,6 @@ jobs: - { runner: "windows-2022", lib: "brotli" } - { runner: "windows-2022", lib: "libargon2" } - { runner: "windows-2022", lib: "libiconv" } - - { runner: "windows-2022", lib: "libtiff" } - { runner: "windows-2022", lib: "icu" } - { runner: "windows-2022", lib: "libcares" } - { runner: "windows-2022", lib: "libevent" } @@ -89,7 +86,6 @@ jobs: - { runner: "windows-2022", lib: "libaom" } - { runner: "windows-2022", lib: "libde265" } - { runner: "windows-2022", lib: "libheif" } - - { runner: "windows-2022", lib: "attr" } - { runner: "windows-2022", lib: "jbig" } - { runner: "windows-2022", lib: "lerc" } - { runner: "windows-2022", lib: "libacl" } From 9c3c60ed448ff96579d88e870daad0e9442031bc Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Wed, 23 Jul 2025 15:46:49 +0800 Subject: [PATCH 2/7] Update build-php-unix.yml --- .github/workflows/build-php-unix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-php-unix.yml b/.github/workflows/build-php-unix.yml index 9f0dcf8..dba1560 100644 --- a/.github/workflows/build-php-unix.yml +++ b/.github/workflows/build-php-unix.yml @@ -47,7 +47,7 @@ jobs: run: | case "${{ matrix.combination }}" in minimal) - echo "EXTENSIONS=pcntl,posix,mbstring,filter,tokenizer,phar" >> "$GITHUB_OUTPUT" + echo "EXTENSIONS=iconv,pcntl,posix,mbstring,filter,tokenizer,phar" >> "$GITHUB_OUTPUT" ;; common) echo "EXTENSIONS=bcmath,bz2,calendar,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,gmp,iconv,xml,mbstring,mbregex,mysqlnd,openssl,pcntl,pdo,pdo_mysql,pdo_sqlite,phar,posix,redis,session,simplexml,soap,sockets,sqlite3,tokenizer,xmlwriter,xmlreader,zlib,zip" >> "$GITHUB_OUTPUT" From 5c2b1b37f9b724cb3f1eef5605b0e64af22cb08d Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Wed, 23 Jul 2025 15:47:17 +0800 Subject: [PATCH 3/7] Update build-php-windows.yml --- .github/workflows/build-php-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-php-windows.yml b/.github/workflows/build-php-windows.yml index c196eb3..51ce834 100644 --- a/.github/workflows/build-php-windows.yml +++ b/.github/workflows/build-php-windows.yml @@ -29,7 +29,7 @@ jobs: run: | switch ("${{ matrix.combination }}") { "spc-min" { - Add-Content -Path $env:GITHUB_OUTPUT -Value "EXTENSIONS=ctype,fileinfo,mbstring,tokenizer,phar" + Add-Content -Path $env:GITHUB_OUTPUT -Value "EXTENSIONS=ctype,fileinfo,iconv,mbstring,tokenizer,phar" Add-Content -Path $env:GITHUB_OUTPUT -Value "DEPLOY_TARGET=${{ secrets.DEPLOY_SERVER_TARGET_WINDOWS_SPC_MIN }}" } "spc-max" { From 7f70fa50ba140ad69fe555b9267a071038027c70 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Wed, 23 Jul 2025 22:33:05 +0800 Subject: [PATCH 4/7] Update build-php-windows.yml --- .github/workflows/build-php-windows.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-php-windows.yml b/.github/workflows/build-php-windows.yml index 51ce834..4e478f0 100644 --- a/.github/workflows/build-php-windows.yml +++ b/.github/workflows/build-php-windows.yml @@ -92,13 +92,21 @@ jobs: GITHUB_TOKEN: ${{ secrets.S_GITHUB_TOKEN }} run: ${{ steps.process-env.outputs.CMD }} download --with-php=${{ matrix.php-version }} --for-extensions="${{ steps.process-env.outputs.EXTENSIONS }}" --retry=5 --prefer-pre-built + - name: "Doctor" + env: + GITHUB_TOKEN: ${{ secrets.S_GITHUB_TOKEN }} + run: ${{ steps.process-env.outputs.CMD }} doctor --auto-fix + + - name: "Install UPX" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ${{ steps.process-env.outputs.CMD }} install-pkg upx + - name: "Build extensions: ${{ steps.process-env.outputs.EXTENSIONS }}" - run: | - ${{ steps.process-env.outputs.CMD }} doctor --auto-fix - ${{ steps.process-env.outputs.CMD }} install-pkg upx - - ${{ steps.process-env.outputs.CMD }} build --build-cli --build-micro "${{ steps.process-env.outputs.EXTENSIONS }}" --debug --with-upx-pack + run: ${{ steps.process-env.outputs.CMD }} build --build-cli --build-micro "${{ steps.process-env.outputs.EXTENSIONS }}" --debug --with-upx-pack + - name: "Pack PHP" + run: | $PHPVER = ${{ steps.process-env.outputs.CMD }} dev:php-ver New-Item -ItemType Directory -Force -Path dist Compress-Archive -Path "buildroot\bin\php.exe" -DestinationPath "dist\php-$PHPVER-cli-win.zip" From 7ddd5823eccd04ca9036a0075f4ae4c406b50b18 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Thu, 24 Jul 2025 00:36:27 +0800 Subject: [PATCH 5/7] Update download-cache.yml --- .github/workflows/download-cache.yml | 83 +++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 3 deletions(-) diff --git a/.github/workflows/download-cache.yml b/.github/workflows/download-cache.yml index 726617b..2a2351e 100644 --- a/.github/workflows/download-cache.yml +++ b/.github/workflows/download-cache.yml @@ -15,6 +15,7 @@ jobs: runs-on: ubuntu-latest outputs: sources: ${{ steps.step1.outputs.sources }} + pkgs: ${{ steps.step1.outputs.pkgs }} steps: - name: "Checkout" uses: "actions/checkout@v4" @@ -24,12 +25,88 @@ jobs: - name: "Create Matrix Variable" id: step1 run: | - VALUE=$(cat config/source.json | jq -M -c keys) - echo 'sources='"$VALUE" >> "$GITHUB_OUTPUT" + SOURCE_VALUE=$(cat config/source.json | jq -M -c keys) + PKG_VALUE=$(cat config/pkg.json | jq -M -c keys) + echo 'sources='"$SOURCE_VALUE" >> "$GITHUB_OUTPUT" + echo 'pkgs='"$PKG_VALUE" >> "$GITHUB_OUTPUT" # parse + download-pkg: + name: "Download package ${{ matrix.pkg }}" + runs-on: ubuntu-latest + needs: define-matrix + timeout-minutes: 60 + strategy: + matrix: + pkg: ${{ fromJSON(needs.define-matrix.outputs.pkgs) }} + fail-fast: false + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + with: + repository: crazywhalecc/static-php-cli + - name: "Setup static-php environment" + run: | + bin/setup-runtime + bin/php bin/composer install --no-dev --no-ansi -q --no-interaction + - name: "Download package ${{ matrix.pkg }}" + run: bin/php bin/spc install-pkg ${{ matrix.pkg }} --debug --no-alt --shallow-clone + - name: "Parse lock file and re-package with file" + run: | + rename_file() { + local src_file="$1" + local target="$2" + local destination_dir="$3" + + if [[ ! -f "$src_file" ]]; then + echo "Error: '$src_file' is not a valid file" >&2 + return 1 + fi + + if [[ "$src_file" =~ \.tar\.(gz|xz)$ ]]; then + local ext=".tar.${BASH_REMATCH[1]}" + local base_name="${src_file%$ext}" + if [[ -z "$base_name" ]]; then + echo "Error: Invalid filename '$src_file'" >&2 + return 1 + fi + + elif [[ "$src_file" =~ \.[^./]+$ ]]; then + local ext=".${src_file##*.}" + local base_name="${src_file%.$ext}" + else + echo "Skip: '$src_file' has no extension" >&2 + return 0 + fi + + local new_name="${target}${ext}" + cp -- "$src_file" "$new_name" + mv "$new_name" "$destination_dir"/ + echo "Renamed: $src_file -> $destination_dir/$new_name" + } + mkdir downloads-mirror-${{ matrix.pkg }} + SOURCE_TYPE=$(cat downloads/.lock.json | jq -M -c -r '."${{ matrix.pkg }}".source_type') + if [ "$SOURCE_TYPE" = "archive" ]; then + cd downloads + rename_file $(cat .lock.json | jq -M -c -r '."${{ matrix.pkg }}".filename') ${{ matrix.pkg }}-spc-mirror ../downloads-mirror-${{ matrix.pkg }} + cd .. + else + cd downloads + tar --exclude-vcs -czvf ${{ matrix.pkg }}-spc-mirror.tgz $(cat .lock.json | jq -M -c -r '."${{ matrix.pkg }}".dirname') + mv ${{ matrix.pkg }}-spc-mirror.tgz ../downloads-mirror-${{ matrix.pkg }}/ + cd .. + fi + - name: "Deploy to OSS" + uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: downloads-mirror-${{ matrix.pkg }}/ + destination_dir: static-php-cli/deps/spc-download-mirror/${{ matrix.pkg }}/ + endpoint: ${{ secrets.AWS_ENDPOINT }} download-source: - name: "Download ${{ matrix.source }}" + name: "Download source ${{ matrix.source }}" runs-on: ubuntu-latest needs: define-matrix timeout-minutes: 60 From 687dcf4527c54849593f1187b1037a007f915393 Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Thu, 24 Jul 2025 00:40:11 +0800 Subject: [PATCH 6/7] Update download-cache.yml --- .github/workflows/download-cache.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/download-cache.yml b/.github/workflows/download-cache.yml index 2a2351e..95e1bc5 100644 --- a/.github/workflows/download-cache.yml +++ b/.github/workflows/download-cache.yml @@ -50,7 +50,7 @@ jobs: bin/setup-runtime bin/php bin/composer install --no-dev --no-ansi -q --no-interaction - name: "Download package ${{ matrix.pkg }}" - run: bin/php bin/spc install-pkg ${{ matrix.pkg }} --debug --no-alt --shallow-clone + run: bin/php bin/spc install-pkg ${{ matrix.pkg }} --debug --no-alt --shallow-clone --skip-extract - name: "Parse lock file and re-package with file" run: | rename_file() { From 0835636f77c6e0b0d089b72c08a9ccf8203d4337 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Tue, 29 Jul 2025 10:16:23 +0800 Subject: [PATCH 7/7] Add windows extension matrix tests --- .../workflows/ext-matrix-tests-win-php84.yml | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .github/workflows/ext-matrix-tests-win-php84.yml diff --git a/.github/workflows/ext-matrix-tests-win-php84.yml b/.github/workflows/ext-matrix-tests-win-php84.yml new file mode 100644 index 0000000..db8d8bd --- /dev/null +++ b/.github/workflows/ext-matrix-tests-win-php84.yml @@ -0,0 +1,120 @@ +name: "Extension matrix tests PHP 8.4 (Windows)" + +on: + workflow_dispatch: + schedule: + - cron: "0 1 * * 5" + +jobs: + test: + name: "${{ matrix.extension }} (PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }})" + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + extension: + - amqp + - apcu + - bcmath + - bz2 + - calendar + - ctype + - curl + - dba + - dom + - ds + - exif + - ffi + - fileinfo + - filter + - ftp + - gd + - iconv + - igbinary + - libxml + - mbregex + - mbstring + - mysqli + - mysqlnd + - opcache + - openssl + - pdo + - pdo_mysql + - pdo_sqlite + - pdo_sqlsrv + - phar + - rar + - redis + - session + - shmop + - simdjson + - simplexml + - soap + - sockets + - sqlite3 + - sqlsrv + - ssh2 + - sysvshm + - tokenizer + - xml + - xmlreader + - xmlwriter + - yac + - yaml + - zip + - zlib + php-version: + - "8.4" + operating-system: + - "windows-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + + - name: "Checkout remote" + if: github.repository != 'crazywhalecc/static-php-cli' + uses: actions/checkout@v4 + with: + repository: crazywhalecc/static-php-cli + ref: main + + - name: "Setup PHP" + uses: shivammathur/setup-php@v2 + with: + php-version: 8.4 + tools: pecl, composer + extensions: curl, openssl, mbstring, filter + 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 + + - id: cache-download + uses: actions/cache@v4 + with: + path: downloads + key: php-${{ matrix.php-version }}-dependencies-for-tests-windows + + - name: "Install Dependencies" + run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist --no-dev + + - name: "Validate SPC powershell script" + run: bin/spc --version + + # If there's no dependencies cache, fetch sources + - name: "Download sources" + env: + GITHUB_TOKEN: ${{ secrets.S_GITHUB_TOKEN }} + run: bin/spc download --with-php=${{ matrix.php-version }} --for-extensions=${{ matrix.extension }} + + - name: "Build library: ${{ matrix.extension }}" + run: | + bin/spc doctor --auto-fix + bin/spc build --build-cli --build-micro ${{ matrix.extension }} --debug --with-suggested-libs --with-suggested-exts pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy