Skip to content

Commit f345e54

Browse files
authored
Merge pull request #16865 from niden-code/5.0.x
Windows builds
2 parents 1df7f86 + ca4bd45 commit f345e54

5 files changed

Lines changed: 93 additions & 132 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: "[Windows] Build Phalcon"
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
env:
8+
# All versions should be declared here
9+
PHALCON_VERSION: '5.12.0'
10+
PHP_VERSION_LIST: '8.1, 8.2, 8.3, 8.4, 8.5'
11+
ARCH_LIST: 'x64, x86'
12+
TS_LIST: 'nts, ts'
13+
14+
jobs:
15+
get-extension-matrix:
16+
runs-on: ubuntu-latest
17+
name: "Generate Extension Matrix"
18+
outputs:
19+
matrix: ${{ steps.extension-matrix.outputs.matrix }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v6
23+
- name: Get the extension matrix
24+
id: extension-matrix
25+
uses: php/php-windows-builder/extension-matrix@v1
26+
with:
27+
extension-url: https://github.com/phalcon/cphalcon
28+
extension-ref: ${{ env.PHALCON_VERSION }}
29+
php-version-list: ${{ env.PHP_VERSION_LIST }}
30+
arch-list: ${{ env.ARCH_LIST }}
31+
ts-list: ${{ env.TS_LIST }}
32+
33+
build:
34+
needs: get-extension-matrix
35+
runs-on: ${{ matrix.os }}
36+
name: "Build Phalcon (PHP ${{ matrix.php-version }}-${{ matrix.ts }}-${{ matrix.arch }})"
37+
strategy:
38+
matrix: ${{ fromJson(needs.get-extension-matrix.outputs.matrix) }}
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v6
42+
43+
- name: Generate build folder
44+
run: |
45+
cd build/
46+
php gen-build.php
47+
cd ../
48+
pwd
49+
cp -v build/phalcon/*.* .
50+
51+
- name: Build the extension
52+
uses: php/php-windows-builder/extension@v1
53+
with:
54+
args: --enable-phalcon
55+
php-version: ${{ matrix.php-version }}
56+
arch: ${{ matrix.arch }}
57+
ts: ${{ matrix.ts }}
58+
59+
60+
# - name: Extract Phalcon Version
61+
# shell: powershell
62+
# run: |
63+
# chcp 65001
64+
# $r = Select-String -Path build/phalcon/php_phalcon.h -Pattern 'PHP_PHALCON_VERSION\s+"(.*)"'
65+
# $s = $r.Matches[0].Groups[1]
66+
# echo "$s"
67+
# $PhalconVersion = 'PHALCON_VERSION=' + $s
68+
# echo $PhalconVersion >> $env:GITHUB_ENV
69+
#
70+
# - name: Setup PHP
71+
# id: setup-php
72+
# uses: php/setup-php-sdk@v0.11
73+
# with:
74+
# version: ${{matrix.php}}
75+
# arch: ${{matrix.arch}}
76+
# ts: ${{matrix.ts}}
77+
# deps: zlib
78+
#
79+
# - name: Upload artifacts
80+
# uses: actions/upload-artifact@v4
81+
# with:
82+
# name: ${{env.ARTIFACT_NAME}}
83+
# path: |
84+
# ${{env.ARTIFACT}}
85+
# LICENSE.txt

.github/workflows/compile-windows.yml_bak

Lines changed: 0 additions & 124 deletions
This file was deleted.

tests/syntax/phql/003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ array(3) {
5454
["type"]=>
5555
int(355)
5656
["name"]=>
57-
string(28) "Phalcon\Tests\Models\Invoices"
57+
string(29) "Phalcon\Tests\Models\Invoices"
5858
}
5959
}
6060
}

tests/syntax/volt/statements/switchcase/008.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ array(1) {
4545
["type"]=>
4646
int(357)
4747
["value"]=>
48-
string(5) "
48+
string(6) "
4949
"
5050
["file"]=>
5151
string(9) "eval code"
@@ -77,7 +77,7 @@ array(1) {
7777
["type"]=>
7878
int(357)
7979
["value"]=>
80-
string(28) "
80+
string(30) "
8181
Hello username
8282
"
8383
["file"]=>
@@ -110,7 +110,7 @@ array(1) {
110110
["type"]=>
111111
int(357)
112112
["value"]=>
113-
string(9) "
113+
string(10) "
114114
"
115115
["file"]=>
116116
string(9) "eval code"
@@ -142,7 +142,7 @@ array(1) {
142142
["type"]=>
143143
int(357)
144144
["value"]=>
145-
string(10) "!
145+
string(11) "!
146146
"
147147
["file"]=>
148148
string(9) "eval code"
@@ -163,7 +163,7 @@ array(1) {
163163
["type"]=>
164164
int(357)
165165
["value"]=>
166-
string(5) "
166+
string(6) "
167167
"
168168
["file"]=>
169169
string(9) "eval code"
@@ -184,7 +184,7 @@ array(1) {
184184
["type"]=>
185185
int(357)
186186
["value"]=>
187-
string(22) "
187+
string(24) "
188188
Who are you?
189189
"
190190
["file"]=>

tests/syntax/volt/statements/switchcase/010.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ $compiler->parse($template);
1919
--EXPECTF--
2020
Fatal error: Uncaught Phalcon\Mvc\View\Exception: Syntax error, unexpected token %} in eval code on line 1 in %s010.php:12
2121
Stack trace:
22-
#0 %s010.php(12): Phalcon\Mvc\View\Engine\Volt\Compiler->parse('{% switch %}\n ...')
22+
#0 %s010.php(12): Phalcon\Mvc\View\Engine\Volt\Compiler->parse('{% switch %}\r\n ...')
2323
#1 {main}
2424
thrown in %s010.php on line 12

0 commit comments

Comments
 (0)