From 8ddd04e1b13ba0869aed5c69f0455d2e42f946c1 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Wed, 26 Aug 2026 20:18:19 +0800 Subject: [PATCH] ci: restructure platform build and test checks --- .github/actions/unix-arm64-build/action.yml | 155 +++++++++++++++ .github/workflows/linux-arm64.yml | 43 +++++ .../workflows/{tests.yml => linux-x64.yml} | 116 +++++++----- .github/workflows/macos-arm64.yml | 43 +++++ .github/workflows/platform-build.yml | 179 ------------------ .github/workflows/release.yml | 17 +- .github/workflows/windows-build.yml | 4 +- README-CN.md | 5 +- README.md | 5 +- 9 files changed, 334 insertions(+), 233 deletions(-) create mode 100644 .github/actions/unix-arm64-build/action.yml create mode 100644 .github/workflows/linux-arm64.yml rename .github/workflows/{tests.yml => linux-x64.yml} (79%) create mode 100644 .github/workflows/macos-arm64.yml delete mode 100644 .github/workflows/platform-build.yml diff --git a/.github/actions/unix-arm64-build/action.yml b/.github/actions/unix-arm64-build/action.yml new file mode 100644 index 00000000..7bfcd418 --- /dev/null +++ b/.github/actions/unix-arm64-build/action.yml @@ -0,0 +1,155 @@ +name: Unix ARM64 build +description: Build and smoke-test TypePHP on a Unix ARM64 runner + +inputs: + php-version: + description: PHP minor version + required: true + os: + description: Package operating-system identifier + required: true + library-extension: + description: Shared-library extension used by PHPX + required: true + smoke-directory: + description: Platform smoke project directory below .github/smoke + required: true + smoke-binary: + description: Platform smoke executable name + required: true + smoke-output: + description: Expected platform smoke output + required: true + +runs: + using: composite + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ inputs.php-version }} + coverage: none + extensions: mbstring + ini-values: precision=17, memory_limit=4G, error_reporting=E_ERROR|E_WARNING, display_errors=1, display_startup_errors=1, log_errors=0 + tools: composer:v2 + env: + fail-fast: true + phpts: ts + update: true + + - name: Install Linux build dependencies + if: inputs.os == 'linux' + shell: bash + run: | + sudo apt-get update + sudo apt-get install --yes build-essential cmake libgmp-dev libmpfr-dev pkg-config + + - name: Install macOS build dependencies + if: inputs.os == 'macos' + shell: bash + run: brew install cmake gmp mpfr pkg-config + + - name: Verify ZTS PHP and architecture + shell: bash + run: | + php -r 'if (!PHP_ZTS) { fwrite(STDERR, "Expected a ZTS PHP build\n"); exit(1); }' + case "$(php -r 'echo PHP_VERSION;')" in + "${{ inputs.php-version }}"*) ;; + *) echo "setup-php installed an unexpected PHP version" >&2; exit 1 ;; + esac + case "$(uname -m)" in + arm64|aarch64) ;; + *) echo "Expected an ARM64 runner, got $(uname -m)" >&2; exit 1 ;; + esac + + php_home="$(php-config --prefix)" + embed_library="${php_home}/lib/libphp.${{ inputs.library-extension }}" + test -x "${php_home}/bin/php-config" + test -f "${embed_library}" + echo "PHP_HOME=${php_home}" >> "${GITHUB_ENV}" + if [[ '${{ inputs.os }}' == 'linux' ]]; then + echo "LD_LIBRARY_PATH=${PHPX_HOME}/lib:${php_home}/lib" >> "${GITHUB_ENV}" + else + echo "DYLD_LIBRARY_PATH=${PHPX_HOME}/lib:${php_home}/lib" >> "${GITHUB_ENV}" + fi + php -v + php-config --configure-options + + - name: Patch php_hash.h C++ compatibility + uses: ./.github/actions/patch-php-headers + + - name: Install Composer dependencies + shell: bash + run: composer install --prefer-dist --no-progress + + - name: Build PHPX + shell: bash + run: | + cmake -S "${PHPX_HOME}" -B "${PHPX_HOME}/build" \ + -D CMAKE_BUILD_TYPE=Release \ + -D BUILD_TESTS=OFF \ + -D BUILD_EXT=OFF \ + -D GITHUB_ACTION=ON \ + -D php_dir="${PHP_HOME}" + cmake --build "${PHPX_HOME}/build" --target phpx --parallel 2 + test -f "${PHPX_HOME}/lib/libphpx.${{ inputs.library-extension }}" + + - name: Build tpc + shell: bash + run: | + php bin/tpc.php project.yml --job 2 --no-progress + test -x ./tpc + file ./tpc + file ./tpc | grep -Eiq 'arm64|aarch64|ARM aarch64' + ./tpc --version + + - name: Run platform smoke test + shell: bash + run: | + smoke_root=".github/smoke/${{ inputs.smoke-directory }}" + ./tpc "${smoke_root}/project.yml" --job 1 --no-progress + smoke_binary="${smoke_root}/${{ inputs.smoke-binary }}" + test -x "${smoke_binary}" + output="$("${smoke_binary}")" + test "${output}" = '${{ inputs.smoke-output }}' + + - name: Show native dependencies + shell: bash + run: | + if [[ '${{ inputs.os }}' == 'linux' ]]; then + ldd ./tpc + else + otool -L ./tpc + fi + + - name: Package tested compiler + if: startsWith(github.ref, 'refs/tags/') && inputs.php-version == '8.5' + shell: bash + run: | + composer install --no-dev --prefer-dist --no-progress --classmap-authoritative + export TYPEPHP_PACKAGE_VERSION="${GITHUB_REF_NAME}" + php package.php + test "$(find . -maxdepth 1 -name 'tpc_v*_${{ inputs.os }}_arm64.tar.gz' -type f | wc -l)" -eq 1 + + - name: Upload release package + if: startsWith(github.ref, 'refs/tags/') && inputs.php-version == '8.5' + uses: actions/upload-artifact@v4 + with: + name: release-${{ inputs.os }}-arm64-php-${{ inputs.php-version }}-zts + if-no-files-found: error + retention-days: 1 + path: tpc_v*_${{ inputs.os }}_arm64.tar.gz + + - name: Upload platform build outputs + if: always() + uses: actions/upload-artifact@v4 + with: + name: tpc-${{ inputs.os }}-arm64-php-${{ inputs.php-version }}-zts + include-hidden-files: true + if-no-files-found: warn + retention-days: 7 + path: | + tpc + .github/smoke/${{ inputs.smoke-directory }}/${{ inputs.smoke-binary }} + .github/smoke/${{ inputs.smoke-directory }}/build/**/*.cc + .github/smoke/${{ inputs.smoke-directory }}/build/**/*.h diff --git a/.github/workflows/linux-arm64.yml b/.github/workflows/linux-arm64.yml new file mode 100644 index 00000000..1dc5322e --- /dev/null +++ b/.github/workflows/linux-arm64.yml @@ -0,0 +1,43 @@ +name: Linux ARM64 + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: linux-arm64-${{ github.ref }} + cancel-in-progress: true + +env: + COMPOSER_NO_INTERACTION: 1 + COMPOSER_PROCESS_TIMEOUT: 0 + +jobs: + build: + name: Build - PHP ${{ matrix.php }} ZTS + runs-on: ubuntu-22.04-arm + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + php: ["8.4", "8.5"] + env: + PHPX_HOME: ${{ github.workspace }}/vendor/swoole/phpx + + steps: + - name: Checkout TypePHP + uses: actions/checkout@v4 + + - name: Build and smoke test + uses: ./.github/actions/unix-arm64-build + with: + php-version: ${{ matrix.php }} + os: linux + library-extension: so + smoke-directory: linux-arm64 + smoke-binary: linux_arm64_smoke + smoke-output: linux-arm64-smoke-ok:zts diff --git a/.github/workflows/tests.yml b/.github/workflows/linux-x64.yml similarity index 79% rename from .github/workflows/tests.yml rename to .github/workflows/linux-x64.yml index 5b567cd7..8d8e4865 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/linux-x64.yml @@ -1,4 +1,4 @@ -name: tests +name: Linux x64 on: push: @@ -17,12 +17,11 @@ env: COMPOSER_PROCESS_TIMEOUT: 0 jobs: - build-phpx: - name: Build PHPX (PHP ${{ matrix.php }} ZTS) - # Skip the whole test pipeline when the push commit message contains `--skip-tests`. - if: ${{ startsWith(github.ref, 'refs/tags/') || !contains(github.event.head_commit.message || '', '--skip-tests') }} + build: + # Compilation is always required; `--skip-tests` only suppresses downstream test jobs. + name: Build - PHP ${{ matrix.php }} ZTS runs-on: ubuntu-22.04 - timeout-minutes: 30 + timeout-minutes: 60 strategy: fail-fast: false matrix: @@ -69,6 +68,16 @@ jobs: sudo apt-get update sudo apt-get install --yes build-essential cmake libgmp-dev libmpfr-dev pkg-config python3-dev + - name: Configure ZTS PHP embed library + shell: bash + run: | + php_home="$(php-config --prefix)" + embed_library="${php_home}/lib/libphp.so" + test -x "${php_home}/bin/php-config" + test -f "${embed_library}" + echo "PHP_HOME=${php_home}" >> "${GITHUB_ENV}" + echo "Using ZTS PHP $(php-config --version) embed library: ${embed_library}" + - name: Install Composer dependencies run: composer install --prefer-dist --no-progress @@ -79,7 +88,8 @@ jobs: -D CMAKE_BUILD_TYPE=Release \ -D BUILD_TESTS=OFF \ -D BUILD_EXT=OFF \ - -D GITHUB_ACTION=ON + -D GITHUB_ACTION=ON \ + -D php_dir="${PHP_HOME}" cmake --build "${PHPX_HOME}/build" --target phpx --parallel 2 test -f "${PHPX_HOME}/lib/libphpx.so" @@ -91,28 +101,45 @@ jobs: make -j2 test -f modules/phpy.so - - name: Upload PHPX library - uses: actions/upload-artifact@v4 - with: - name: libphpx-php-${{ matrix.php }}-zts - if-no-files-found: error - retention-days: 1 - path: vendor/swoole/phpx/lib/libphpx.so + - name: Enable phpy extension + shell: bash + run: | + php_ini_dir="$(php-config --ini-dir)" + echo "extension=${GITHUB_WORKSPACE}/third_party/phpy/modules/phpy.so" \ + | sudo tee "${php_ini_dir}/90-phpy.ini" + echo "PHP_INI_SCAN_DIR=${php_ini_dir}" >> "${GITHUB_ENV}" + php --ri phpy + + - name: Configure native library path + shell: bash + run: echo "LD_LIBRARY_PATH=${PHPX_HOME}/lib:${PHP_HOME}/lib" >> "${GITHUB_ENV}" + + - name: Build tpc + shell: bash + run: | + php bin/tpc.php project.yml --job 2 --no-progress + test -x ./tpc + file ./tpc + file ./tpc | grep -Eiq 'x86-64|x86_64|amd64' + ./tpc --version - - name: Upload phpy extension + - name: Upload Linux x64 build outputs uses: actions/upload-artifact@v4 with: - name: phpy-php-${{ matrix.php }}-zts + name: tpc-linux-x64-php-${{ matrix.php }}-zts if-no-files-found: error - retention-days: 1 - path: third_party/phpy/modules/phpy.so + retention-days: 7 + path: | + tpc + vendor/swoole/phpx/lib/libphpx.so + third_party/phpy/modules/phpy.so phpunit: - name: PHPUnit (PHP ${{ matrix.php }} ZTS) + name: PHPUnit - PHP ${{ matrix.php }} ZTS if: ${{ startsWith(github.ref, 'refs/tags/') || !contains(github.event.head_commit.message || '', '--skip-tests') }} runs-on: ubuntu-22.04 timeout-minutes: 30 - needs: build-phpx + needs: build strategy: fail-fast: false matrix: @@ -157,17 +184,20 @@ jobs: - name: Install Composer dependencies run: composer install --prefer-dist --no-progress - - name: Download PHPX library + - name: Download Linux x64 build outputs uses: actions/download-artifact@v4 with: - name: libphpx-php-${{ matrix.php }}-zts - path: vendor/swoole/phpx/lib + name: tpc-linux-x64-php-${{ matrix.php }}-zts + path: . - - name: Download phpy extension - uses: actions/download-artifact@v4 - with: - name: phpy-php-${{ matrix.php }}-zts - path: third_party/phpy/modules + - name: Verify Linux x64 build outputs + shell: bash + run: | + test -f ./tpc + test -f "${PHPX_HOME}/lib/libphpx.so" + test -f third_party/phpy/modules/phpy.so + chmod +x ./tpc + file ./tpc | grep -Eiq 'x86-64|x86_64|amd64' - name: Enable phpy extension shell: bash @@ -186,11 +216,11 @@ jobs: run: vendor/bin/phpunit phpt: - name: PHPT (PHP ${{ matrix.php }} ZTS) + name: PHPT - PHP ${{ matrix.php }} ZTS if: ${{ startsWith(github.ref, 'refs/tags/') || !contains(github.event.head_commit.message || '', '--skip-tests') }} runs-on: ubuntu-22.04 timeout-minutes: 180 - needs: build-phpx + needs: build strategy: fail-fast: false matrix: @@ -248,17 +278,20 @@ jobs: - name: Install Composer dependencies run: composer install --prefer-dist --no-progress - - name: Download PHPX library + - name: Download Linux x64 build outputs uses: actions/download-artifact@v4 with: - name: libphpx-php-${{ matrix.php }}-zts - path: vendor/swoole/phpx/lib + name: tpc-linux-x64-php-${{ matrix.php }}-zts + path: . - - name: Download phpy extension - uses: actions/download-artifact@v4 - with: - name: phpy-php-${{ matrix.php }}-zts - path: third_party/phpy/modules + - name: Verify Linux x64 build outputs + shell: bash + run: | + test -f ./tpc + test -f "${PHPX_HOME}/lib/libphpx.so" + test -f third_party/phpy/modules/phpy.so + chmod +x ./tpc + file ./tpc | grep -Eiq 'x86-64|x86_64|amd64' - name: Enable phpy extension shell: bash @@ -276,14 +309,9 @@ jobs: test -f "${PHP_HOME}/lib/libphp.so" echo "LD_LIBRARY_PATH=${PHPX_HOME}/lib:${PHP_HOME}/lib" >> "${GITHUB_ENV}" - - name: Build bootstrap TypePHP compiler - run: | - php bin/tpc.php project.yml --job 2 --no-progress - test -x ./tpc - ./tpc --version - - name: Show build environment run: | + ./tpc --version php -v php --ini ldd ./tpc | grep -E 'libphp(x)?[0-9.]*\.so' diff --git a/.github/workflows/macos-arm64.yml b/.github/workflows/macos-arm64.yml new file mode 100644 index 00000000..2d120b32 --- /dev/null +++ b/.github/workflows/macos-arm64.yml @@ -0,0 +1,43 @@ +name: macOS ARM64 + +on: + push: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: macos-arm64-${{ github.ref }} + cancel-in-progress: true + +env: + COMPOSER_NO_INTERACTION: 1 + COMPOSER_PROCESS_TIMEOUT: 0 + +jobs: + build: + name: Build - PHP ${{ matrix.php }} ZTS + runs-on: macos-15 + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + php: ["8.4", "8.5"] + env: + PHPX_HOME: ${{ github.workspace }}/vendor/swoole/phpx + + steps: + - name: Checkout TypePHP + uses: actions/checkout@v4 + + - name: Build and smoke test + uses: ./.github/actions/unix-arm64-build + with: + php-version: ${{ matrix.php }} + os: macos + library-extension: dylib + smoke-directory: macos + smoke-binary: macos_smoke + smoke-output: macos-arm64-smoke-ok:zts diff --git a/.github/workflows/platform-build.yml b/.github/workflows/platform-build.yml deleted file mode 100644 index e11ac022..00000000 --- a/.github/workflows/platform-build.yml +++ /dev/null @@ -1,179 +0,0 @@ -name: ARM64 and macOS tpc build - -on: - push: - pull_request: - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: platform-tpc-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - COMPOSER_NO_INTERACTION: 1 - COMPOSER_PROCESS_TIMEOUT: 0 - -jobs: - build-tpc: - name: ${{ matrix.target.label }} (PHP ${{ matrix.php }} ZTS) - runs-on: ${{ matrix.target.runner }} - timeout-minutes: 90 - strategy: - fail-fast: false - matrix: - php: ["8.4", "8.5"] - target: - - label: Linux ARM64 - runner: ubuntu-22.04-arm - os: linux - arch: arm64 - library_ext: so - smoke_dir: linux-arm64 - smoke_binary: linux_arm64_smoke - smoke_output: linux-arm64-smoke-ok:zts - - label: macOS ARM64 - runner: macos-15 - os: macos - arch: arm64 - library_ext: dylib - smoke_dir: macos - smoke_binary: macos_smoke - smoke_output: macos-arm64-smoke-ok:zts - env: - PHPX_HOME: ${{ github.workspace }}/vendor/swoole/phpx - - steps: - - name: Checkout TypePHP - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: mbstring - ini-values: precision=17, memory_limit=4G, error_reporting=E_ERROR|E_WARNING, display_errors=1, display_startup_errors=1, log_errors=0 - tools: composer:v2 - env: - fail-fast: true - phpts: ts - update: true - - - name: Install Linux build dependencies - if: matrix.target.os == 'linux' - shell: bash - run: | - sudo apt-get update - sudo apt-get install --yes build-essential cmake libgmp-dev libmpfr-dev pkg-config - - - name: Install macOS build dependencies - if: matrix.target.os == 'macos' - shell: bash - run: brew install cmake gmp mpfr pkg-config - - - name: Verify ZTS PHP and architecture - shell: bash - run: | - php -r 'if (!PHP_ZTS) { fwrite(STDERR, "Expected a ZTS PHP build\n"); exit(1); }' - case "$(php -r 'echo PHP_VERSION;')" in - "${{ matrix.php }}"*) ;; - *) echo "setup-php installed an unexpected PHP version" >&2; exit 1 ;; - esac - case "$(uname -m)" in - arm64|aarch64) ;; - *) echo "Expected an ARM64 runner, got $(uname -m)" >&2; exit 1 ;; - esac - - php_home="$(php-config --prefix)" - embed_library="${php_home}/lib/libphp.${{ matrix.target.library_ext }}" - test -x "${php_home}/bin/php-config" - test -f "${embed_library}" - echo "PHP_HOME=${php_home}" >> "${GITHUB_ENV}" - if [[ '${{ matrix.target.os }}' == 'linux' ]]; then - echo "LD_LIBRARY_PATH=${PHPX_HOME}/lib:${php_home}/lib" >> "${GITHUB_ENV}" - else - echo "DYLD_LIBRARY_PATH=${PHPX_HOME}/lib:${php_home}/lib" >> "${GITHUB_ENV}" - fi - php -v - php-config --configure-options - - - name: Patch php_hash.h C++ compatibility - uses: ./.github/actions/patch-php-headers - - - name: Install Composer dependencies - run: composer install --prefer-dist --no-progress - - - name: Build PHPX - shell: bash - run: | - cmake -S "${PHPX_HOME}" -B "${PHPX_HOME}/build" \ - -D CMAKE_BUILD_TYPE=Release \ - -D BUILD_TESTS=OFF \ - -D BUILD_EXT=OFF \ - -D GITHUB_ACTION=ON \ - -D php_dir="${PHP_HOME}" - cmake --build "${PHPX_HOME}/build" --target phpx --parallel 2 - test -f "${PHPX_HOME}/lib/libphpx.${{ matrix.target.library_ext }}" - - - name: Build tpc - shell: bash - run: | - php bin/tpc.php project.yml --job 2 --no-progress - test -x ./tpc - file ./tpc - file ./tpc | grep -Eiq 'arm64|aarch64|ARM aarch64' - ./tpc --version - - - name: Run platform smoke test - shell: bash - run: | - smoke_root=".github/smoke/${{ matrix.target.smoke_dir }}" - ./tpc "${smoke_root}/project.yml" --job 1 --no-progress - smoke_binary="${smoke_root}/${{ matrix.target.smoke_binary }}" - test -x "${smoke_binary}" - output="$("${smoke_binary}")" - test "${output}" = '${{ matrix.target.smoke_output }}' - - - name: Show native dependencies - shell: bash - run: | - if [[ '${{ matrix.target.os }}' == 'linux' ]]; then - ldd ./tpc - else - otool -L ./tpc - fi - - - name: Package tested compiler - if: startsWith(github.ref, 'refs/tags/') && matrix.php == '8.5' - shell: bash - run: | - composer install --no-dev --prefer-dist --no-progress --classmap-authoritative - export TYPEPHP_PACKAGE_VERSION="${GITHUB_REF_NAME}" - php package.php - test "$(find . -maxdepth 1 -name 'tpc_v*_${{ matrix.target.os }}_${{ matrix.target.arch }}.tar.gz' -type f | wc -l)" -eq 1 - - - name: Upload release package - if: startsWith(github.ref, 'refs/tags/') && matrix.php == '8.5' - uses: actions/upload-artifact@v4 - with: - name: release-${{ matrix.target.os }}-${{ matrix.target.arch }}-php-${{ matrix.php }}-zts - if-no-files-found: error - retention-days: 1 - path: tpc_v*_${{ matrix.target.os }}_${{ matrix.target.arch }}.tar.gz - - - name: Upload platform build outputs - if: always() - uses: actions/upload-artifact@v4 - with: - name: tpc-${{ matrix.target.os }}-${{ matrix.target.arch }}-php-${{ matrix.php }}-zts - include-hidden-files: true - if-no-files-found: warn - retention-days: 7 - path: | - tpc - .github/smoke/${{ matrix.target.smoke_dir }}/${{ matrix.target.smoke_binary }} - .github/smoke/${{ matrix.target.smoke_dir }}/build/**/*.cc - .github/smoke/${{ matrix.target.smoke_dir }}/build/**/*.h diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65010f8e..a665fbea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,15 +77,16 @@ jobs: exit 1 } - wait_for_workflow tests.yml TESTS_RUN_ID + wait_for_workflow linux-x64.yml TESTS_RUN_ID wait_for_workflow windows-build.yml WINDOWS_RUN_ID - wait_for_workflow platform-build.yml PLATFORM_RUN_ID + wait_for_workflow linux-arm64.yml LINUX_ARM64_RUN_ID + wait_for_workflow macos-arm64.yml MACOS_ARM64_RUN_ID - name: Download tested packages shell: bash run: | set -euo pipefail - mkdir -p dist/linux-x64 dist/windows dist/platforms + mkdir -p dist/linux-x64 dist/linux-arm64 dist/macos-arm64 dist/windows gh run download "${TESTS_RUN_ID}" \ --repo "${GITHUB_REPOSITORY}" \ --pattern 'release-linux-*' \ @@ -94,10 +95,14 @@ jobs: --repo "${GITHUB_REPOSITORY}" \ --pattern 'release-windows-*' \ --dir dist/windows - gh run download "${PLATFORM_RUN_ID}" \ + gh run download "${LINUX_ARM64_RUN_ID}" \ --repo "${GITHUB_REPOSITORY}" \ - --pattern 'release-*' \ - --dir dist/platforms + --pattern 'release-linux-arm64-*' \ + --dir dist/linux-arm64 + gh run download "${MACOS_ARM64_RUN_ID}" \ + --repo "${GITHUB_REPOSITORY}" \ + --pattern 'release-macos-arm64-*' \ + --dir dist/macos-arm64 test "$(find dist -type f -name 'tpc_v*_linux_x64.tar.gz' | wc -l)" -eq 1 test "$(find dist -type f -name 'tpc_v*_linux_arm64.tar.gz' | wc -l)" -eq 1 diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 3545c251..a1e78368 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -1,4 +1,4 @@ -name: Windows tpc build +name: Windows x64 on: push: @@ -18,7 +18,7 @@ env: jobs: build-tpc: - name: tpc.exe (PHP ${{ matrix.php }} ZTS) + name: Build - PHP ${{ matrix.php }} ZTS runs-on: windows-2022 timeout-minutes: 90 strategy: diff --git a/README-CN.md b/README-CN.md index 9bd4c11b..38f166e9 100644 --- a/README-CN.md +++ b/README-CN.md @@ -9,7 +9,10 @@ 将 PHP 源码提前(AOT)编译为原生机器码,生成原生可执行文件、PHP 扩展和共享库, 同时保留你熟悉的 PHP 语法。 -[![Tests](https://github.com/swoole/typephp/actions/workflows/tests.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/tests.yml) +[![Linux x64](https://github.com/swoole/typephp/actions/workflows/linux-x64.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/linux-x64.yml) +[![Linux ARM64](https://github.com/swoole/typephp/actions/workflows/linux-arm64.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/linux-arm64.yml) +[![macOS ARM64](https://github.com/swoole/typephp/actions/workflows/macos-arm64.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/macos-arm64.yml) +[![Windows x64](https://github.com/swoole/typephp/actions/workflows/windows-build.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/windows-build.yml) [![PHP 8.4–8.5](https://img.shields.io/badge/PHP-8.4--8.5-777bb4.svg)](https://www.php.net/) [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE) diff --git a/README.md b/README.md index 1249f7cc..ff52142d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,10 @@ Compile PHP source code into native machine code ahead of time — producing native executables, PHP extensions, and shared libraries — while keeping the PHP syntax you already know. -[![Tests](https://github.com/swoole/typephp/actions/workflows/tests.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/tests.yml) +[![Linux x64](https://github.com/swoole/typephp/actions/workflows/linux-x64.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/linux-x64.yml) +[![Linux ARM64](https://github.com/swoole/typephp/actions/workflows/linux-arm64.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/linux-arm64.yml) +[![macOS ARM64](https://github.com/swoole/typephp/actions/workflows/macos-arm64.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/macos-arm64.yml) +[![Windows x64](https://github.com/swoole/typephp/actions/workflows/windows-build.yml/badge.svg)](https://github.com/swoole/typephp/actions/workflows/windows-build.yml) [![PHP 8.4–8.5](https://img.shields.io/badge/PHP-8.4--8.5-777bb4.svg)](https://www.php.net/) [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE)