forked from stratisproject/StratisBitcoinFullNode
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathappveyor_city.yml
130 lines (97 loc) · 3.98 KB
/
appveyor_city.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
# reference: https://www.appveyor.com/docs/appveyor-yml/
# you can use {branch} name in version format too
# version: 1.0.{build}-{branch}
version: 1.4.0.{build}
pull_requests:
do_not_increment_build_number: false
skip_tags: true
# branches to build
branches:
# whitelist
only:
- master
#---------------------------------#
# environment configuration #
#---------------------------------#
environment:
github_access_token:
secure: 5jC9tX1KFkTKayJB2ifWK1hru/gDPcEn/pyws8824r8GVVrV9sriQ3xJ1BG5dYRN
github_email:
secure: G83oRB/p3ii9we5e5CI7eZV17+GMbAJL2wbZ3pZGpTk=
image: Visual Studio 2017
clone_depth: 1
clone_folder: c:\projects\fullnode
install:
- cinst docfx
configuration:
- Debug
#- Release
# build cache to preserve files/folders between builds
cache:
- '%USERPROFILE%\.nuget\packages'
init:
- ps: dotnet --info
build: off
#---------------------------------#
# build configuration #
#---------------------------------#
# build_script:
# - ps: |
# cd src
# Write-Host "[$env:configuration] STARTED dotnet build" -foregroundcolor "magenta"
# dotnet build -c $env:configuration -v m
# Write-Host "[$env:configuration] FINISHED dotnet build" -foregroundcolor "magenta"
# if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# scripts to run after build
# after_build:
# - ps: |
# if($env:configuration -eq 'Release')
# {
# Write-Host "[$env:configuration] STARTED dotnet pack" -foregroundcolor "magenta"
# cd Stratis.Bitcoin
# dotnet pack -c $env:configuration -v m --no-build -o $env:APPVEYOR_BUILD_FOLDER\nuget\
# cd ../Stratis.Bitcoin.Api
# dotnet pack -c $env:configuration -v m --no-build -o $env:APPVEYOR_BUILD_FOLDER\nuget\
# cd ../Stratis.Bitcoin.Features.LightWallet
# dotnet pack -c $env:configuration -v m --no-build -o $env:APPVEYOR_BUILD_FOLDER\nuget\
# Write-Host "[$env:configuration] FINISHED dotnet pack" -foregroundcolor "magenta"
# }
# if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# test_script:
# - ps: |
# Write-Host "[$env:configuration] STARTED dotnet test" -foregroundcolor "magenta"
# cd $env:APPVEYOR_BUILD_FOLDER/src
# $anyFailures = $FALSE;
# foreach ($testFolder in ls *.Tests) {
# # exclude integration tests
# if ($testFolder -like '*Integration.Tests*' -Or $testFolder -like '*IntegrationTests*' -Or $testFolder -like '*NBitcoin.Tests*') { continue }
# Push-Location $testFolder
# Write-Host "[$env:configuration] Running tests in $testFolder" -foregroundcolor "magenta"
# dotnet test -c $env:configuration --no-build
# if ($LastExitCode -ne 0) {
# $anyFailures = $TRUE
# Add-AppveyorMessage -Message "Some tests failed in $testFolder."
# }
# Pop-Location
# }
# Write-Host "[$env:configuration] FINISHED dotnet test" -foregroundcolor "magenta"
# if ($anyFailures -eq $TRUE) { $host.SetShouldExit(1) }
#---------------------------------#
# artifacts configuration #
#---------------------------------#
# pushing all files in build directory recursively
#artifacts:
#- path: nuget\*.nupkg
# name: nuget packages
deploy_script:
- git config --global credential.helper store
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:github_access_token):x-oauth-basic@github.com`n"
- git config --global user.email %github_email%
- git config --global user.name "sondreb"
- bash releaseDocs.sh
on_success:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/k3rn31p4nic/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 success $env:WEBHOOK_URL
on_failure:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/k3rn31p4nic/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL