forked from elonafoobar/elonafoobar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
98 lines (83 loc) · 3.34 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
clone_folder: C:\projects\elonafoobar
os:
- Visual Studio 2017
environment:
matrix:
- CMAKE_ARGS: -G "Visual Studio 15 2017 Win64"
BOOST_VERSION: 1.69.0
BOOST_ROOT: C:\Libraries\boost_1_69_0
PREFIX: C:\SDK
OPENSSL_ROOT_DIR: C:\OpenSSL-v111-Win64
ZLIB_ROOT: C:\SDK
build:
verbosity: detailed
configuration:
- Debug
# for master branch
for:
-
branches:
only:
- master
configuration:
- Release
branches:
except:
- /pr\/.+/
cache:
- C:\SDK -> appveyor.yml
- C:\projects\elonafoobar\bin -> appveyor.yml
before_build:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
- cd C:\projects\elonafoobar
- ps: "$(git ls-files) -split \"`r`n\" | where { $_ -match '\\.(c|h|cpp|hpp|cxx|hxx|cc|hh)$' } | foreach { Set-ItemProperty $_ -Name LastWriteTime -Value $([DateTime]::Parse($(git log --format=%cI -n1 $_))) }"
- if exist %PREFIX% set NEEDDEPENDS=rem
- |-
%NEEDDEPENDS% mkdir %PREFIX%
%NEEDDEPENDS% cp C:\projects\elonafoobar\deps\install.bat %PREFIX%
%NEEDDEPENDS% cd %PREFIX%
%NEEDDEPENDS% git clone --depth=1 https://github.com/elonafoobar/windows_deps windows
%NEEDDEPENDS% call .\install.bat
build_script:
- chcp 65001
- cd %PREFIX%
- if exist elona122.zip set NEEDELONA=rem
- |-
%NEEDELONA% appveyor DownloadFile http://ylvania.style.coocan.jp/file/elona122.zip
%NEEDELONA% 7z x -y elona122.zip > nul
- cd %APPVEYOR_BUILD_FOLDER%
- if not exist bin mkdir bin
- cd bin
- cmake -DCMAKE_PREFIX_PATH=%PREFIX% -DELONA_BUILD_TARGET=TESTS %CMAKE_ARGS% -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DCMAKE_BUILD_TYPE=%CONFIGURATION% ..
- cmake --build . --config %CONFIGURATION%
- cd %CONFIGURATION%
- Elona_foobar.exe --durations=yes
- cd %APPVEYOR_BUILD_FOLDER%\bin
- cmake -DCMAKE_PREFIX_PATH=%PREFIX% -DELONA_BUILD_TARGET=GAME %CMAKE_ARGS% -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DCMAKE_BUILD_TYPE=%CONFIGURATION% ..
- cmake --build . --config %CONFIGURATION%
- cmake -DCMAKE_PREFIX_PATH=%PREFIX% -DELONA_BUILD_TARGET=LAUNCHER %CMAKE_ARGS% -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DCMAKE_BUILD_TYPE=%CONFIGURATION% ..
- cmake --build . --config %CONFIGURATION%
after_build:
- cd %APPVEYOR_BUILD_FOLDER%
- mv bin\%CONFIGURATION% bin\Elona_foobar
- mv CHANGELOG*.md bin\Elona_foobar
- mv LICENSE.txt bin\Elona_foobar
- mv CREDITS.txt bin\Elona_foobar
- cp %OPENSSL_ROOT_DIR%\bin\libcrypto-1_1-x64.dll bin\Elona_foobar
- cp %OPENSSL_ROOT_DIR%\bin\libssl-1_1-x64.dll bin\Elona_foobar
- del bin\Elona_foobar\*.ilk
- del bin\Elona_foobar\*.pdb
- rd /q /s bin\Elona_foobar\graphic
- rd /q /s bin\Elona_foobar\log
- rd /q /s bin\Elona_foobar\sound
- rd /q /s bin\Elona_foobar\tests
- rd /q /s bin\Elona_foobar\tmp
- xcopy /s /e /y runtime\* bin\Elona_foobar
- ps: "$env:ELONAFOOBAR_VERSION=(Select-String 'project\\(Elona_foobar VERSION (.*)\\)' CMakeLists.txt).Matches.Groups[1].Value"
- cd bin
- ren Elona_foobar\Elona_foobar.exe "Elona foobar.exe"
- ren Elona_foobar "Elona foobar v%ELONAFOOBAR_VERSION%"
- 7z a -y "Elona_foobar-v%ELONAFOOBAR_VERSION%-Windows.zip" "Elona foobar v%ELONAFOOBAR_VERSION%"
- rd /q /s "Elona foobar v%ELONAFOOBAR_VERSION%"
artifacts:
- path: 'bin\Elona_foobar-v*-Windows.zip'