Skip to content

Commit 773543f

Browse files
committed
chore(ci): update windows script
1 parent b5c77f4 commit 773543f

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

.github/workflows/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Add-Content $task 'call phpize 2>&1'
77
Add-Content $task "call configure --with-php-build=C:\php\deps --enable-$env:PHP_EXT --enable-debug-pack 2>&1"
88
Add-Content $task 'nmake /nologo 2>&1'
99
Add-Content $task 'exit %errorlevel%'
10-
& "C:\php\php-sdk-$env:BIN_SDK_VER\phpsdk-$env:VC-$env:ARCH.bat" -t $task
10+
& "C:\php\php-sdk-$env:BIN_SDK_VER\phpsdk-$env:VS-$env:ARCH.bat" -t $task
1111
if (-not $?) {
1212
throw "building failed with errorlevel $LastExitCode"
1313
}

.github/workflows/install.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ if (-not (Test-Path 'C:\php')) {
77
# PHP SDK
88
$bname = "php-sdk-$env:BIN_SDK_VER.zip"
99
if (-not (Test-Path C:\php\$bname)) {
10-
echo "Download: https://github.com/microsoft/php-sdk-binary-tools/archive/$bname"
11-
Invoke-WebRequest "https://github.com/microsoft/php-sdk-binary-tools/archive/$bname" -OutFile "C:\php\$bname"
10+
echo "Download: https://github.com/php/php-sdk-binary-tools/archive/$bname"
11+
Invoke-WebRequest "https://github.com/php/php-sdk-binary-tools/archive/$bname" -OutFile "C:\php\$bname"
1212
}
1313
$dname0 = "php-sdk-binary-tools-php-sdk-$env:BIN_SDK_VER"
1414
$dname1 = "php-sdk-$env:BIN_SDK_VER"
@@ -32,7 +32,7 @@ $ts_part = ''
3232
if ('nts' -eq $env:TS) {
3333
$ts_part = '-nts'
3434
}
35-
$bname = "php-devel-pack-$php_version$ts_part-Win32-$env:VC-$env:ARCH.zip"
35+
$bname = "php-devel-pack-$php_version$ts_part-Win32-$env:VS-$env:ARCH.zip"
3636
if (-not (Test-Path "C:\php\$bname")) {
3737
try {
3838
echo "Download: https://windows.php.net/downloads/releases/$bname"
@@ -42,20 +42,20 @@ if (-not (Test-Path "C:\php\$bname")) {
4242
Invoke-WebRequest "https://windows.php.net/downloads/releases/archives/$bname" -OutFile "C:\php\$bname"
4343
}
4444
}
45-
$dname = "php-$php_version-devel-$env:VC-$env:ARCH"
45+
$dname = "php-$php_version-devel-$env:VS-$env:ARCH"
4646
if (-not (Test-Path "C:\php\devel")) {
4747
Expand-Archive "C:\php\$bname" 'C:\php'
4848
if (-not (Test-Path "C:\php\$dname")) {
4949
$php_normalize_version = $php_version.Split("-")[0]
50-
$dname = "php-$php_normalize_version-devel-$env:VC-$env:ARCH"
50+
$dname = "php-$php_normalize_version-devel-$env:VS-$env:ARCH"
5151
}
5252
if (-not (Test-Path "C:\php\devel")) {
5353
Move-Item "C:\php\$dname" "C:\php\devel"
5454
}
5555
}
5656

5757
# PHP binary: "C:\php\bin"
58-
$bname = "php-$php_version$ts_part-Win32-$env:VC-$env:ARCH.zip"
58+
$bname = "php-$php_version$ts_part-Win32-$env:VS-$env:ARCH.zip"
5959
if (-not (Test-Path "C:\php\$bname")) {
6060
try {
6161
echo "Download: https://windows.php.net/downloads/releases/$bname"
@@ -71,7 +71,7 @@ if (-not (Test-Path "C:\php\bin")) {
7171

7272
# library dependency: "C:\php\deps"
7373
if ("$env:DEP" -ne "") {
74-
$bname = "$env:DEP-$env:VC-$env:ARCH.zip"
74+
$bname = "$env:DEP-$env:VS-$env:ARCH.zip"
7575
if (-not (Test-Path "C:\php\$bname")) {
7676
echo "Download: https://windows.php.net/downloads/pecl/deps/$bname"
7777
Invoke-WebRequest "https://windows.php.net/downloads/pecl/deps/$bname" -OutFile "C:\php\$bname"
@@ -88,7 +88,7 @@ if (('' -ne $env:PECL_APCU) -and ('8.2' -ne $env:PHP_VER) -and ('8.3' -ne $env:P
8888
$ts_part = 'nts'
8989
}
9090

91-
$bname = "php_apcu-$apcu_version-$env:PHP_VER-$ts_part-$env:VC-$env:ARCH.zip"
91+
$bname = "php_apcu-$apcu_version-$env:PHP_VER-$ts_part-$env:VS-$env:ARCH.zip"
9292

9393
echo "Download: https://windows.php.net/downloads/pecl/releases/apcu/$apcu_version/$bname"
9494
Invoke-WebRequest "https://windows.php.net/downloads/pecl/releases/apcu/$apcu_version/$bname" -OutFile "C:\php\$bname"

.github/workflows/windows.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push]
44

55
env:
66
PHP_EXT: zstd
7-
BIN_SDK_VER: 2.2.0
7+
BIN_SDK_VER: 2.3.0
88

99
jobs:
1010
ci:
@@ -21,7 +21,7 @@ jobs:
2121
ts:
2222
- 'nts'
2323
- 'ts'
24-
vc:
24+
vs:
2525
- vs16
2626
- vs17
2727
library:
@@ -32,20 +32,23 @@ jobs:
3232
- 'apcu'
3333
exclude:
3434
- php: '8.4'
35-
vc: vs16
35+
vs: vs16
36+
- php: '8.4'
37+
vs: vs17
38+
apcu: 'apcu' # Doesn't exist
3639
- php: '8.3'
37-
vc: vs17
40+
vs: vs17
3841
- php: '8.2'
39-
vc: vs17
42+
vs: vs17
4043
- php: '8.1'
41-
vc: vs17
44+
vs: vs17
4245

43-
runs-on: windows-2019
46+
runs-on: ${{ matrix.vs == 'vs17' && 'windows-2022' || 'windows-2019' }}
4447

4548
env:
4649
PHP_VER: ${{ matrix.php }}
4750
PECL_APCU: ${{ matrix.apcu }}
48-
VC: ${{ matrix.vc }}
51+
VS: ${{ matrix.vs }}
4952
ARCH: ${{ matrix.arch }}
5053
TS: ${{ matrix.ts }}
5154

@@ -62,7 +65,7 @@ jobs:
6265
run: .\.github\workflows\vcpkg.ps1
6366
env:
6467
VCPKG_LIBRARY: zstd
65-
if: ${{ matrix.library && matrix.vc == 'vs16' }}
68+
if: ${{ matrix.library }}
6669

6770
- name: Install build command
6871
run: .\.github\workflows\install.ps1
@@ -79,7 +82,7 @@ jobs:
7982
- name: Store artifact DLL
8083
uses: actions/upload-artifact@v4
8184
with:
82-
name: php_${{ env.PHP_EXT }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vc }}-${{ matrix.arch }}
85+
name: php_${{ env.PHP_EXT }}-${{ matrix.php }}-${{ matrix.ts }}-${{ matrix.vs }}-${{ matrix.arch }}
8386
path: .\php_${{ env.PHP_EXT }}.dll
8487
overwrite: true
8588
if: ${{ ! matrix.library && matrix.apcu == '' }}

0 commit comments

Comments
 (0)