This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
113 lines (101 loc) · 4.21 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
platform:
- Win32
- x64
environment:
nuget_user:
secure: kWtlS49bKmP0IFXmdvDHmxGI8mS0xQGrwiJoco9nYtA=
nuget_password:
secure: Pzvx2CQjxp8eCBP+nFI2eg==
appveyor_rdp_password:
secure: Pzvx2CQjxp8eCBP+nFI2eg==
appveyor_api_token:
secure: fKs7X9cPwiL1ZKKR+hLHfNZlqlQQ4olhHFsZ0KFVp9E=
configuration:
- Debug
- Release
version: 3.14.0.{build}
init:
- cmd: echo Project - %APPVEYOR_PROJECT_NAME%
- cmd: echo Worker image - %APPVEYOR_BUILD_WORKER_IMAGE%
- cmd: echo Branch - %APPVEYOR_REPO_BRANCH%
- cmd: echo Author - %APPVEYOR_REPO_COMMIT_AUTHOR%
- cmd: echo Commit - %APPVEYOR_REPO_COMMIT%
- cmd: echo Platform - %PLATFORM%
- cmd: echo Configuration - %CONFIGURATION%
- cmd: set RAW_BUILD_VERSION=%APPVEYOR_BUILD_VERSION%
- cmd: IF NOT "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" (SET APPVEYOR_BUILD_VERSION=%APPVEYOR_BUILD_VERSION%-alpha) ELSE IF "%APPVEYOR_REPO_BRANCH%"=="develop" (SET APPVEYOR_BUILD_VERSION=%APPVEYOR_BUILD_VERSION%-beta) ELSE IF NOT "%APPVEYOR_REPO_BRANCH%"=="master" (SET APPVEYOR_BUILD_VERSION=%APPVEYOR_BUILD_VERSION%-alpha)
- cmd: echo Version - %APPVEYOR_BUILD_VERSION%
#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# Here comes automated git clone by AppVeyor
nuget:
account_feed: false
project_feed: false
install:
- ps: C:\projects\native-algorithms\scripts\restore_previous_artifacts.ps1
- cmd: C:\projects\native-algorithms\scripts\patch_nuspec.bat
- cmd: C:\projects\native-algorithms\scripts\restore_nugets.bat
# skip branch build if there is an active pull request
skip_branch_with_pr: true
build:
parallel: true
project: .\src\native-algorithms.sln
publish_nuget: true
publish_nuget_symbols: false
verbosity: minimal
after_build:
- cmd: rmdir /s /q C:\projects\native-algorithms\src\packages
- cmd: 7z a cached_artifacts.zip src\%PLATFORM%
- cmd: C:\projects\native-algorithms\scripts\pack_nuget.bat
test_script:
- cmd: C:\projects\native-algorithms\scripts\test_native_code.bat
artifacts:
- path: '**\*.nupkg'
name: NugetPackages-$(configuration)
- path: cached_artifacts.zip
name: cached_artifacts
deploy:
# push cached artifacts to GitHub releases
- provider: GitHub
release: native-algorithms-v$(appveyor_build_version)
auth_token:
secure: dQadz+smqtuxpigZ/LmrUKyA0uVZ5kgljKntyoHEdobTycbeMywbfmiJtZPNcOQ2
artifact: /.*\.zip/
draft: true
# push all NuGet-s to GitHub releases
# overwrites Debug NuGets with Release ones
- provider: GitHub
release: native-algorithms-v$(appveyor_build_version)
auth_token:
secure: dQadz+smqtuxpigZ/LmrUKyA0uVZ5kgljKntyoHEdobTycbeMywbfmiJtZPNcOQ2
artifact: /.*\.nupkg/
draft: true
# push all NuGet-s to our feed
- provider: NuGet
server: https://ci.appveyor.com/nuget/gmrukwa-xfn7vhwq20u6
api_key:
secure: t8FO9T5wMCmRVqjBKL+8u6wmF+EPGJ8NDgcZoH7hbk4=
skip_symbols: true
symbol_server: https://ci.appveyor.com/nuget/gmrukwa-xfn7vhwq20u6
artifact: /.*\.nupkg/
on:
platform: x64
configuration: Release
on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
notifications:
# this publishes to Continuous Integration channel in Glip
- provider: Webhook
url:
secure: V16hjhyXfcLNyhNUih9v1Lb4wDly5r6CNNufciMrvllwt0m0rkguf6o4DY7pbdKia/vJGmErvQLdEW0MkzqsAhLWiPY7+Z6qvzFjweP8xNg=
method: POST
content_type: application/json
body: >-
{
"icon": "https://www.appveyor.com/assets/img/appveyor-logo-256.png",
"activity": "AppVeyor for native-algorithms",
"title": "Build {{buildVersion}} **{{#failed}}failed{{/failed}}{{#passed}}passed{{/passed}}** in {{duration}}",
"body": "{{#isPullRequest}}Pull request: [#{{pullRequestId}}](https://github.com/spectre-team/native-algorithms/pull/{{pullRequestId}})\n{{/isPullRequest}}Branch: [{{branch}}](https://github.com/spectre-team/spectre/tree/{{branch}})\nCommit: [{{commitId}} {{commitMessage}}](https://github.com/spectre-team/native-algorithms/commit/{{commitId}})\nAuthor: {{commitAuthor}}\n[Build details]({{buildUrl}})"
}
on_build_success: true
on_build_failure: true
on_build_status_changed: true