Skip to content

Commit bd6d70d

Browse files
committed
trying php-windows-builder
1 parent 4796728 commit bd6d70d

File tree

1 file changed

+13
-62
lines changed

1 file changed

+13
-62
lines changed

.github/workflows/compile-windows.yml

Lines changed: 13 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -58,66 +58,17 @@ jobs:
5858
cd build/
5959
php gen-build.php
6060
61-
- name: Enable Developer Command Prompt
62-
uses: ilammy/msvc-dev-cmd@v1
61+
- name: Build the extension
62+
uses: php/php-windows-builder/extension@v1
6363
with:
64-
arch: ${{matrix.arch}}
65-
toolset: ${{steps.setup-php.outputs.toolset}}
66-
67-
- name: Phpize
68-
run: |
69-
cd build/phalcon/
70-
phpize
71-
72-
- name: Configure
73-
run: |
74-
cd build/phalcon/
75-
./configure --enable-phalcon --with-prefix=${{steps.setup-php.outputs.prefix}}
76-
77-
- name: Make
78-
run: |
79-
cd build/phalcon/
80-
nmake
81-
82-
- name: Define Phalcon Module Env
83-
shell: powershell
84-
run: |
85-
chcp 65001
86-
87-
$dir = (Get-Location).Path + '\build\phalcon\'
88-
if ('x64' -eq '${{matrix.arch}}') { $dir = $dir + 'x64\' }
89-
$dir = $dir + 'Release'
90-
if ('ts' -eq '${{matrix.ts}}') { $dir = $dir + '_TS' }
91-
$phalconDllOpt = 'TEST_PHP_ARGS=-n -d zend_extension=' + $dir + '\php_phalcon.dll'
92-
echo $phalconDllOpt >> $env:GITHUB_ENV
93-
94-
$artifactName = 'php_phalcon-${{ env.PHALCON_VERSION }}-php${{matrix.php}}'
95-
96-
if ('nts' -ne '${{matrix.ts}}') { $artifactName = $artifactName + '-ts' }
97-
if ('nts' -eq '${{matrix.ts}}') { $artifactName = $artifactName + '-nts' }
98-
99-
$artifactName = $artifactName + '-windows'
100-
101-
if ('8.0' -eq '${{matrix.php}}') { $artifactName = $artifactName + '-vs16' }
102-
if ('8.1' -eq '${{matrix.php}}') { $artifactName = $artifactName + '-vs16' }
103-
if ('8.2' -eq '${{matrix.php}}') { $artifactName = $artifactName + '-vs16' }
104-
if ('8.3' -eq '${{matrix.php}}') { $artifactName = $artifactName + '-vs16' }
105-
106-
if ('x64' -eq '${{matrix.arch}}') { $artifactName = $artifactName + '-x64' }
107-
108-
$phalconArtifactName = "ARTIFACT_NAME=" + $artifactName
109-
echo $phalconArtifactName >> $env:GITHUB_ENV
110-
111-
$from = $dir + '\php_phalcon.dll'
112-
$to = '.\php_phalcon.dll'
113-
Copy-Item $from -Destination $to
114-
$phalconArtifact = "ARTIFACT=" + '.\php_phalcon.dll'
115-
echo $phalconArtifact >> $env:GITHUB_ENV
116-
117-
- name: Upload artifacts
118-
uses: actions/upload-artifact@v4
119-
with:
120-
name: ${{env.ARTIFACT_NAME}}
121-
path: |
122-
${{env.ARTIFACT}}
123-
LICENSE.txt
64+
php-version: ${{ matrix.php-version }}
65+
arch: ${{ matrix.arch }}
66+
ts: ${{ matrix.ts }}
67+
68+
# - name: Upload artifacts
69+
# uses: actions/upload-artifact@v4
70+
# with:
71+
# name: ${{env.ARTIFACT_NAME}}
72+
# path: |
73+
# ${{env.ARTIFACT}}
74+
# LICENSE.txt

0 commit comments

Comments
 (0)