From 02a73af889fc302bbb949586bd97eefe737e2c1f Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Fri, 16 Oct 2026 23:37:57 +0530 Subject: [PATCH 1/4] Run brew update in macOS CI --- .github/actions/brew/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/brew/action.yml b/.github/actions/brew/action.yml index b1e3efd088aa..c809ee109882 100644 --- a/.github/actions/brew/action.yml +++ b/.github/actions/brew/action.yml @@ -6,6 +6,8 @@ runs: run: | set -x + brew update + # Patch brew to overwrite always formula_installer="$(brew --repo)"/Library/Homebrew/formula_installer.rb code=" keg.link\(verbose: verbose\?" From d3d9dbb885392feb36cfd7fea8336d3ad274ec7d Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 18 Oct 2026 18:06:30 +0530 Subject: [PATCH 2/4] Drop intel macOS from CI --- .github/matrix.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/matrix.php b/.github/matrix.php index 58edba024c96..f3fb1fa7f031 100644 --- a/.github/matrix.php +++ b/.github/matrix.php @@ -125,10 +125,9 @@ function select_jobs($repository, $trigger, $nightly, $labels, $php_version, $re : ['debug' => [true], 'zts' => [true]]; } if ($all_jobs || !$no_jobs || $test_macos) { - $test_arm = version_compare($php_version, '8.4', '>='); $jobs['MACOS']['matrix'] = $all_variations - ? ['arch' => $test_arm ? ['X64', 'ARM64'] : ['X64'], 'debug' => [true, false], 'zts' => [true, false]] - : ['include' => [['arch' => $test_arm ? 'ARM64' : 'X64', 'debug' => true, 'zts' => false]]]; + ? ['arch' => ['ARM64'], 'debug' => [true, false], 'zts' => [true, false]] + : ['include' => [['arch' => 'ARM64', 'debug' => true, 'zts' => false]]]; $jobs['MACOS']['config']['version'] = version_compare($php_version, '8.4', '>=') ? '26' : '15'; } if ($all_jobs || $test_msan) { From 943c119558dbbb7954f163e17784291c44c198cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 24 May 2025 22:26:06 +0200 Subject: [PATCH 3/4] Fix build on Apple Clang 17+ (#18629) Fixing "invalid cpu feature string for builtin" errors that started to appear on Apple Clang 17.0.0 (cherry picked from commit 772479ea2ff92115d67b39572e265dee4e91b444) --- Zend/zend_cpuinfo.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Zend/zend_cpuinfo.h b/Zend/zend_cpuinfo.h index ebfbab799795..b1462c99725d 100644 --- a/Zend/zend_cpuinfo.h +++ b/Zend/zend_cpuinfo.h @@ -121,58 +121,86 @@ ZEND_API int zend_cpu_supports(zend_cpu_feature feature); * functions */ ZEND_NO_SANITIZE_ADDRESS static inline int zend_cpu_supports_sse2(void) { +#ifdef __aarch64__ + return 0; +#else #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif return __builtin_cpu_supports("sse2"); +#endif } ZEND_NO_SANITIZE_ADDRESS static inline int zend_cpu_supports_sse3(void) { +#ifdef __aarch64__ + return 0; +#else #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif return __builtin_cpu_supports("sse3"); +#endif } ZEND_NO_SANITIZE_ADDRESS static inline int zend_cpu_supports_ssse3(void) { +#ifdef __aarch64__ + return 0; +#else #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif return __builtin_cpu_supports("ssse3"); +#endif } ZEND_NO_SANITIZE_ADDRESS static inline int zend_cpu_supports_sse41(void) { +#ifdef __aarch64__ + return 0; +#else #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif return __builtin_cpu_supports("sse4.1"); +#endif } ZEND_NO_SANITIZE_ADDRESS static inline int zend_cpu_supports_sse42(void) { +#ifdef __aarch64__ + return 0; +#else #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif return __builtin_cpu_supports("sse4.2"); +#endif } ZEND_NO_SANITIZE_ADDRESS static inline int zend_cpu_supports_avx(void) { +#ifdef __aarch64__ + return 0; +#else #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif return __builtin_cpu_supports("avx"); +#endif } ZEND_NO_SANITIZE_ADDRESS static inline int zend_cpu_supports_avx2(void) { +#ifdef __aarch64__ + return 0; +#else #if PHP_HAVE_BUILTIN_CPU_INIT __builtin_cpu_init(); #endif return __builtin_cpu_supports("avx2"); +#endif } #else From 3d53001f85c9453661733d6e3aa4eb17d0894f81 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 18 Oct 2026 19:58:15 +0530 Subject: [PATCH 4/4] Cleanup macOS job in test-suite.yml --- .github/workflows/test-suite.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 89a5cdb04566..a9bb570f9212 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -312,7 +312,7 @@ jobs: fail-fast: false matrix: ${{ fromJson(inputs.branch).jobs.MACOS.matrix }} name: "MACOS_${{ matrix.arch }}_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" - runs-on: macos-${{ fromJson(inputs.branch).jobs.MACOS.config.version }}${{ matrix.arch == 'X64' && '-intel' || '' }} + runs-on: macos-${{ fromJson(inputs.branch).jobs.MACOS.config.version }} timeout-minutes: 180 steps: - name: git checkout @@ -345,18 +345,18 @@ jobs: if: ${{ inputs.all_variations }} uses: ./.github/actions/test-macos - name: Test Tracing JIT - if: ${{ matrix.arch == 'X64' || !matrix.zts }} + if: ${{ !matrix.zts }} uses: ./.github/actions/test-macos with: enableOpcache: true jitType: tracing - name: Test OpCache - if: ${{ inputs.all_variations || (matrix.arch == 'ARM64' && matrix.zts) }} + if: ${{ inputs.all_variations || matrix.zts }} uses: ./.github/actions/test-macos with: enableOpcache: true - name: Test Function JIT - if: ${{ inputs.all_variations && (matrix.arch == 'X64' || !matrix.zts) }} + if: ${{ inputs.all_variations && !matrix.zts }} uses: ./.github/actions/test-macos with: enableOpcache: true