-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
azure-pipelines.yml
245 lines (212 loc) · 7.05 KB
/
azure-pipelines.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
trigger:
branches:
include:
- master
tags:
exclude:
- '*'
pr:
branches:
include:
- master
jobs:
- job: Linux_Build
strategy:
matrix:
Clang:
COMPILER: clang
GCC:
COMPILER: gcc
variables:
CCACHE_DIR: $(Pipeline.Workspace)/ccache
CI_HAS_ARTIFACTS: true
UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-linux"
DEPLOY_APPIMAGE: true
APPDIR: "/rpcs3/build/appdir"
ARTDIR: "/root/artifacts"
RELEASE_MESSAGE: "/rpcs3/GitHubReleaseMessage.txt"
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Cache@2
inputs:
key: ccache | $(Agent.OS) | $(COMPILER)
path: $(CCACHE_DIR)
displayName: ccache
- bash: |
docker pull --quiet rpcs3/rpcs3-ci-focal:1.9
docker run \
-v $(pwd):/rpcs3 \
--env-file .ci/docker.env \
-v $CCACHE_DIR:/root/.ccache \
-v $BUILD_ARTIFACTSTAGINGDIRECTORY:/root/artifacts \
rpcs3/rpcs3-ci-focal:1.9 \
/rpcs3/.ci/build-linux.sh
displayName: Docker setup and build
- publish: $(Build.ArtifactStagingDirectory)
condition: succeeded()
artifact: RPCS3 for Linux ($(COMPILER))
- bash: |
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp)
COMM_COUNT=$(git rev-list --count HEAD)
COMM_HASH=$(git rev-parse --short=8 HEAD)
export AVVER="${COMM_TAG}-${COMM_COUNT}"
.ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['COMPILER'], 'clang'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
- job: Windows_Build
variables:
COMPILER: msvc
QT_VER_MAIN: '6'
QT_VER: '6.8.0'
QT_VER_MSVC: 'msvc2022'
QT_DATE: '202410030750'
QTDIR: C:\Qt\$(QT_VER)\$(QT_VER_MSVC)_64
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
VULKAN_SDK: C:\VulkanSDK\$(VULKAN_VER)
CACHE_DIR: ./cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
pool:
vmImage: "windows-latest"
steps:
- bash: .ci/get_keys-windows.sh
displayName: Get Cache Keys
- task: Cache@2
inputs:
key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | llvm.lock | glslang.lock
path: $(CACHE_DIR)
restoreKeys: |
$(Agent.OS) | $(COMPILER)
displayName: Cache
- bash: .ci/setup-windows.sh
displayName: Download and unpack dependencies
- bash: .ci/export-azure-vars.sh
displayName: Export Variables
- task: VSBuild@1
inputs:
solution: 'rpcs3.sln'
maximumCpuCount: true
platform: x64
configuration: 'Release'
displayName: Compile RPCS3
- bash: .ci/deploy-windows.sh
displayName: Pack up build artifacts
- publish: $(Build.ArtifactStagingDirectory)
condition: succeeded()
artifact: RPCS3 for Windows
- bash: .ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
- job: Mac_Build_x86_64
timeoutInMinutes: 180
variables:
CCACHE_DIR: "/tmp/ccache_dir"
CCACHE_MAXSIZE: 300M
CI_HAS_ARTIFACTS: true
UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-mac"
RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
ARTDIR: $(Build.ArtifactStagingDirectory)
QT_VER: '6.8.0'
QT_VER_MAIN: '6'
LLVM_COMPILER_VER: '16'
pool:
vmImage: "macOS-13"
steps:
- task: Cache@2
inputs:
key: ccache | "$(Agent.OS)"
path: $(CCACHE_DIR)
restoreKeys: |
ccache | "$(Agent.OS)"
displayName: Ccache cache
- task: Cache@2
inputs:
key: qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
path: /tmp/Qt
restoreKeys: |
qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
displayName: Qt cache
# - task: Cache@2
# inputs:
# key: brew | "$(Agent.OS)"
# path: /Users/runner/Library/Caches/Homebrew
# restoreKeys: |
# brew | "$(Agent.OS)"
# displayName: Homebrew cache
- bash: |
chmod +x ".ci/build-mac.sh"
chmod +x ".ci/deploy-mac.sh"
chmod +x ".ci/optimize-mac.sh"
".ci/build-mac.sh"
displayName: Build macOS (x86_64)
- publish: $(Build.ArtifactStagingDirectory)
condition: succeeded()
artifact: RPCS3 for Mac (Intel)
- bash: |
source './.ci/export-cirrus-vars.sh'
.ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
- job: Mac_Build_arm64
timeoutInMinutes: 180
variables:
CCACHE_DIR: "/tmp/ccache_dir"
CCACHE_MAXSIZE: 300M
CI_HAS_ARTIFACTS: true
UPLOAD_COMMIT_HASH: 8e21bdbc40711a3fccd18fbf17b742348b0f4281
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-mac-arm64"
RELEASE_MESSAGE: "../GitHubReleaseMessage.txt"
ARTDIR: $(Build.ArtifactStagingDirectory)
QT_VER: '6.8.0'
QT_VER_MAIN: '6'
LLVM_COMPILER_VER: '16'
pool:
vmImage: "macOS-13"
steps:
- task: Cache@2
inputs:
key: ccache | "$(Agent.OS)"
path: $(CCACHE_DIR)
restoreKeys: |
ccache | "$(Agent.OS)"
displayName: Ccache cache
- task: Cache@2
inputs:
key: qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
path: /tmp/Qt
restoreKeys: |
qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
displayName: Qt cache
# - task: Cache@2
# inputs:
# key: brew | "$(Agent.OS)"
# path: /Users/runner/Library/Caches/Homebrew
# restoreKeys: |
# brew | "$(Agent.OS)"
# displayName: Homebrew cache
- bash: |
chmod +x ".ci/build-mac-arm64.sh"
chmod +x ".ci/deploy-mac-arm64.sh"
chmod +x ".ci/optimize-mac.sh"
".ci/build-mac-arm64.sh"
displayName: Build macOS (arm64)
- publish: $(Build.ArtifactStagingDirectory)
condition: succeeded()
artifact: RPCS3 for Mac (Apple Silicon)
- bash: |
source './.ci/export-cirrus-vars.sh'
.ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)