forked from ihhub/fheroes2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
95 lines (80 loc) · 3.45 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
skip_commits:
files:
- '**/*.md'
- .gitignore
- .github/workflows/*
- sonar-project.properties
- docs/*
skip_tags: true
# version format
version: 0.9.9.{build}
# Build worker image (VM template)
image: Visual Studio 2015
configuration:
- Release-SDL1
- Release-SDL2
for:
-
matrix:
only:
- configuration: Release-SDL1
environment:
deploy_conf_name: SDL1
-
matrix:
only:
- configuration: Release-SDL2
environment:
deploy_conf_name: SDL2
platform:
- x86
- x64
# clone directory
clone_folder: C:\projects\fheroes2
install:
- cd C:\projects\fheroes2\script\windows
- if not exist C:\projects\fheroes2\VisualStudio\packages\installed call install_packages.bat
- set PATH=%PATH%;"C:\Program Files (x86)\Inno Setup 5"
- cd C:\projects\fheroes2
init:
- git config --global core.autocrlf true
# src/fheroes2/system/version.h: BUILD_VERSION will be set to %fheroes2_build_version% inside VisualStudio/common.props
# src/resources/fheroes2.rc: BUILD_VERSION is limited to 16 bit
#
# double percent sign is stripped by AppVeyor, so we can't calculate modulo in the usual way
before_build:
- cmd: set /a fheroes2_build_version = %APPVEYOR_BUILD_NUMBER% - %APPVEYOR_BUILD_NUMBER% / 32768 * 32768
build:
project: fheroes2-vs2015.vcxproj
after_build:
- cmd: C:\cygwin64\bin\bash -l -c "cd C:/projects/fheroes2/files/lang && make -j 2"
- cmd: cd C:\projects\fheroes2\build\%platform%\%configuration%
- cmd: if "%platform%" == "x86" xcopy /Y /s /Q "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvcp140.dll" "."
- cmd: if "%platform%" == "x86" xcopy /Y /s /Q "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\vcruntime140.dll" "."
- cmd: 7z a fheroes2_windows_%platform%_%deploy_conf_name%.zip fheroes2.exe SDL*.dll lib*.dll zlib*.dll msvcp*.dll vcruntime*.dll
- cmd: cd C:\projects\fheroes2
- cmd: xcopy /Y /s /Q "docs\README.txt" "."
- cmd: xcopy /Y /s /Q "script\demo\download_demo_version.bat" "."
- cmd: xcopy /Y /s /Q "script\demo\download_demo_version.ps1" "."
- cmd: xcopy /Y /s /Q "script\homm2\extract_homm2_resources.bat" "."
- cmd: xcopy /Y /s /Q "script\homm2\extract_homm2_resources.ps1" "."
- cmd: 7z a build\%platform%\%configuration%\fheroes2_windows_%platform%_%deploy_conf_name%.zip download_demo_version.bat download_demo_version.ps1 extract_homm2_resources.bat extract_homm2_resources.ps1 LICENSE fheroes2.key changelog.txt README.txt files\lang\*.mo files\data\*.h2d
- cmd: iscc script\windows\fheroes2.iss /DAppVersion=%APPVEYOR_BUILD_VERSION% "/DBuildDir=C:\projects\fheroes2\build\%platform%\%configuration%" /DPlatform=%platform% /DDeployConfName=%deploy_conf_name%
artifacts:
- path: build\$(platform)\$(configuration)\fheroes2_windows_$(platform)_$(deploy_conf_name).*
name: fheroes2-%platform%-%deploy_conf_name%
deploy:
tag: fheroes2-windows-$(platform)-$(deploy_conf_name)
release: Windows $(platform) build with $(deploy_conf_name) support (latest commit)
description: $(APPVEYOR_REPO_COMMIT_MESSAGE)
provider: GitHub
auth_token:
secure: 0KcyoHsROl98QBsNcB+so6hegLvgWZ0R2zYammwgqdDyVXkNDejMjiDpr5sqDnx9
artifact: fheroes2-%platform%-%deploy_conf_name%
draft: false
prerelease: true
force_update: true
on:
branch: master
cache:
- C:\projects\fheroes2\VisualStudio\packages\installed -> appveyor.yml, script\windows\install_packages.bat, script\windows\setup_packages.bat