forked from linq2db/linq2db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
123 lines (105 loc) · 3.29 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
configuration: Release
environment:
packageVersion: 1.8.0
matrix:
- buildConfiguration: dotNet
solutionName: linq2db.4.5.sln
- buildConfiguration: dotNetCore
solutionName: linq2db.core.sln
version: $(packageVersion).{build}
cache:
- packages -> **\packages.config
services:
- mssql2012sp1
- mysql
- postgresql
init:
- cmd: git config --global core.autocrlf true
- ps: $env:buildVersion = "$env:packageVersion.$env:appveyor_build_number"
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -eq "release")
{
$env:nugetVersion = "$env:packageVersion"
}
else
{
$env:nugetVersion = "$env:packageVersion-rc$env:appveyor_build_number"
}
- ps: Update-AppveyorBuild -Version $env:buildVersion
assembly_info:
patch: false
file: '**\AssemblyInfo.*'
assembly_version: '$(buildVersion)'
assembly_file_version: '$(buildVersion)'
assembly_informational_version: '$(nugetVersion)'
nuget:
account_feed: false
project_feed: false
before_build:
- cmd: nuget restore linq2db.4.5.sln
- cmd: dotnet restore
- cmd: 7z e Data\northwind.sql.zip
- cmd: sqlcmd -U sa -P Password12! -S localhost\SQL2012SP1 -i "northwind.sql" > nul
build_script:
- msbuild %solutionName% /property:Configuration=Release
after_build:
- ps: |
if ($env:buildConfiguration -eq "dotNetCore")
{
if ($env:APPVEYOR_REPO_BRANCH -eq "release")
{
dotnet pack --no-build Source/project.json -c=Release
}
else
{
dotnet pack --no-build Source/project.json --version-suffix="rc$env:APPVEYOR_BUILD_NUMBER" -c=Release
}
}
else
{
cd Source
.\Compile.bat
cd ..
nuget pack Nuget\linq2db.nuspec -version "$env:nugetVersion"
}
artifacts:
- path: \**\linq2db*.nupkg
test_script:
- ps: |
if ($env:buildConfiguration -eq "dotNetCore")
{
dotnet test tests\linq -c Release -f netcoreapp1.0 --where "cat != FreeText"
$test1res = $LASTEXITCODE
# upload results to AppVeyor
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResult.xml))
Push-AppveyorArtifact (Resolve-Path .\TestResult.xml)
# try nunit3
# nunit3-console.exe (Resolve-Path Tests\Linq\bin\Release\net40\win7-x64\linq2db.Tests.dll) --x86
# nunit3-console.exe (Resolve-Path Tests\Linq\bin\Release\net45\win7-x64\linq2db.Tests.dll) --x86
IF ($test1res -ne 0) { exit -1 }
}
else
{
nunit3-console .\Tests\Linq\bin\Release\linq2db.Tests.dll --result="TestResult.xml;format=AppVeyor" --x86 --where "cat != FreeText"
}
before_test:
- ps: |
Push-Location -Path Tests\Linq\bin\$env:CONFIGURATION
cd $env:appveyor_build_folder
. ".\Av-InitDatabases.ps1"
after_test:
- ps: Pop-Location
deploy:
- provider: NuGet
server: https://www.myget.org/F/linq2db/api/v2
api_key:
secure: LDw0jeA1Yo3R4/TKv2kmlgJR8dTT6Wun2MONq3uDvtVQJG4LOU9LjvVTAc7IgRfm
skip_symbols: true
on:
branch: master
- provider: NuGet
api_key:
secure: oTYw2IwTnz4qMD8c/MR/6mo+Nx3wa5Pp8MYfsKBCKCVuU6QCHlj+6QMXpnQses8G
on:
branch: release