From 3a02842ecbef48aa34717fda0c4d726050d984fe Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 12 Aug 2016 12:14:48 -0700 Subject: [PATCH 1/3] Made core build use release configuration --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6caea8428..24dc2206e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,7 @@ build_script: $result.Warnings throw "Tags must be CI, Feature, Scenario, or Slow" } - Start-PSBuild -CrossGen + Start-PSBuild -CrossGen -Configuration Release Start-PSBuild -FullCLR test_script: @@ -82,7 +82,9 @@ on_finish: $zipFilePath = Join-Path $pwd "$name.zip" $zipFileFullPath = Join-Path $pwd "$name.FullCLR.zip" Add-Type -assemblyname System.IO.Compression.FileSystem + Write-Verbose "Zipping ${env:CoreOutput} into $zipFilePath" -verbose [System.IO.Compression.ZipFile]::CreateFromDirectory($env:CoreOutput, $zipFilePath) + Write-Verbose "Zipping ${env:FullOutput} into $zipFileFullPath" -verbose [System.IO.Compression.ZipFile]::CreateFromDirectory($env:FullOutput, $zipFileFullPath) $artifacts = New-Object System.Collections.ArrayList From 4ba6153c2ab672d111dec63ada12460b92aba549 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 12 Aug 2016 12:26:05 -0700 Subject: [PATCH 2/3] Update additional places build configuration needs to be specified --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 24dc2206e..1c5185a60 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,7 @@ install: - ps: Set-Content c:\users\appveyor\.ssh\id_rsa $fileContent - git config --global url.git@github.com:.insteadOf https://github.com/ - git submodule update --init + - ps: $buildConfiguration = 'Release' - ps: Import-Module .\build.psm1; Start-PSBootstrap -Force build_script: @@ -28,7 +29,7 @@ build_script: $result.Warnings throw "Tags must be CI, Feature, Scenario, or Slow" } - Start-PSBuild -CrossGen -Configuration Release + Start-PSBuild -CrossGen -Configuration $buildConfiguration Start-PSBuild -FullCLR test_script: @@ -37,7 +38,7 @@ test_script: $ErrorActionPreference = 'Stop' # # CoreCLR - $env:CoreOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish)) + $env:CoreOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish -Configuration $buildConfiguratio)) Write-Host -Foreground Green 'Run CoreCLR tests' $testResultsFile = "$pwd\TestsResults.xml" & ("$env:CoreOutput\powershell.exe") -noprofile -noninteractive -c "Set-ExecutionPolicy -Scope Process Unrestricted; Invoke-Pester test/powershell -Tag 'CI' -ExcludeTag 'Slow' -OutputFormat NUnitXml -OutputFile $testResultsFile" From 8233b5e332f62a3020823a0590033f640df0ff63 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 12 Aug 2016 12:35:46 -0700 Subject: [PATCH 3/3] Fix typo when getting Core build output location Fail build if we fail to build PowerShell.exe before running tests Fail build if we fail to push an artifact because it doesn't exist. --- appveyor.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1c5185a60..4c211c2b1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,9 +38,13 @@ test_script: $ErrorActionPreference = 'Stop' # # CoreCLR - $env:CoreOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish -Configuration $buildConfiguratio)) + $env:CoreOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Publish -Configuration $buildConfiguration)) Write-Host -Foreground Green 'Run CoreCLR tests' $testResultsFile = "$pwd\TestsResults.xml" + if(!(Test-Path "$env:CoreOutput\powershell.exe")) + { + throw "CoreCL PowerShell.exe was not built" + } & ("$env:CoreOutput\powershell.exe") -noprofile -noninteractive -c "Set-ExecutionPolicy -Scope Process Unrestricted; Invoke-Pester test/powershell -Tag 'CI' -ExcludeTag 'Slow' -OutputFormat NUnitXml -OutputFile $testResultsFile" (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) @@ -111,10 +115,23 @@ on_finish: $artifacts += (ls .\nuget-artifacts | % {$_.FullName}) + $pushedAllArtifacts = $true $artifacts | % { Write-Host "Pushing $_ as Appveyor artifact" - Push-AppveyorArtifact $_ + if(Test-Path $_) + { + Push-AppveyorArtifact $_ + } + else + { + $pushedAllArtifacts = $false + Write-Warning "Artifact $_ does not exist." + } } + if(!$pushedAllArtifacts) + { + throw "Some artifacts did not exist!" + } } catch { Write-Host -Foreground Red $_ }