forked from microsoft/bond
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
108 lines (64 loc) · 3.6 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
99
100
101
102
103
104
105
106
107
108
version: 1.0.{build}
branches:
only:
- master
- fsharp
clone_depth: 15
install:
- cmd: git submodule update --init
- ps: >-
if ($env:APPVEYOR_REPO_BRANCH -ne "fsharp") {
echo "Downloading Boost 1.57 ..."
Start-FileDownload "http://softlayer-dal.dl.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.zip"
echo "Extracting Boost..."
$shell = New-Object -ComObject Shell.Application
$item = $shell.NameSpace("${env:APPVEYOR_BUILD_FOLDER}\boost_1_57_0.zip\boost_1_57_0\boost")
$shell.NameSpace("${env:APPVEYOR_BUILD_FOLDER}").CopyHere($item)
choco install haskellplatform -version 2014.2.0.0
# Haskell Platfrom package doesn't update PATH for the current shell instance
$env:Path += ";${env:ProgramFiles}\Haskell Platform\2014.2.0.0\bin"
$env:Path += ";${env:ProgramFiles}\Haskell Platform\2014.2.0.0\lib\extralibs\bin"
$env:Path += ";${env:ProgramFiles}\Haskell Platform\2014.2.0.0\mingw\bin"
cabal update
}
# Majority of build time is spent installing dependencies and then building
# cabal and the sandbox. Using build matrix support we would have to do this
# for every configuration. Instead we manually build the configurations we want
# to test. This way all the Haskell prerequisites are resued.
build_script:
- ps: >-
if ($env:APPVEYOR_REPO_BRANCH -ne "fsharp") {
nuget restore cs\cs.sln
# default codegen with properties
msbuild cs\cs.sln /verbosity:minimal /p:Configuration=Debug /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
if (-not $?) { throw "build failed" }
# codegen with public fields
msbuild cs\cs.sln /verbosity:minimal /p:Configuration=Fields /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
if (-not $?) { throw "build failed" }
# codegen with interfaces used to represent collections
msbuild cs\cs.sln /verbosity:minimal /p:Configuration=CollectionInterfaces /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
if (-not $?) { throw "build failed" }
$env:BOOST_ROOT = "${env:APPVEYOR_BUILD_FOLDER}"
mkdir build
cd build
cmake ..
$env:PreferredToolArchitecture = "x64"
# Building Release configuration to prevent assert message boxes
msbuild bond.sln /verbosity:minimal /p:Configuration=Release /p:Optimization=Disabled /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
if (-not $?) { throw "build failed" }
cd ..
} else {
nuget restore fsharp\fsharp.sln
msbuild fsharp\fsharp.sln /verbosity:minimal /p:Configuration=Debug /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
}
test_script:
- ps: >-
$ErrorActionPreference = "Stop"
if ($env:APPVEYOR_REPO_BRANCH -ne "fsharp") {
vstest.console /logger:Appveyor cs\test\core\bin\debug\net40\Properties\Bond.UnitTest.dll cs\test\core\bin\debug\net45\Properties\Bond.UnitTest.dll cs\test\core\bin\debug\net40\Fields\Bond.UnitTest.dll cs\test\core\bin\debug\net45\Fields\Bond.UnitTest.dll cs\test\core\bin\debug\net40\CollectionInterfaces\Bond.UnitTest.dll cs\test\core\bin\debug\net45\CollectionInterfaces\Bond.UnitTest.dll cs\test\internal\bin\debug\net40\Bond.InternalTest.dll cs\test\internal\bin\debug\net45\Bond.InternalTest.dll
cd build
ctest -C Release --output-on-failure
cd ..
} else {
vstest.console /logger:Appveyor fsharp\test\TypeProvider\bin\Debug\BondFsharpUnitTest.dll
}