mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-04 17:17:23 +08:00
Merge branch 'master' of https://github.com/nikita-bykov/virtual-environments into pipx-windows
This commit is contained in:
@@ -128,11 +128,7 @@ if (Test-IsWin19) {
|
||||
}
|
||||
|
||||
# Expand disk size of OS drive
|
||||
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
|
||||
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
|
||||
|
||||
$expandResult = (diskpart /s 'd:\cmds.txt')
|
||||
Write-Host $expandResult
|
||||
|
||||
Write-Host "Disk sizes after expansion"
|
||||
wmic logicaldisk get size,freespace,caption
|
||||
$driveLetter = "C"
|
||||
$size = Get-PartitionSupportedSize -DriveLetter $driveLetter
|
||||
Resize-Partition -DriveLetter $driveLetter -Size $size.SizeMax
|
||||
Get-Volume | Select-Object DriveLetter, SizeRemaining, Size | Sort-Object DriveLetter
|
||||
@@ -3,10 +3,6 @@
|
||||
## Desc: Install Visual Studio
|
||||
################################################################################
|
||||
|
||||
# Temporary replace ip for download server to the one with the correct files and backup hosts file
|
||||
Copy-Item -Path "$env:windir\System32\drivers\etc\hosts" -Destination "C:\hosts_backup" -Verbose
|
||||
"68.232.34.200 download.visualstudio.microsoft.com" > "$env:windir\System32\drivers\etc\hosts"
|
||||
|
||||
$toolset = Get-ToolsetContent
|
||||
$requiredComponents = $toolset.visualStudio.workloads | ForEach-Object { "--add $_" }
|
||||
$workLoads = @(
|
||||
@@ -51,6 +47,4 @@ if (Test-IsWin19) {
|
||||
Install-Binary -Url $sdkUrl -Name $sdkFileName -ArgumentList $argumentList
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "VisualStudio"
|
||||
# Restore hosts file after VS installation
|
||||
Move-Item -Path "C:\hosts_backup" -Destination "$env:windir\System32\drivers\etc\hosts" -Force -Verbose
|
||||
Invoke-PesterTests -TestFile "VisualStudio"
|
||||
Reference in New Issue
Block a user