Skip to content

Commit c8bf09b

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

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/install.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ if (-not (Test-Path "C:\php\$dname1")) {
1818
}
1919

2020
# PHP releases
21-
Invoke-WebRequest "https://windows.php.net/downloads/releases/releases.json" -OutFile "C:\php\releases.json"
21+
if (-not (Test-Path C:\php\releases.json)) {
22+
echo "Download: https://windows.php.net/downloads/releases/releases.json"
23+
Invoke-WebRequest "https://windows.php.net/downloads/releases/releases.json" -OutFile "C:\php\releases.json"
24+
}
2225
$php_version = (Get-Content -Path "C:\php\releases.json" | ConvertFrom-Json | ForEach-Object {
2326
if ($_."$env:PHP_VER") {
2427
return $_."$env:PHP_VER".version

.github/workflows/windows.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ jobs:
6767
VCPKG_LIBRARY: zstd
6868
if: ${{ matrix.library }}
6969

70+
- uses: actions/cache@v4
71+
with:
72+
path: |
73+
C:\php\php-*.zip
74+
key: ${{ runner.os }}-php
75+
7076
- name: Install build command
7177
run: .\.github\workflows\install.ps1
7278

0 commit comments

Comments
 (0)