forked from gemrb/gemrb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
108 lines (98 loc) · 3.2 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
108
version: build-{build}
branches:
only:
- master
image: Visual Studio 2017
configuration: Release
clone_depth: 1
skip_commits:
# appveyor only searches for these in the first line by default
message: /\[ci skip\]/
only_commits:
files:
- gemrb/**/*
- cmake/**/*
- windows/**/*
- .appveyor.yml
environment:
SF_ACC:
secure: gnSOiLDvnkRuEcD9+silVao5mf7D/pX2mo6tkfVIMas=
install:
- ps: |-
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
nuget install secure-file -ExcludeVersion
choco -r install openssh
secure-file\tools\secure-file -decrypt testing\id_travissfbot.av.enc -secret $env:SF_ACC
}
vcpkg install zlib
vcpkg install sdl1
# sdl mixer: only available for sdl2, as sdl2-mixer
vcpkg install python2
vcpkg install openal-soft
vcpkg install libpng
vcpkg install libogg
vcpkg install libvorbis
vcpkg install freetype
vcpkg install libiconv
# (lib)vlc is missing
pushd c:\tools\vcpkg
vcpkg integrate install
popd
cache:
- c:\tools\vcpkg\installed\
- C:\ProgramData\chocolatey\lib
- C:\ProgramData\chocolatey\bin
- '%LocalAppData%\NuGet\v3-cache'
before_build:
- ps: |-
pushd c:\projects\gemrb
$git_version = (git rev-parse --short HEAD) | Out-String
$env:archive_file = -join("gemrb-win32-", $git_version.Trim(), ".zip")
$env:archive_path = -join("c:\projects\gemrb\", $env:archive_file)
$env:archive_source = -join("c:\gemrb-win32-", $git_version.Trim())
mkdir $env:archive_source
pushd $env:archive_source
mkdir Cache2
popd
popd
# improve the default config
$file = 'gemrb/GemRB.cfg.sample.in'
$find = '#PluginsPath=@DEFAULT_PLUGINS_DIR@'
$replace = "PluginsPath=.\plugins"
(Get-Content $file) -replace $find, $replace | Set-Content $file
cmake -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DINSOURCEBUILD=1 -DWIN32_USE_STDIO=1 -DCMAKE_INSTALL_PREFIX="$env:archive_source" -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake .
# set version to tag or version + commits since tag + commit hash
$git_version = (git describe --always) | Out-String
$git_version = $git_version -replace "`t|`n|`r|^v",""
$file = 'gemrb/includes/globals.h'
$find = 'define VERSION_GEMRB .*$'
$replace = "define VERSION_GEMRB `"$git_version`""
(Get-Content $file) -replace $find, $replace | Set-Content $file
build:
project: gemrb.sln
parallel: true
verbosity: minimal
before_package:
- ps: |-
pushd c:\projects\gemrb
cmake --build . --target install --config Release
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
popd
7z a -tzip $env:archive_path $env:archive_source
}
test_script:
- cmd: |-
cd C:/gemrb-win32*
cp GemRB.cfg.sample GmRB.cfg.bots
echo GamePath=minimal >> GemRB.cfg.bots
echo GameType=test >> GemRB.cfg.bots
echo AudioDriver=none >> GemRB.cfg.bots
gemrb.exe -c GemRB.cfg.bots
rm GemRB.cfg.bots
artifacts:
- path: gemrb*.zip
name: normal
deploy_script:
- cmd: |-
cd c:\projects\gemrb
scp -v -oStrictHostKeyChecking=no -i testing\id_travissfbot.av gemrb*.zip "[email protected]:/home/frs/project/gemrb/Buildbot\ Binaries/Windows/AppVeyor/"