Skip to content

Commit f2ee03d

Browse files
committed
Fix release path and artifact name
1 parent b62510e commit f2ee03d

File tree

4 files changed

+23
-41
lines changed

4 files changed

+23
-41
lines changed

.ci/build-win32.bat

-22
This file was deleted.

.ci/win-ci-tools.psm1

+18-17
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,26 @@ function InitializeReleaseVars {
2929
Configures Environment variables for Release build.
3030
#>
3131

32-
if ($env:BUILD_TYPE -Match "nts") {
33-
$env:RELEASE_ZIPBALL = "zephir_parser_${env:PHP_ARCH}_vc${env:VC_VERSION}_php${env:PHP_MINOR}_nts"
34-
35-
if ($env:PHP_ARCH -eq 'x86') {
36-
$env:RELEASE_FOLDER = "x64\Release"
37-
} else {
38-
$env:RELEASE_FOLDER = "x64\Release"
39-
}
40-
} else {
41-
$env:RELEASE_ZIPBALL = "zephir_parser_${env:PHP_ARCH}_vc${env:VC_VERSION}_php${env:PHP_MINOR}"
42-
43-
if ($env:PHP_ARCH -eq 'x86') {
44-
$env:RELEASE_FOLDER = "x64\Release_TS"
45-
} else {
46-
$env:RELEASE_FOLDER = "x64\Release_TS"
47-
}
32+
# All extension builds should respect next logic for build artifacts
33+
#
34+
# release
35+
# |---- x64
36+
# | |---- ts / php_zephir_parser.dll
37+
# | |---- nts / php_zephir_parser.dll
38+
# |---- x86
39+
# | |---- ts / php_zephir_parser.dll
40+
# | |---- nts / php_zephir_parser.dll
41+
#
42+
# Build artifacts should be names like this:
43+
# zephir-parser-php-7.0-nts-Win32-VC14-x86.zip
44+
# zephir-parser-php-7.0-ts-Win32-VC14-x64.zip
45+
$VC_Prefix = "VC"
46+
if (${env:VC_VERSION} -ge 16) {
47+
$VC_Prefix = "VS"
4848
}
4949

50-
$env:RELEASE_DLL_PATH = "${env:GITHUB_WORKSPACE}\${env:RELEASE_FOLDER}\${env:EXTENSION_FILE}"
50+
$env:RELEASE_DLL_PATH = "${env:GITHUB_WORKSPACE}\${env:RELEASE_FOLDER}\${ArchPrefix}\${ThreadSafetyPrefix}\${env:EXTENSION_FILE}"
51+
$env:RELEASE_ZIPBALL = "zephir-parser-php-${env:PHP_MINOR}-${env:BUILD_TYPE}-Win32-${VC_Prefix}${env:VC_VERSION}-${env:PHP_ARCH}"
5152

5253
Write-Output "RELEASE_ZIPBALL=${env:RELEASE_ZIPBALL}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
5354
Write-Output "RELEASE_DLL_PATH=${env:RELEASE_DLL_PATH}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ indent_size = 4
1111
charset = utf-8
1212
trim_trailing_whitespace = true
1313

14-
[*.{yml,m4,sh,md,php,phpt,xml,json,w32}]
14+
[*.{yml,m4,sh,md,php,phpt,xml,json,w32,ps1,psm1}]
1515
indent_style = space
1616

1717
[*.{yml,m4,sh}]

.github/workflows/windows.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- php: '8.0'
6464
vc_num: 15
6565

66-
name: "Win ${{ matrix.arch }} VC${{ matrix.vc_num }} and PHP ${{ matrix.php }}-${{ matrix.build_type }}"
66+
name: "PHP-${{ matrix.php }}-${{ matrix.build_type }}-Win32-VC${{ matrix.vc_num }}-${{ matrix.arch }}"
6767
runs-on: windows-2016
6868

6969
steps:
@@ -94,6 +94,7 @@ jobs:
9494
Import-Module .\.ci\win-ci-tools.psm1
9595
SetupCommonEnvironment
9696
97+
# TODO: Use cache for PHP SDK and build tools
9798
- name: Install PHP SDK Binary Tools
9899
run: |
99100
Import-Module .\.ci\win-ci-tools.psm1
@@ -126,12 +127,14 @@ jobs:
126127
call C:\tools\php-sdk\bin\phpsdk_setvars.bat
127128
call C:\tools\php-devpack\phpize.bat
128129
130+
- name: Configure
129131
- shell: cmd
130132
run: |
131133
call C:\tools\php-sdk\phpsdk-vc${{ matrix.vc_num }}-${{ matrix.arch }}.bat
132134
call C:\tools\php-sdk\bin\phpsdk_setvars.bat
133135
configure --with-codegen-arch=yes --with-prefix=C:\php --with-php-build=C:\php-devpack --disable-all --enable-zephir-parser=shared
134136
137+
- name: Compile
135138
- shell: cmd
136139
run: |
137140
call C:\tools\php-sdk\phpsdk-vc${{ matrix.vc_num }}-${{ matrix.arch }}.bat

0 commit comments

Comments
 (0)