forked from ClxS/Stardew-Farmhand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
66 lines (56 loc) · 2.37 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
version: "{build}-ci"
# Environment configuration. --------------------------------------------------
environment:
# Properties, passed to MSBuild project.
VersionMajor: 0
VersionMinor: 1
VersionPatch: 0
init:
# Properties, passed to MSBuild project.
- ps: |
$env:BuildDir = "$env:APPVEYOR_BUILD_FOLDER\.OUTPUT"
$env:VersionBuild = "$env:APPVEYOR_BUILD_NUMBER"
$env:VersionStage = "$env:APPVEYOR_REPO_BRANCH"
$env:VersionTag = "$env:APPVEYOR_REPO_COMMIT"
matrix:
# Fail whole build on first error.
fast_finish: true
services:
# Enable IIS, which is needed for web client testing.
- iis
install:
- cmd: |
git clone https://%GITLABUSR%:%GITLABPASS%@gitlab.com/ClxS/Tool.git C:\projects\stardew-farmhand\WorkingDirectory\tmp
move C:\projects\stardew-farmhand\WorkingDirectory\tmp\*.* C:\projects\stardew-farmhand\WorkingDirectory
# Build configuration. --------------------------------------------------------
configuration:
- Release
build_script:
- ps: |
nuget restore
$buildCmd = "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe"
$buildArgs = @(
"/m",
"/l:C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll",
"/p:Configuration=$env:CONFIGURATION",
"/v:m")
# If build is not a scheduled one, than simply build project with MSBuild.
if ($env:APPVEYOR_SCHEDULED_BUILD -ne "True") {
& $buildCmd $buildArgs
return
}
nuget install PublishCoverity -Version 0.10.0
# Else, build project with Coverity Scan.
"Building project with Coverity..."
& "cov-build.exe" `
--dir cov-int `
$buildCmd $buildArgs
$version = "$env:VersionMajor.$env:VersionMinor.$env:VersionPatch" +
"-$env:VersionStage+$env:VersionBuild"
$formField = New-Object Net.Http.StringContent($version)
# Compress results.
PublishCoverity.0.10.0/PublishCoverity compress -o "$env:APPVEYOR_BUILD_FOLDER\$env:APPVEYOR_PROJECT_NAME.zip" -i "$env:APPVEYOR_BUILD_FOLDER\cov-int"
PublishCoverity.0.10.0/PublishCoverity publish -z "$env:APPVEYOR_BUILD_FOLDER\$env:APPVEYOR_PROJECT_NAME.zip" -r ClxS/Stardew-Farmhand -t $env:CoverityProjectToken -e $env:CoverityNotificationEmail -d "Scheduled CI server build." --codeVersion "$formField"
# Other configuration. --------------------------------------------------------
# Use GitHub API for fast repository fetching.
shallow_clone: true