forked from RPCS3/rpcs3
-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
150 lines (129 loc) · 4.97 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
version: '{build}'
image: Visual Studio 2015
environment:
QTDIR: C:\Qt\5.10\msvc2015_64
LLVMLIBS: https://github.com/RPCS3/llvm/releases/download/continuous-release_60/llvmlibs.7z
GLSLANG: https://drive.google.com/uc?export=download&id=1nJK_NEeRzJ_r_u4zWLySwLmMrV8ZO_wL
COMPATDB: https://rpcs3.net/compatibility?api=v1&export
VULKAN_SDK: "C:\\VulkanSDK\\1.1.73.0"
VULKAN_SDK_URL: https://sdk.lunarg.com/sdk/download/1.1.73.0/windows/VulkanSDK-1.1.73.0-Installer.exe
VULKAN_SDK_MIRROR: https://obk.ee/rpcs3/VulkanSDK-1.1.73.0-Installer.exe
VULKAN_SDK_SHA: a5d193f97db4de97e6b4fdd81f00ff6a603f66bb17dc3cf8ac0fe9aec58497c7
cache:
- glslang.7z -> appveyor.yml
- compat_database.dat
- vulkan-sdk.exe -> appveyor.yml
install:
- ps: | # set env vars for versioning
$env:COMM_TAG = $(git describe --tags $(git rev-list --tags --max-count=1))
$env:COMM_COUNT = $(git rev-list --count HEAD)
$env:COMM_HASH = $env:APPVEYOR_REPO_COMMIT.Substring(0,8)
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
$env:BUILD = "rpcs3-{0}-{1}_win64.7z" -f $env:COMM_TAG, $env:COMM_HASH
$env:AVVER = "{0}-{1}" -f $env:COMM_TAG.TrimStart("v"), $env:COMM_HASH
}
else {
$env:BUILD = "rpcs3-{0}-{1}-{2}_win64.7z" -f $env:COMM_TAG, $env:COMM_COUNT, $env:COMM_HASH
$env:AVVER = "{0}-{1}" -f $env:COMM_TAG.TrimStart("v"), $env:COMM_COUNT
}
- ps: | # used for experimental build warnings for pr builds
$env:BRANCH = "{0}/{1}/#{2}" -f $env:APPVEYOR_REPO_NAME, `
$env:APPVEYOR_REPO_BRANCH, $env:APPVEYOR_PULL_REQUEST_NUMBER
$env:BRANCH = $env:BRANCH -replace "/#$"
- ps: | # misc global settings
$env:PATH += $env:QTDIR
[net.servicepointmanager]::securityprotocol = "tls12, tls11, tls"
- ps: | # update and init submodules
git submodule -q update --init `
3rdparty/cereal `
3rdparty/ffmpeg `
3rdparty/GSL `
3rdparty/hidapi `
3rdparty/libpng `
3rdparty/Optional `
3rdparty/pugixml `
3rdparty/xxHash `
3rdparty/yaml-cpp `
3rdparty/zlib `
asmjit `
Vulkan/glslang
platform: x64
configuration: Release - LLVM
build:
parallel: true
project: rpcs3.sln
verbosity: normal
before_build:
- ps: | # initialize mirror arrays and fetch precompiled build dependencies
$VULKAN_SDK_URLS = @(
$env:VULKAN_SDK_MIRROR;
$env:VULKAN_SDK_URL;
"$($env:VULKAN_SDK_URL)?Human=true";
)
if (!(test-path llvmlibs.7z)) { irm $env:LLVMLIBS -outfile llvmlibs.7z }
if (!(test-path glslang.7z)) { irm $env:GLSLANG -outfile glslang.7z }
7z x llvmlibs.7z -aos -o"." | out-null
7z x glslang.7z -aos -o".\lib\$env:CONFIGURATION-$env:PLATFORM" | out-null
if (!(test-path vulkan-sdk.exe))
{
foreach ($url in $VULKAN_SDK_URLS) {
irm $url -outfile vulkan-sdk.exe
if ($env:VULKAN_SDK_SHA -eq $(Get-FileHash .\vulkan-sdk.exe).Hash)
{
echo "Successfully downloaded and verified vulkan-sdk.exe!"
break
}
else
{
echo "Invalid file hash, Vulkan SDK Setup was possibly tampered with, retrying with a different mirror..."
}
}
}
.\vulkan-sdk.exe /S
after_build:
- ps: | # remove unnecessary files
rm .\bin\rpcs3.exp, .\bin\rpcs3.lib, .\bin\rpcs3.pdb
- ps: | # prepare compatibility database for packaging
$db = irm $env:COMPATDB -erroraction silentlycontinue
if ($db -and $db.return_code -eq 0) {
$db | convertto-json -compress | out-file compat_database.dat -encoding utf8
}
copy-item compat_database.dat .\bin\GuiConfigs\compat_database.dat
- ps: | # package artifacts
7z a -m0=LZMA2 -mx9 $env:BUILD .\bin\*
7z a -m0=LZMA2 -mx9 openssl_win64.7z C:\OpenSSL-Win64\bin\libeay32.dll `
C:\OpenSSL-Win64\bin\ssleay32.dll
$env:FILESIZEMB = (Get-Item $env:BUILD).length/1MB
- ps: | # generate sha256 hashes
(get-filehash $env:BUILD -algorithm SHA256).Hash | out-file ("{0}.sha256" -f $env:BUILD) -encoding ascii
$env:SHA256SUM = (get-filehash $env:BUILD -algorithm SHA256).Hash
(get-filehash openssl_win64.7z -algorithm SHA256).Hash | out-file "openssl_win64.7z.sha256" -encoding ascii
test: off
artifacts:
- path: $(BUILD)
name: rpcs3
- path: $(BUILD).sha256
name: rpcs3 sha256 hash
- path: openssl_win64.7z
name: openssl
- path: openssl_win64.7z.sha256
name: openssl sha256 hash
deploy:
provider: GitHub
# Description is a semi-colon seperated list for easy parsing
description: "$(SHA256SUM);$(FILESIZEMB)MB"
tag: build-$(APPVEYOR_REPO_COMMIT)
release: $(AVVER)
artifact: $(BUILD)
repository: RPCS3/rpcs3-binaries-win
draft: false
prerelease: false
force_update: true
auth_token:
secure: gTZqN6J9QNQTv9vu2qtExWk1x4o9dSfyTH/y86Yhe3qu+2w6Mly1MaDFMaXgrN1e
on:
branch: master
appveyor_repo_name: RPCS3/rpcs3
on_success:
- ps: | # update appveyor build version, done last to prevent webhook breakage
update-appveyorbuild -version $env:AVVER