1717
1818env :
1919 # All versions should be declared here
20- PHALCON_VERSION : 5.12.1
20+ PHALCON_VERSION : 5.13.0
2121 ZEPHIR_PARSER_VERSION : 1.8.0
2222 # For tests
2323 LANG : en_US.UTF-8
2727 # Windows specific
2828 TOOLS_DIR : ' C:\tools'
2929 CACHE_DIR : ' C:\Downloads'
30+ PHP_VERSION_LIST : ' 8.1, 8.2, 8.3, 8.4, 8.5'
31+ ARCH_LIST : ' x64, x86'
32+ TS_LIST : ' nts, ts'
3033
3134 # PHP extensions required by Composer
3235 EXTENSIONS : apcu, gettext, gd, igbinary, imagick, intl, json, mbstring, msgpack, memcached, pcov, sqlite3, yaml, redis, :memcache, openssl
@@ -99,6 +102,74 @@ jobs:
99102 path : ide/${{ env.PHALCON_VERSION }}/Phalcon/
100103 retention-days : 5
101104
105+ # Build Phalcon PECL package (kept available alongside PIE for a few
106+ # releases to give downstream users time to migrate to PIE).
107+ generate_pecl :
108+ name : Build Phalcon PECL package
109+ needs : [phpcs, stubs]
110+ runs-on : ubuntu-latest
111+ timeout-minutes : 30
112+
113+ steps :
114+ - uses : actions/checkout@v6
115+
116+ - name : Setup PHP
117+ uses : shivammathur/setup-php@v2
118+ with :
119+ php-version : ' 8.5'
120+ extensions : zephir_parser-${{ env.ZEPHIR_PARSER_VERSION }}
121+ tools : pecl
122+ env :
123+ COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
124+
125+ - name : Setup APT Repositories
126+ run : |
127+ # Remove Microsoft repos — our builds often fail due to
128+ # unstable/offline Microsoft servers.
129+ sudo rm -f /etc/apt/sources.list.d/dotnetdev.list
130+ sudo rm -f /etc/apt/sources.list.d/azure*.list
131+
132+ - name : Install System Dependencies
133+ run : |
134+ sudo apt-get update --quiet --yes 1>/dev/null
135+ sudo apt-get install --no-install-recommends -q -y re2c
136+
137+ - run : composer install --ignore-platform-reqs
138+
139+ - name : Generate C Code
140+ run : |
141+ vendor/bin/zephir fullclean
142+ vendor/bin/zephir generate
143+ (cd build && php gen-build.php)
144+
145+ - name : Upload compile-errors.log
146+ uses : actions/upload-artifact@v7
147+ if : failure()
148+ with :
149+ name : compile-errors
150+ path : compile-errors.log
151+
152+ - name : Create Pecl Package
153+ id : pecl_create
154+ run : |
155+ cp build/phalcon/config.w32 config.w32
156+ cp build/phalcon/phalcon.zep.c phalcon.zep.c
157+ cp build/phalcon/config.m4 config.m4
158+ cp build/phalcon/php_phalcon.h php_phalcon.h
159+ cp build/phalcon/phalcon.zep.h phalcon.zep.h
160+ pecl package
161+ phalcon_package="`ls | grep phalcon-*tgz`"
162+ mv $phalcon_package phalcon-pecl.tgz
163+
164+ - name : Validate Pecl Package
165+ run : pecl package-validate phalcon-pecl.tgz
166+
167+ - name : Upload Artifact
168+ uses : actions/upload-artifact@v7
169+ with :
170+ name : ' phalcon-pecl'
171+ path : phalcon-pecl.tgz
172+
102173 # Generate fresh C source from Zephir, build the extension, and cache
103174 # the source tree and compiled .so for all downstream jobs.
104175 generate_source :
@@ -163,20 +234,13 @@ jobs:
163234 path : build/phalcon/
164235 retention-days : 1
165236
166- - name : Build extension
237+ - name : Build extension (smoke test)
167238 run : |
168239 cd build/phalcon
169240 phpize
170241 ./configure --enable-phalcon
171242 make -j"$(nproc)"
172243
173- - name : Upload extension artifact
174- uses : actions/upload-artifact@v7
175- with :
176- name : phalcon-so-php${{ matrix.php }}-nts-linux-x64
177- path : build/phalcon/modules/phalcon.so
178- retention-days : 1
179-
180244 # Validate PIE metadata and confirm the extension builds from the
181245 # generated source tree that PIE would use.
182246 pie_smoke_test :
@@ -294,12 +358,19 @@ jobs:
294358 - ' ts'
295359 arch :
296360 - ' x64'
361+ - ' arm64'
297362
298363 name :
299364 - ubuntu-gcc
365+ - macos-clang
366+
367+ exclude :
368+ - { name: macos-clang, arch: x64 }
300369
301370 include :
302- - { name: ubuntu-gcc, os: ubuntu-22.04, compiler: gcc }
371+ - { name: ubuntu-gcc, arch: x64, os: ubuntu-22.04, compiler: gcc }
372+ - { name: ubuntu-gcc, arch: arm64, os: ubuntu-22.04-arm, compiler: gcc }
373+ - { name: macos-clang, arch: arm64, os: macos-14, compiler: clang }
303374
304375 steps :
305376 - uses : actions/checkout@v6
@@ -340,7 +411,7 @@ jobs:
340411 if : runner.os == 'Linux'
341412 uses : actions/upload-artifact@v7
342413 with :
343- name : phalcon-so-php${{ matrix.php }}-${{ matrix.ts }}-linux-x64
414+ name : phalcon-so-php${{ matrix.php }}-${{ matrix.ts }}-linux-${{ matrix.arch }}
344415 path : ${{ steps.linux-build.outputs.extension-dir }}/phalcon.so
345416 retention-days : 1
346417
@@ -858,6 +929,56 @@ jobs:
858929# verbose: true
859930# name: codecov-umbrella
860931
932+ get_extension_matrix :
933+ permissions :
934+ contents : read
935+ name : " Generate Windows Extension Matrix"
936+ needs : [phpcs, stubs]
937+ runs-on : ubuntu-latest
938+ outputs :
939+ matrix : ${{ steps.extension-matrix.outputs.matrix }}
940+ steps :
941+ - name : Checkout
942+ uses : actions/checkout@v6
943+ - name : Get the extension matrix
944+ id : extension-matrix
945+ uses : php/php-windows-builder/extension-matrix@v1
946+ with :
947+ extension-url : https://github.com/phalcon/cphalcon
948+ extension-ref : ${{ env.PHALCON_VERSION }}
949+ php-version-list : ${{ env.PHP_VERSION_LIST }}
950+ arch-list : ${{ env.ARCH_LIST }}
951+ ts-list : ${{ env.TS_LIST }}
952+
953+ build_extension_windows :
954+ permissions :
955+ contents : read
956+ needs : get_extension_matrix
957+ runs-on : ${{ matrix.os }}
958+ name : " Build Windows / PHP-${{ matrix.php-version }}-${{ matrix.ts }}-${{ matrix.arch }}"
959+ strategy :
960+ fail-fast : false
961+ matrix : ${{ fromJson(needs.get_extension_matrix.outputs.matrix) }}
962+ steps :
963+ - name : Checkout
964+ uses : actions/checkout@v6
965+
966+ - name : Generate build folder
967+ run : |
968+ cd build/
969+ php gen-build.php
970+ cd ../
971+ cp -v build/phalcon/*.* .
972+
973+ - name : Build the extension
974+ uses : php/php-windows-builder/extension@v1
975+ with :
976+ args : --enable-phalcon
977+ php-version : ${{ matrix.php-version }}
978+ arch : ${{ matrix.arch }}
979+ ts : ${{ matrix.ts }}
980+ extension-ref : ${{ env.PHALCON_VERSION }}
981+
861982 release :
862983 permissions :
863984 contents : write
@@ -866,7 +987,9 @@ jobs:
866987
867988 needs :
868989 - generate_source
990+ - generate_pecl
869991 - build_extension
992+ - build_extension_windows
870993 - unit_test
871994 - database_mysql_test
872995 - database_sqlite_test
@@ -886,7 +1009,8 @@ jobs:
8861009 - name : Prepare Release assets
8871010 run : |
8881011 mkdir -p ./build-artifacts/release
889- find ./build-artifacts -type f -name phalcon*.zip -exec cp {} ./build-artifacts/release/ ";"
1012+ find ./build-artifacts -type f \( -name 'phalcon*.zip' -o -name 'php_phalcon*.zip' \) -exec cp {} ./build-artifacts/release/ ";"
1013+ find ./build-artifacts -type f -name 'phalcon*.tgz' -exec cp {} ./build-artifacts/release/ ";"
8901014 echo "-- Creating Release Notes"
8911015 ./.ci/release-notes.sh ./CHANGELOG-5.0.md > ./build-artifacts/release/release-notes.md
8921016
@@ -898,7 +1022,7 @@ jobs:
8981022 tag : ${{ github.ref_name }}
8991023 bodyFile : " ./build-artifacts/release/release-notes.md"
9001024 allowUpdates : true
901- artifacts : " ./build-artifacts/release/*.zip"
1025+ artifacts : " ./build-artifacts/release/*.zip,./build-artifacts/release/*.tgz "
9021026 artifactContentType : application/octet-stream
9031027
9041028 publish_stubs :
@@ -965,4 +1089,4 @@ jobs:
9651089 body : " v${{ env.PHALCON_VERSION }} Stubs"
9661090 draft : true
9671091 allowUpdates : true
968- commit : master
1092+ commit : master
0 commit comments