forked from linq2db/linq2db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
145 lines (122 loc) · 3.91 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
image: Visual Studio 2017
configuration: Release
skip_tags: true
branches:
only:
- master
- /version.*/
- /release.*/
- /dev.*/
environment:
assemblyVersion: 2.7.0
packageVersion: 2.7.0
docfxuser: "ili"
docfxmail: "[email protected]"
docfxsecret:
secure: IlfmHXRdUK6v8dX/WqieXQ==
## testfilter: TestCategory != FreeText & TestCategory != Ignored & TestCategory != Explicit
## #testFilter: TestCategory=Create
## testRunner: dotnet
## testLogger: trx
## testConfiguration: AppVeyor
## matrix:
## - target: Default
## testTargetFramework: net46
## - target: Core1
## testTargetFramework: netcoreapp1.0
## testRunner: dotnet
## testFilter: TestCategory != Ignored
## - target: Core2
## testTargetFramework: netcoreapp2.0
## testRunner: dotnet
## testFilter: TestCategory != Ignored
## - target: DocFx
cache:
- packages -> appveyor.yml
version: $(assemblyVersion).{build}
services:
- mssql2014
- mysql
- postgresql95
init:
- cmd: git config --global core.autocrlf true
- ps: $env:buildVersion = "$env:assemblyVersion.$env:appveyor_build_number"
nuget:
account_feed: false
project_feed: false
build_script:
- cmd: msbuild linq2db.sln /p:Configuration=AppVeyor /t:Restore;Build /v:m
##- ps: .\build.ps1
before_build:
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -ne "release")
{
$env:packageVersion = "$env:assemblyVersion-rc$env:appveyor_build_number"
}
.\Build\AppVeyor.FixVersionProps.ps1 -path Build\linq2db.Default.props -buildVersion $env:assemblyVersion -nugetVersion $env:packageVersion
.\Build\AppVeyor.FixVersionNugets.ps1 -path NuGet\*.nuspec -nugetVersion $env:packageVersion $env:APPVEYOR_REPO_BRANCH
$startPath = "$($env:appveyor_build_folder)\Data"
$sqlInstance = "(local)\SQL2014"
$dbName = "TestData"
# create database
sqlcmd -S "$sqlInstance" -Q "Use [master]; CREATE DATABASE [$dbName]"
# MySql
$env:MYSQL_PWD="Password12!"
$cmd = '"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql" -e "create database $dbName;" --user=root'
iex "& $cmd"
# PgSql
$env:PGUSER="postgres"
$env:PGPASSWORD="Password12!"
$cmd = '"C:\Program Files\PostgreSQL\9.5\bin\createdb" $dbName'
iex "& $cmd"
# Access ACE provider
#(New-Object Net.WebClient).DownloadFile("https://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine.exe", "$env:appveyor_build_folder\AccessDatabaseEngine.exe")
#.\AccessDatabaseEngine.exe /quiet
# docfx build & deploy
if ($env:docfxsecret)
{
$gitDeploy = $env:APPVEYOR_REPO_BRANCH -eq "master"
.\Build\AppVeyor.DocFx.ps1 $env:docfxuser $env:docfxsecret $env:docfxmail $gitDeploy
}
else
{
Write-Host docfx build skipped... cosmic rays?...
}
- ps: Update-AppveyorBuild -Version $env:buildVersion
- cmd: sqlcmd -U sa -P Password12! -S localhost\SQL2014 -i "Data\Create Scripts\Northwind.sql" > nul
after_build:
- cmd: |
cd NuGet
PackAV
cd ..
test_script:
- ps: |
if ($env:APPVEYOR_REPO_BRANCH -ne "release")
{
.\Build\AppVeyor.NUnit.Tests.ps1
}
artifacts:
- path: \**\linq2db*.nupkg
- path: \**\*.trx
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: Fr5riCMWr4uddudXmemI0L40G6iJhCGYQmt/Y/ky+EbvxMl9/nqwb6L3Y8P8lgrX
on:
branch: release
- provider: NuGet
server: https://www.myget.org/F/linq2db/api/v2
api_key:
secure: LDw0jeA1Yo3R4/TKv2kmlgJR8dTT6Wun2MONq3uDvtVQJG4LOU9LjvVTAc7IgRfm
skip_symbols: true
on:
branch: release1
skip_commits:
message: /ci skip/ # Regex for matching commit message