forked from libbitcoin/libbitcoin-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
88 lines (80 loc) · 4.42 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
###############################################################################
# Copyright (c) 2014-2020 libbitcoin-system developers (see COPYING).
#
# GENERATED SOURCE CODE, DO NOT EDIT EXCEPT EXPERIMENTALLY
#
###############################################################################
version: 4.0.0.{build}-{branch}
image: Visual Studio 2013
clone_folder: c:\git\libbitcoin-system
skip_tags: true
environment:
matrix:
- configuration: StaticDebug
platform: x64
BOOST_UNIT_TEST_OPTIONS: "--run_test=* --show_progress=no --detect_memory_leak=0 --report_level=no --build_info=yes"
- configuration: StaticRelease
platform: x64
BOOST_UNIT_TEST_OPTIONS: "--run_test=* --show_progress=no --detect_memory_leak=0 --report_level=no --build_info=yes"
- configuration: StaticDebug
platform: Win32
BOOST_UNIT_TEST_OPTIONS: "--run_test=* --show_progress=no --detect_memory_leak=0 --report_level=no --build_info=yes"
- configuration: StaticRelease
platform: Win32
BOOST_UNIT_TEST_OPTIONS: "--run_test=* --show_progress=no --detect_memory_leak=0 --report_level=no --build_info=yes"
matrix:
fast_finish: true
init:
- git config --global core.autocrlf true
before_build:
- ps: >-
$BASE_KEY = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
$WOW_KEY = "HKLM:SOFTWARE\wow6432node\Microsoft\Windows\CurrentVersion\Uninstall";
$CTP_URL = "https://download.microsoft.com/download/3/C/2/3C271B79-6354-4B66-9014-C6CEBC14C5C4/vc_CompilerCTP.Nov2013.exe";
$CTP_FILENAME = "vc_CompilerCTP.Nov2013.exe";
$INSTALL_LOG_PATH = "c:\users\appveyor\install-log.txt";
function GetUninstallString($product_name) {
$x64_items = @(Get-ChildItem $BASE_KEY);
($x64_items + @(Get-ChildItem $WOW_KEY) `
| ForEach-Object { Get-ItemProperty Microsoft.PowerShell.Core\Registry::$_ } `
| Where-Object { $_.DisplayName -and $_.DisplayName.Contains($product_name) } `
| Select UninstallString).UninstallString
}
Write-Host "Uninstalling Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.21005..." -ForegroundColor Yellow;
"$(GetUninstallString "Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.21005") /quiet" | out-file "$env:TEMP\uninstall.cmd" -Encoding ASCII;
& $env:temp\uninstall.cmd;
Write-Host "Uninstalling Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501..." -ForegroundColor Yellow;
"$(GetUninstallString "Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501") /quiet" | out-file "$env:TEMP\uninstall.cmd" -Encoding ASCII;
& $env:temp\uninstall.cmd;
Write-Host "Uninstalling Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501..." -Foreground Yellow;
"$(GetUninstallString "Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501") /quiet" | out-file "$env:TEMP\uninstall.cmd" -Encoding ASCII;
& $env:temp\uninstall.cmd;
Write-Host "Downloading Visual C++ Compiler November 2013 CTP..." -ForegroundColor Yellow;
$CTP_INSTALLER_PATH = "$($env:TEMP)\$CTP_FILENAME";
(New-Object Net.WebClient).DownloadFile($CTP_URL, $CTP_INSTALLER_PATH);
Write-Host "Installing CTP Compiler..." -ForegroundColor Yellow;
cmd /c start /wait $CTP_INSTALLER_PATH /install /quiet /norestart /log $INSTALL_LOG_PATH;
Write-Host "CTP Compiler Installation Complete." -ForegroundColor Green;
build_script:
- c:\git\libbitcoin-system\build.cmd c:\git %PLATFORM% %CONFIGURATION% vs2013
- cd /d %APPVEYOR_BUILD_FOLDER%
test_script:
- ps: >-
Write-Host "Locating test executables..." -ForegroundColor Yellow;
$BC_TEST_EXES = @(Get-ChildItem -Path "$env:APPVEYOR_BUILD_FOLDER\bin" -recurse | Where-Object { $_.Name -eq "libbitcoin-system-test.exe" });
If ($BC_TEST_EXES.Count -ne 1) {
Write-Host "Failure, invalid count of test executables." -ForegroundColor Red;
exit 1;
}
Write-Host "Found single test executable: " $BC_TEST_EXES.FullName -ForegroundColor Green;
$BC_TEST_SINGLETON = $BC_TEST_EXES.FullName;
Write-Host "Executing $BC_TEST_SINGLETON $env:BOOST_UNIT_TEST_OPTIONS" -ForegroundColor Yellow;
try {
Invoke-Expression "$BC_TEST_SINGLETON $env:BOOST_UNIT_TEST_OPTIONS"
}
catch {
$ERR = $_;
Write-Host "Test execution failure: " $ERR -ForegroundColor Red;
exit $ERR;
}
Write-Host "Test execution complete." -ForegroundColor Green;