forked from linq2db/linq2db
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
123 lines (100 loc) · 3.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
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
image: Visual Studio 2017
configuration: Release
skip_tags: true
branches:
only:
- master
- /version.*/
- /release.*/
- /dev.*/
environment:
assemblyVersion: 2.9.2
packageVersion: 2.9.2
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
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
.\Build\AppVeyor.FixVersionNugets.ps1 -path NuGet\*.nuspec -nugetVersion $env:packageVersion $env:APPVEYOR_REPO_BRANCH
$env:MYSQL_PWD="Password12!"
$env:PGUSER="postgres"
$env:PGPASSWORD="Password12!"
$sqlPassword = "Password12!"
$sqlInstance = "localhost\SQL2014"
# create databases
$dbName = "TestDatanet45"
sqlcmd -U sa -P $sqlPassword -S "$sqlInstance" -Q "Use [master]; CREATE DATABASE [$dbName]"
$cmd = '"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql" -e "create database $dbName;" --user=root'
iex "& $cmd"
$cmd = '"C:\Program Files\PostgreSQL\9.5\bin\createdb" $dbName'
iex "& $cmd"
$dbName = "TestDatacore1"
sqlcmd -U sa -P $sqlPassword -S "$sqlInstance" -Q "Use [master]; CREATE DATABASE [$dbName]"
$cmd = '"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql" -e "create database $dbName;" --user=root'
iex "& $cmd"
$cmd = '"C:\Program Files\PostgreSQL\9.5\bin\createdb" $dbName'
iex "& $cmd"
$dbName = "TestDatacore2"
sqlcmd -U sa -P $sqlPassword -S "$sqlInstance" -Q "Use [master]; CREATE DATABASE [$dbName]"
$cmd = '"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql" -e "create database $dbName;" --user=root'
iex "& $cmd"
$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
- 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: \**\*_test_results.*
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: Kj9jdUr/iDoMahZT336+c2V/25VD8ES3UOTLKFcBpdkAjCY7Bd9pCAq26bz6LUBx
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