Skip to content

Commit

Permalink
reduce build matrix to accellerate CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWTruher committed Oct 19, 2018
1 parent 9a20e22 commit b3018ea
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ environment:
PSVersion: 5
BuildConfiguration: Release
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PowerShellEdition: PowerShellCore
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PowerShellEdition: WindowsPowerShell
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# PowerShellEdition: PowerShellCore
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# PowerShellEdition: WindowsPowerShell
- APPVEYOR_BUILD_WORKER_IMAGE: WMF 4
PowerShellEdition: WindowsPowerShell
PSVersion: 4
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
PowerShellEdition: PowerShellCore
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
# PowerShellEdition: PowerShellCore

# cache Nuget packages and dotnet CLI cache
cache:
Expand All @@ -19,16 +19,16 @@ cache:
install:
- ps: if ($env:PowerShellEdition -eq 'WindowsPowerShell') { Import-Module .\tools\appveyor.psm1; Invoke-AppveyorInstall }
- pwsh: if ($env:PowerShellEdition -eq 'PowerShellCore') { Import-Module .\tools\appveyor.psm1; Invoke-AppveyorInstall }
- ps: |
# Windows image still has version 6.0.0 of pwsh but 6.0.2 is required due to System.Management.Automation package https://github.com/appveyor/ci/issues/2230
if ($env:PowerShellEdition -eq 'PowerShellCore' -and $PSVersionTable.PSVersion -lt [version]'6.0.2' -and $IsWindows) {
$msiPath = "$env:TEMP\PowerShell-6.0.2-win-x64.msi"
(New-Object Net.WebClient).DownloadFile('https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/PowerShell-6.0.2-win-x64.msi', $msiPath)
Write-Verbose 'Installing pwsh 6.0.2' -Verbose
Start-Process 'msiexec.exe' -Wait -ArgumentList "/i $msiPath /quiet"
Remove-Item $msiPath
$env:Path = "$env:ProgramFiles\PowerShell\6.0.2;$env:Path"
}
# - ps: |
# # Windows image still has version 6.0.0 of pwsh but 6.0.2 is required due to System.Management.Automation package https://github.com/appveyor/ci/issues/2230
# if ($env:PowerShellEdition -eq 'PowerShellCore' -and $PSVersionTable.PSVersion -lt [version]'6.0.2' -and $IsWindows) {
# $msiPath = "$env:TEMP\PowerShell-6.0.2-win-x64.msi"
# (New-Object Net.WebClient).DownloadFile('https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/PowerShell-6.0.2-win-x64.msi', $msiPath)
# Write-Verbose 'Installing pwsh 6.0.2' -Verbose
# Start-Process 'msiexec.exe' -Wait -ArgumentList "/i $msiPath /quiet"
# Remove-Item $msiPath
# $env:Path = "$env:ProgramFiles\PowerShell\6.0.2;$env:Path"
# }

build_script:
- ps: |
Expand All @@ -40,23 +40,23 @@ build_script:
}
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion "$env:PSVersion" -Framework full
}
- pwsh: |
if ($env:PowerShellEdition -eq 'PowerShellCore') {
Set-Location $env:APPVEYOR_BUILD_FOLDER
./build.ps1 -Documentation
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion 5 -Framework core
}
# - pwsh: |
# if ($env:PowerShellEdition -eq 'PowerShellCore') {
# Set-Location $env:APPVEYOR_BUILD_FOLDER
# ./build.ps1 -Documentation
# ./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion 5 -Framework core
# }

test_script:
- ps: |
if ($env:PowerShellEdition -eq 'WindowsPowerShell') {
Invoke-AppveyorTest -CheckoutPath $env:APPVEYOR_BUILD_FOLDER
}
- pwsh: |
if ($env:PowerShellEdition -eq 'PowerShellCore') {
Import-Module .\tools\appveyor.psm1 # Appveyor does not persist pwsh sessions like it does for ps
Invoke-AppveyorTest -CheckoutPath $env:APPVEYOR_BUILD_FOLDER
}
# - pwsh: |
# if ($env:PowerShellEdition -eq 'PowerShellCore') {
# Import-Module .\tools\appveyor.psm1 # Appveyor does not persist pwsh sessions like it does for ps
# Invoke-AppveyorTest -CheckoutPath $env:APPVEYOR_BUILD_FOLDER
# }

# Upload the project along with test results as a zip archive
on_finish:
Expand Down

0 comments on commit b3018ea

Please sign in to comment.