forked from erthink/libfpta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
98 lines (86 loc) · 3.49 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
89
90
91
92
93
94
95
96
97
98
version: 0.3.14.{build}
environment:
GTEST_SHUFFLE: 1
GTEST_RUNTIME_LIMIT: 99
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR: Visual Studio 16 2019
TOOLSET: 142
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15 2017
TOOLSET: 141
branches:
except:
- coverity_scan
configuration:
- Debug
# MSVC-2019 hangs during code generation/optimization due to its own internal errors.
# I have found out that the problem occurs because of the /Ob2 option (see https://github.com/erthink/libmdbx/issues/116).
# So the simplest workaround is to using RelWithDebiInfo configuration for testing (cmake will uses /Ob1 option), instead of Release.
# - Release
- RelWithDebInfo
platform:
- Win32
- x64
artifacts:
- path: '_build/Testing/Temporary/*'
name: test_results
before_build:
- git submodule sync
- git fetch --tags --prune --force
- git submodule update --init --recursive
- git submodule foreach --recursive git fetch --tags --prune --force
# - ps: choco install windbg
- cmake --version
build_script:
- ps: |
Write-Output "*******************************************************************************"
Write-Output "Configuration: $env:CONFIGURATION"
Write-Output "Platform: $env:PLATFORM"
Write-Output "Toolchain: $env:CMAKE_GENERATOR v$env:TOOLSET"
Write-Output "*******************************************************************************"
md _build -Force | Out-Null
cd _build
$generator = $env:CMAKE_GENERATOR
if ($env:TOOLSET -lt 142) {
if ($env:PLATFORM -eq "x64") {
$generator = "$generator Win64"
}
& cmake -G "$generator" -DCMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" ..
} else {
& cmake -G "$generator" -A $env:PLATFORM -DCMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" ..
}
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
Write-Output "*******************************************************************************"
& cmake --build . --config $env:CONFIGURATION
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
Write-Output "*******************************************************************************"
test_script:
- ps: |-
New-Item -Path "HKLM:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps' `
-Name DumpType -Value 2 -PropertyType DWORD -Force
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps' `
-Name DumpCount -Value 42 -PropertyType DWORD -Force
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps' `
-Name DumpFolder -Value "$($env:LOCALAPPDATA)\CrashDumps" -PropertyType STRING -Force
- ps: |
& ctest -C $env:CONFIGURATION --output-on-failure
if ($LastExitCode -ne 0) {
throw "Exec: $ErrorMessage"
}
& externals/libfptu/test/$env:CONFIGURATION/fptu_c_mode.exe
& test/$env:CONFIGURATION/fpta_c_mode.exe
# on_failure:
# - ps: |-
# $symPath = 'SRV*c:\symbols\*http://msdl.microsoft.com/download/symbols'
# $files = Get-ChildItem -Path "$($env:LOCALAPPDATA)\CrashDumps"
# ForEach ($file in $files) {
# Write-Output "Analyzing crash dump: $file"
# "C:\Program Files (x86)\Windows Kits\10\Debuggers\$($env:PLATFORM)\cdb.exe" `
# -y $symPath -z $file -c '!analyze -v; q'
# }