@@ -31,8 +31,9 @@ Vagrant.configure("2") do |config|
31
31
vb . customize [ 'modifyvm' , :id , '--vram' , '128' ]
32
32
end
33
33
config . vm . provider "hyperv" do |h |
34
- h . memory = 4096
35
- h . cpus = 2
34
+ h . memory = ENV [ 'VM_MEMORY' ] ? ENV [ 'VM_MEMORY' ] . to_i : 4096
35
+ h . maxmemory = nil
36
+ h . cpus = ENV [ 'VM_CPU' ] ? ENV [ 'VM_CPU' ] . to_i : 2
36
37
h . linked_clone = true
37
38
h . enable_checkpoints = false
38
39
end
@@ -45,18 +46,18 @@ Vagrant.configure("2") do |config|
45
46
iex (irm https://community.chocolatey.org/install.ps1)
46
47
47
48
Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) We are going to install some prerequisites now. This could take some time"
48
- $null = choco install git pester visualstudio2022community visualstudio2022-workload-manageddesktop netfx-4.8-devpack -y
49
+ choco install git pester visualstudio2022community visualstudio2022-workload-manageddesktop netfx-4.8-devpack -y --no-progress
49
50
Import-Module $env:ChocolateyInstall/helpers/chocolateyProfile.psm1
50
51
Update-SessionEnvironment
51
52
Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Done installing software, now copying files"
52
53
# If you try to build on macOS, then run this, there are attributes on some files that cause the build to fail inside of the vagrant environment.
53
- $null = robocopy c:/chocoRoot c:/ code/ choco /e /copy:dt
54
+ xcopy c: \\ chocoroot \\ * c:\\ code\\ choco /s /f /exclude:c: \\ chocoroot \\ .xcopyignore /i /y /h
54
55
SHELL
55
56
config . vm . provision "shell" , name : "build" , inline : <<-SHELL
56
- $null = robocopy c:/chocoRoot c:/ code/ choco /e /copy:dt /purge
57
+ xcopy c: \\ chocoroot \\ * c:\\ code\\ choco /s /f /exclude:c: \\ chocoroot \\ .xcopyignore /i /y /h
57
58
Push-Location c:/code/choco
58
59
Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Files have been copied, beginning build process."
59
- $CakeOutput = ./build.bat --verbosity=diagnostic --target=CI --testExecutionType=none --shouldRunalyze=false --shouldRunNuGet=false 2>&1
60
+ ./build.bat --verbosity=diagnostic --target=CI --testExecutionType=none --shouldRunalyze=false --shouldRunNuGet=false 2>&1 | Tee-Object CakeOutput
60
61
61
62
if ($LastExitCode -ne 0) {
62
63
Set-Content c:/vagrant/buildOutput.log -Value $CakeOutput
@@ -72,10 +73,10 @@ Vagrant.configure("2") do |config|
72
73
Remove-Item "$env:TEMP/chocolateyTests/all-packages" -Recurse -Force -ErrorAction SilentlyContinue
73
74
SHELL
74
75
config . vm . provision "shell" , name : "test" , inline : <<-SHELL
75
- # Copy changed files.
76
- $null = robocopy c:/chocoRoot c:/code/choco /e /copy:dt
76
+ xcopy c:\\ chocoroot\\ * c:\\ code\\ choco /s /f /exclude:c:\\ chocoroot\\ .xcopyignore /i /y /h
77
77
# Purge any tests files that have been removed.
78
- $null = robocopy c:/chocoRoot/tests c:/code/choco/tests /e /copy:dt /purge
78
+ rm -re -fo c:\\ code\\ choco\\ tests
79
+ xcopy c:\\ chocoroot\\ tests\\ * c:\\ code\\ choco\\ tests /s /f /exclude:c:\\ chocoroot\\ .xcopyignore /i /y /h
79
80
Write-Host "($(Get-Date -Format "dddd MM/dd/yyyy HH:mm:ss K")) Starting Test Execution"
80
81
Push-Location c:/code/choco
81
82
# $env:TEST_KITCHEN = 1
0 commit comments