forked from OpenRA/OpenRA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
77 lines (67 loc) · 4.62 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
version: 1.0.{build}
environment:
CoverityProjectToken:
secure: BYP5qnptMazSCwTwgiFHlfqZd7BM3bwTRq2Cbs++ofg=
CoverityNotificationEmail:
secure: 0kyu0t8QwQYUQzqguVJP3N+VpEDfET2ArP+JNnOsUELJQvH8qbeQzPTM0ga0ek5G
install:
cache:
- thirdparty\download -> thirdparty\fetch-thirdparty-deps.ps1
before_build:
- make dependencies
build:
project: OpenRA.sln
verbosity: minimal
after_build:
- ps: |
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True")
{
cov-build.exe --dir cov-int make all
nuget.exe install PublishCoverity -ExcludeVersion
PublishCoverity\tools\PublishCoverity.exe compress -o coverity.zip -i cov-int
$version = Get-Date -format s
PublishCoverity\tools\PublishCoverity.exe publish `
-t "$env:CoverityProjectToken" `
-e "$env:CoverityNotificationEmail" `
-r "$env:APPVEYOR_REPO_NAME" `
-z coverity.zip `
-d "AppVeyor scheduled build ($env:APPVEYOR_BUILD_VERSION)." `
--codeVersion "$version"
}
before_test:
- ps: |
if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True")
{
choco install resharper-clt -y
dupFinder /output=dupReport.xml /show-text OpenRA.sln
choco install xmlstarlet -y
xml transform dupFinder.xslt dupReport.xml > dupReport.html
choco install pandoc -y
}
test_script:
- nunit3-console OpenRA.Test.dll --result=myresults.xml;format=AppVeyor
after_test:
- appveyor DownloadFile "https://raw.githubusercontent.com/wiki/OpenRA/OpenRA/Changelog.md" -FileName Changelog.md
- make docs
- ps: dir *.md | % {gc $_ -Raw | .\ConvertFrom-Markdown.ps1 | Out-File -FilePath "$($_.Name.TrimEnd(".md")).html"}
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Red Alert').replace('MOD_ID', 'ra').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
- ps: csc.exe /noconfig /platform:x86 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\RedAlert.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\RedAlert.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Tiberian Dawn').replace('MOD_ID', 'cnc').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
- ps: csc.exe /noconfig /platform:x86 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\TiberianDawn.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\TiberianDawn.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
- ps: (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs.in").replace('DISPLAY_NAME', 'Dune 2000').replace('MOD_ID', 'd2k').replace('FAQ_URL', 'http://wiki.openra.net/FAQ') | Set-Content "${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs"
- ps: csc.exe /noconfig /platform:x86 /reference:System.dll /reference:System.Core.dll /reference:System.Drawing.dll /reference:System.Windows.Forms.dll /reference:"${env:APPVEYOR_BUILD_FOLDER}\OpenRA.Game.exe" /out:"${env:APPVEYOR_BUILD_FOLDER}\Dune2000.exe" /win32icon:"${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\Dune2000.ico" /target:winexe ${env:APPVEYOR_BUILD_FOLDER}\packaging\windows\WindowsLauncher.cs
- ps: cp packaging\windows\OpenRA.ico .
- ps: cp packaging\windows\RedAlert.ico .
- ps: cp packaging\windows\TiberianDawn.ico .
- ps: cp packaging\windows\Dune2000.ico .
- if defined APPVEYOR_REPO_TAG_NAME set VERSION=%APPVEYOR_REPO_TAG_NAME%
- if not defined APPVEYOR_REPO_TAG_NAME set VERSION=%APPVEYOR_REPO_COMMIT:~0,7%
- '"C:\Program Files (x86)\NSIS\makensis.exe" /DSRCDIR="%APPVEYOR_BUILD_FOLDER%" /DDEPSDIR="%APPVEYOR_BUILD_FOLDER%\thirdparty\download\windows" /DTAG="git-%VERSION%" /DSUFFIX=" (dev)" /V3 packaging/windows/OpenRA.nsi'
- move /Y %APPVEYOR_BUILD_FOLDER%\packaging\windows\OpenRA.Setup.exe %APPVEYOR_BUILD_FOLDER%\OpenRA-%VERSION%.exe
artifacts:
- path: OpenRA-$(VERSION).exe
name: Installer
- path: coverity.zip
name: Coverity Build
- path: dupReport.html
name: dupFinder Report