Skip to content

Commit

Permalink
Add caching for Windows redistributables
Browse files Browse the repository at this point in the history
  • Loading branch information
tuokri committed Nov 16, 2023
1 parent a2b979b commit 8b29715
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 11 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/udk-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ jobs:

- run: py --version

- name: Cache Windows redistributables
uses: actions/cache@v3
id: cache-win-redist
with:
path: |
C:\Temp\VcRedist
C:\Temp\*.exe
key: win-cached-redist
restore-keys: win-cached-redist

- name: Install VC Redist 2012
run: .\tests\UDKTests\install_vcredist.ps1
if: matrix.os != 'self-hosted'
Expand Down
30 changes: 22 additions & 8 deletions tests/UDKTests/install_dx_redist.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,36 @@ $ErrorView = 'NormalView'

$DX_WEB_SETUP = "C:\Temp\dxwebsetup.exe"

Write-Output "Downloading $DX_WEB_SETUP"
Invoke-WebRequest `
-Uri https://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe `
-OutFile $DX_WEB_SETUP
Write-Output "Done"
if (Test-Path $DX_WEB_SETUP)
{
Write-Output "'$DX_WEB_SETUP' exists"
}
else
{
Write-Output "Downloading $DX_WEB_SETUP"
Invoke-WebRequest `
-Uri https://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe `
-OutFile $DX_WEB_SETUP
Write-Output "Done"
}

$DxWebSetupTemp = "C:\Temp\dx_websetup_temp\"
Start-Process -NoNewWindow -FilePath $DX_WEB_SETUP -ArgumentList "/Q", "/T:$DxWebSetupTemp"

$DX_REDIST_EXE = "C:\Temp\dx_redist.exe"

Write-Output "Downloading $DX_REDIST_EXE"
Invoke-WebRequest `
if (Test-Path $DX_REDIST_EXE)
{
Write-Output "'$DX_REDIST_EXE' exists"
}
else
{
Write-Output "Downloading $DX_REDIST_EXE"
Invoke-WebRequest `
-Uri https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe `
-OutFile $DX_REDIST_EXE
Write-Output "Done"
Write-Output "Done"
}

$DxRedistTemp = "C:\Temp\dx_redist_temp\"
Write-Output "Running $DX_REDIST_EXE"
Expand Down
13 changes: 10 additions & 3 deletions tests/UDKTests/install_dx_sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@ $ErrorView = 'NormalView'

$DX_SDK_EXE = "C:\Temp\dx_sdk.exe"

Write-Output "Downloading $DX_SDK_EXE"
Invoke-WebRequest `
if (Test-Path $DX_SDK_EXE)
{
Write-Output "'$DX_SDK_EXE' exists"
}
else
{
Write-Output "Downloading $DX_SDK_EXE"
Invoke-WebRequest `
-Uri https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe `
-OutFile $DX_SDK_EXE
Write-Output "Done"
Write-Output "Done"
}

Write-Output "Running $DX_SDK_EXE"
& $DX_SDK_EXE /U
Expand Down

0 comments on commit 8b29715

Please sign in to comment.