forked from microsoft/vs-boost-unit-test-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
50 lines (50 loc) · 2.12 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# AppVeyor version is just a placeholder. Version is retrieved from version.txt and is automatically updated on build.
version: '0.0.0.0.{build}'
image:
- Visual Studio 2017
clone_depth: 5
install:
# Install NuGet package dependencies for proper compilation
- cmd: |
nuget install
nuget restore BoostTestAdapter.sln
cache:
# Retain NuGet packages unless configuration is updated to possibly minimize subsequent build times
- NuGetPackages -> NuGet.config, packages.config
configuration:
- Debug
- Release
before_build:
# Updates the version number in the respective files and updates the AppVeyor build number to match
- ps: |
$version = Get-Content version.txt -Raw
.\SetVersion.ps1 $version
Update-AppveyorBuild -Version "$version.$env:APPVEYOR_BUILD_NUMBER"
build:
parallel: true
project: BoostTestAdapter.sln
verbosity: minimal
test:
assemblies:
- out\binaries\$(configuration)\BoostTestAdapterNunit\BoostTestAdapterNunit.dll
artifacts:
- path: out\binaries\$(configuration)\BoostTestPlugin\BoostUnitTestAdapter.vsix
name: Test Adapter for Boost.Test VSIX Installer
on_failure:
- cmd: mkdir C:\logs
# Retain all environment variables which are currently specified
- cmd: SET > C:\logs\env-vars.log
# Reference: http://www.appveyor.com/docs/installed-software
# Retain the list of installed software available on the build machine
- ps: |
$x64items = @(Get-ChildItem "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
$x64items + @(Get-ChildItem "HKLM:SOFTWARE\wow6432node\Microsoft\Windows\CurrentVersion\Uninstall") `
| ForEach-object { Get-ItemProperty Microsoft.PowerShell.Core\Registry::$_ } `
| Sort-Object -Property DisplayName `
| Select-Object -Property DisplayName,DisplayVersion > C:\logs\installed-software.log
# Zip the logs folder
- ps: |
Add-Type -Assembly System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::CreateFromDirectory("C:\logs", "C:\logs.zip", [System.IO.Compression.CompressionLevel]::Optimal, $false)
# Post the zipped logs as an artifact for later inspection
- ps: Push-AppveyorArtifact "C:\logs.zip"