-
Notifications
You must be signed in to change notification settings - Fork 13
/
appveyor.yml
107 lines (89 loc) · 3.85 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
os: Visual Studio 2017
version: 0.3.4.{build}
skip_branch_with_pr: true
dotnet_csproj:
patch: true
file: 'JustAnotherVoiceChat.Server.Wrapper\*.csproj'
version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
assembly_info:
patch: true
file: 'JustAnotherVoiceChat.Server.GTMP\Properties\AssemblyInfo.cs'
assembly_version: '{version}'
assembly_file_version: '{version}'
artifacts:
- path: '**\JustAnotherVoiceChat*.nupkg'
name: NuGet Packages
- path: 'JustAnotherVoiceChat-%APPVEYOR_BUILD_VERSION%-GTMP.zip'
name: GT-MP Resource
- path: 'JustAnotherVoiceChat.Server.dll'
name: Server x64
install:
- mkdir C:\projects\dependencies
- cd C:\projects\dependencies
# install cmake
- set CMAKE_URL="https://cmake.org/files/v3.8/cmake-3.8.0-win64-x64.zip"
- appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip
- 7z x cmake.zip -oC:\projects\deps > nul
- move C:\projects\deps\cmake-* C:\projects\deps\cmake # Move to a version-agnostic directory
- set PATH=C:\projects\deps\cmake\bin;%PATH%
- cmake --version
before_build:
- cd C:\projects\justanothervoicechat-server
- nuget restore
# get submodules
- ps: (Get-Content .gitmodules).replace('[email protected]:', 'https://github.com/') | Set-Content .gitmodules
- git submodule update --init
build_script:
# C++
- cd JustAnotherVoiceChat.Server
- mkdir build
- cd build
- cmake .. -G "Visual Studio 15 2017 Win64"
- cmake --build . --config Release
- cp src\Release\JustAnotherVoiceChat.Server.dll C:\projects\justanothervoicechat-server\
- move src\Release\JustAnotherVoiceChat.Server.dll ..\..\JustAnotherVoiceChat.Server.Wrapper\
# C#
- cd C:\projects\justanothervoicechat-server
- dotnet build JustAnotherVoiceChat.Server.Wrapper\JustAnotherVoiceChat.Server.Wrapper.csproj -c "Release Windows" -f netstandard1.2
- dotnet build JustAnotherVoiceChat.Server.GTMP\JustAnotherVoiceChat.Server.GTMP.csproj -c "Release Windows" -f net452
- dotnet build JustAnotherVoiceChat.Server.GTMP.Resource\JustAnotherVoiceChat.Server.GTMP.Resource.csproj -c "Release Windows" -f net452
after_build:
- dotnet pack JustAnotherVoiceChat.Server.Wrapper/JustAnotherVoiceChat.Server.Wrapper.csproj -c "Release Windows" -o "..\"
- nuget pack JustAnotherVoiceChat.Server.GTMP\JustAnotherVoiceChat.Server.GTMP.csproj -Properties "Configuration=Release Windows"
# Build GT-MP Resource
- cd C:\projects\justanothervoicechat-server\JustAnotherVoiceChat.Server.GTMP.Resource\bin\Release\Windows
- 7z a JustAnotherVoiceChat-%APPVEYOR_BUILD_VERSION%-GTMP.zip JustAnotherVoiceChat* meta.xml Client\JustAnotherVoiceChat.js
- move JustAnotherVoiceChat-%APPVEYOR_BUILD_VERSION%-GTMP.zip C:\projects\justanothervoicechat-server\
test_script:
- cd C:\projects\justanothervoicechat-server
- dotnet test JustAnotherVoiceChat.Server.Wrapper.Tests\JustAnotherVoiceChat.Server.Wrapper.Tests.csproj -c "Release Windows" --logger trx;LogFileName=results.xml
on_finish:
- ps: |
$wc = New-Object 'System.Net.WebClient'
$files = Get-ChildItem -Include results.xml -Recurse
foreach ($file in $files)
{
$wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", $file.FullName)
}
deploy:
- provider: NuGet
api_key:
secure: qytdDzKfxkqRRaYiNfw2kI+8GAct937ZEDJjgUKsr5FfXccRE04Hl+r6eaj+Pifj
skip_symbols: true
artifact: /.*\.nupkg/
on:
branch: master
appveyor_repo_tag: true
- provider: GitHub
auth_token:
secure: b0P+CkQJzqs4JIluFMp+DMpQZ93e9ZzbzibKPOgaSDgzBgwUiIqKXtzSu7JaMQtJ
release: $(APPVEYOR_REPO_TAG_NAME)
prerelease: true
draft: true
description: $(APPVEYOR_REPO_COMMIT_MESSAGE)
artifact: /.*\.nupkg/, JustAnotherVoiceChat-$(appveyor_build_version)-GTMP.zip, JustAnotherVoiceChat.Server.dll
on:
branch: master
appveyor_repo_tag: true