Debian Codegraph @

.appveyor.yml

raw symbols SCIP
1 version: build-{build}
2 branches:
3 only:
4 - master
5 - /v\d+\.\d+\.\d+/
6
7 image: Visual Studio 2019
8 configuration: Release
9 clone_depth: 1
10 skip_commits:
11 # appveyor only searches for these in the first line by default
12 message: /\[ci skip\]/
13 only_commits:
14 files:
15 - CMakeLists.txt
16 - gemrb/**/*
17 - cmake/**/*
18 - platforms/windows/**/*
19 - .appveyor.yml
20 matrix:
21 fast_finish: true
22 max_jobs: 3
23 environment:
24 SF_ACC:
25 secure: gnSOiLDvnkRuEcD9+silVao5mf7D/pX2mo6tkfVIMas=
26 VCPKG_TARGET_TRIPLET: "x64-windows"
27 VCPKG_BUILD_TYPE: "release"
28 APPVEYOR_SAVE_CACHE_ON_ERROR: true
29 install:
30 - ps: |-
31 if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
32 nuget install secure-file -ExcludeVersion
33 choco -r install openssh
34 secure-file\tools\secure-file -decrypt testing\id_travissfbot.av.enc -secret $env:SF_ACC
35
36 # chmod 400 ...
37 $path = ".\testing\id_travissfbot.av"
38 icacls.exe $path /reset
39 icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
40 icacls.exe $path /inheritance:r
41 }
42
43 pushd c:\tools\vcpkg
44 git pull -q origin 2022.07.25
45 c:\tools\vcpkg\bootstrap-vcpkg.bat
46 popd
47 # (lib)vlc is missing from the vcpkg package list, so we don't build the plugin
48
49 cache:
50 - c:\tools\vcpkg\installed\
51 - c:\tools\vcpkg\packages\
52 - C:\ProgramData\chocolatey\lib
53 - C:\ProgramData\chocolatey\bin
54 - '%LocalAppData%\NuGet\v3-cache'
55 - '%LocalAppData%\vcpkg'
56 before_build:
57 - ps: |-
58 pushd c:\projects\gemrb
59
60 $git_version = (git rev-parse --short HEAD) | Out-String
61 $env:archive_file = -join("gemrb-win32-", $(Get-Date -Format "yyyy-MM-dd-"), $git_version.Trim(), ".zip")
62 $env:archive_path = -join("c:\projects\gemrb\", $env:archive_file)
63 $env:archive_source = -join("c:\gemrb-win32-", $git_version.Trim())
64 mkdir $env:archive_source
65 pushd $env:archive_source
66 mkdir Cache2
67 popd
68 popd
69
70 # improve the default config
71 $file = 'gemrb/GemRB.cfg.sample.in'
72 $find = '#PluginsPath=@DEFAULT_PLUGINS_DIR@'
73 $replace = "PluginsPath=.\plugins"
74 (Get-Content $file) -replace $find, $replace | Set-Content $file
75 $find = '#GemRBPath=\.'
76 $replace = "GemRBPath=."
77 (Get-Content $file) -replace $find, $replace | Set-Content $file
78
79 # add timer to work around appveyor cache problems, see build_script
80 $env:duration1 = Get-Date
81
82 $env:gl = "None"
83 if ($env:APPVEYOR_REPO_TAG_NAME -Or $env:APPVEYOR_REPO_COMMIT_MESSAGE -like '*buildgl*') {
84 $env:gl = "OpenGL"
85 }
86 cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENGL_BACKEND="$env:gl" -DINSOURCEBUILD=1 -DCMAKE_INSTALL_PREFIX="$env:archive_source" -DCMAKE_TOOLCHAIN_FILE=C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET="x64-windows" -A x64 -DPYTHON_VERSION="3.10...<3.11" -DUSE_TESTS=ON .
87
88 # set version to tag or version + commits since tag + commit hash
89 $git_version = (git describe --always) | Out-String
90 $git_version = $git_version -replace "`t|`n|`r|^v",""
91 $file = 'gemrb/core/InterfaceConfig.h'
92 $find = 'define VERSION_GEMRB .*$'
93 $replace = "define VERSION_GEMRB `"$git_version`""
94 (Get-Content $file) -replace $find, $replace | Set-Content $file
95 build_script:
96 - ps: |-
97 # break if things took too much time, so we can at least save the new cache
98 # it doesn't happen if the build gets killed after an hour
99 $duration2 = Get-Date
100 $span = New-TimeSpan -Start $env:duration1 -End $duration2
101 if ($span.TotalMinutes -ge 30) {
102 exit 1
103 }
104
105 pushd c:\projects\gemrb
106 cmake --build . -j 2 --config Release
107 after_build:
108 - ps: |-
109 pushd c:\projects\gemrb
110
111 if ($env:APPVEYOR_REPO_TAG_NAME) {
112 echo "Fetching heavy demo data!"
113 cmake --build . --target fetch-demo-data
114 }
115
116 cmake --build . --target install --config Release
117
118 if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
119 popd
120 7z a -tzip $env:archive_path $env:archive_source
121 }
122 test_script:
123 - ps: |-
124 pushd c:\projects\gemrb
125 ctest -C Release --output-on-failure
126 if ($? -ne $true) {
127 throw "Test suite failed!"
128 }
129 popd
130
131 cd $env:archive_source
132 cp GemRB.cfg.sample GemRB.cfg.bots
133 Add-Content -Path GemRB.cfg.bots -Encoding ascii -Value "GamePath=minimal"
134 Add-Content -Path GemRB.cfg.bots -Encoding ascii -Value "GameType=test"
135
136 ./gemrb.exe -q -c GemRB.cfg.bots
137 # ignore gl failures, since the build bot typically doesn't support it
138 if ($? -ne $true -and $env:gl -ne "OpenGL") {
139 throw "Failed test run!"
140 }
141
142 rm GemRB.cfg.bots
143 artifacts:
144 - path: gemrb*.zip
145 name: normal
146 deploy_script:
147 - cmd: |-
148 cd c:\projects\gemrb
149 scp -v -oStrictHostKeyChecking=no -i testing\id_travissfbot.av gemrb*.zip [email protected]:/home/frs/project/gemrb/botbins/Windows/AppVeyor/