-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
244 lines (230 loc) · 9.33 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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
variables:
- name: isMain
value: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')]
- group: hooks-passwords
jobs:
- job: Mac
pool:
vmImage: 'macOS-11'
steps:
- script: sudo xcode-select -s /Applications/Xcode_12.4.app
displayName: "Select Xcode 12.4"
- script: brew update; brew upgrade cmake
displayName: "Upgrade CMake"
- task: CMake@1
inputs:
workingDirectory: 'build'
cmakeArgs: "-G \"Unix Makefiles\" -DCMAKE_BUILD_TYPE=Release .."
# Note: _CPack_Packages has symlink to /Applications which crashes the stupid CopyFiles
- script: make package; rm -rf _CPack_Packages
workingDirectory: build
displayName: "Make"
- script: bash rename-builds.sh
displayName: "Rename builds"
- task: CopyFiles@2
displayName: "Stage artifacts"
inputs:
contents: |
build/*.app/**
build/*.dmg
build/CMakeFiles/*.log
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: "Publish artifacts"
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: Alloverse_visor-Mac-x64
- task: S3Upload@1
inputs:
awsCredentials: 'aws-ci'
regionName: 'eu-north-1'
bucketName: 'alloverse-downloads-prod'
globExpressions: '**/*.dmg'
targetFolder: 'visor'
filesAcl: 'public-read'
sourceFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- bash: bash publish-build.sh mac
displayName: "Publish build to site"
condition: and(succeeded(), eq(variables.isMain, true))
env:
PUBLISHING_SECRET: $(PublishingSecret)
- job: Windows
pool:
vmImage: 'windows-2019'
steps:
- task: CMake@1
inputs:
workingDirectory: 'build'
cmakeArgs: '-A x64 -G "Visual Studio 16 2019" ..'
- task: VSBuild@1
displayName: "Visual Studio build"
inputs:
msbuildArchitecture: 'x64'
vsVersion: 16.0
createLogFile: true
solution: 'build\PACKAGE.vcxproj'
configuration: MinSizeRel # Hangs in CreateWindow in Release????
- script: bash rename-builds.sh
displayName: "Rename builds"
- task: CopyFiles@2
displayName: "Stage artifacts"
inputs:
contents: |
build/**/*win64.exe
build/**/*.log
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: "Publish artifacts"
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: Alloverse_visor-Windows-x64
- task: S3Upload@1
inputs:
awsCredentials: 'aws-ci'
regionName: 'eu-north-1'
bucketName: 'alloverse-downloads-prod'
sourceFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
globExpressions: '**/*.exe'
targetFolder: 'visor'
filesAcl: 'public-read'
- bash: bash publish-build.sh windows
displayName: "Publish build to site"
condition: and(succeeded(), eq(variables.isMain, true))
env:
PUBLISHING_SECRET: $(PublishingSecret)
- job: OculusQuest
pool:
vmImage: 'macOS-11'
steps:
- script: 'sdkmanager --install "ndk;21.4.7075529" 2>&1 | head'
displayName: "Install NDK 21.4.7075529"
env:
PATH: "/Users/runner/Library/Android/sdk/cmake/3.6.4111459/bin:/Applications/Android Studio.app/Contents/jre/Contents/Home/bin:~/Library/Android/sdk/platform-tools:~/Library/Android/sdk/tools/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
ANDROID_HOME: "~/Library/Android/sdk"
- script: 'sdkmanager --install "platforms;android-29" 2>&1 | head'
displayName: "Install SDK 29"
env:
PATH: "/Users/runner/Library/Android/sdk/cmake/3.6.4111459/bin:/Applications/Android Studio.app/Contents/jre/Contents/Home/bin:~/Library/Android/sdk/platform-tools:~/Library/Android/sdk/tools/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
ANDROID_HOME: "~/Library/Android/sdk"
- script: 'sdkmanager --install "build-tools;30.0.3" 2>&1 | head'
displayName: "Install build-tools 30.0.3"
env:
PATH: "/Users/runner/Library/Android/sdk/cmake/3.6.4111459/bin:/Applications/Android Studio.app/Contents/jre/Contents/Home/bin:~/Library/Android/sdk/platform-tools:~/Library/Android/sdk/tools/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
ANDROID_HOME: "~/Library/Android/sdk"
- task: DownloadSecureFile@1
name: releaseKeys
displayName: 'Download release signing keys'
inputs:
secureFile: 'android.release.keystore'
- script: |
echo Moving key into place...
ln -s $(releaseKeys.secureFilePath) $(Build.Repository.LocalPath)/android.release.keystore
- task: DownloadSecureFile@1
name: keyPasswords
displayName: 'Download signing passwords'
inputs:
secureFile: 'keys.properties'
- script: |
echo Moving key passwords into place...
ln -s $(keyPasswords.secureFilePath) $(Build.Repository.LocalPath)/keys.properties
- task: CMake@1
inputs:
workingDirectory: 'build'
cmakeArgs: "-DCMAKE_TOOLCHAIN_FILE=/Users/runner/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=29 -DANDROID_BUILD_TOOLS_VERSION=30.0.3 -DANDROID_SDK=/Users/runner/Library/Android/sdk -DJAVA_HOME=\"/Applications/Android Studio.app/Contents/jre/Contents/Home\" -DANDROID_KEYSTORE=$(Build.Repository.LocalPath)/android.release.keystore -DANDROID_KEYSTORE_PASS=\"pass:$(RELEASE_STORE_PASSWORD)\" -DANDROID_KEY_PASS=\"pass:$(RELEASE_KEY_PASSWORD)\" -DANDROID_VARIANT=quest .."
- script: env VERBOSE=1 make Alloverse
workingDirectory: build
displayName: "Make"
- script: bash rename-builds.sh
displayName: "Rename builds"
- task: CopyFiles@2
displayName: "Stage artifacts"
inputs:
contents: |
build/*.apk
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: "Publish artifacts"
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: Alloverse_visor-Quest
- task: S3Upload@1
inputs:
awsCredentials: 'aws-ci'
regionName: 'eu-north-1'
bucketName: 'alloverse-downloads-prod'
globExpressions: '**/*.apk'
targetFolder: 'visor'
filesAcl: 'public-read'
sourceFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- bash: bash publish-build.sh quest
displayName: "Publish build to site"
condition: and(succeeded(), eq(variables.isMain, true))
env:
PUBLISHING_SECRET: $(PublishingSecret)
- bash: bash publish-sidequest.sh
displayName: "Publish build to SideQuest"
condition: and(succeeded(), eq(variables.isMain, true))
env:
SIDEQUEST_TOKEN: $(SidequestToken)
# - job: Pico
# pool:
# vmImage: 'macOS-10.14'
# steps:
# - script: 'sdkmanager --install "ndk;21.0.6113669" 2>&1 | head'
# displayName: "Install NDK"
# env:
# PATH: "/Users/runner/Library/Android/sdk/cmake/3.6.4111459/bin:/Applications/Android Studio.app/Contents/jre/Contents/Home/bin:~/Library/Android/sdk/platform-tools:~/Library/Android/sdk/tools/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# ANDROID_HOME: "~/Library/Android/sdk"
# - task: DownloadSecureFile@1
# name: releaseKeys
# displayName: 'Download release signing keys'
# inputs:
# secureFile: 'android.release.keystore'
# - script: |
# echo Moving key into place...
# ln -s $(releaseKeys.secureFilePath) $(Build.Repository.LocalPath)/android.release.keystore
# - task: DownloadSecureFile@1
# name: keyPasswords
# displayName: 'Download signing passwords'
# inputs:
# secureFile: 'keys.properties'
# - script: |
# echo Moving key passwords into place...
# ln -s $(keyPasswords.secureFilePath) $(Build.Repository.LocalPath)/keys.properties
# - task: CMake@1
# inputs:
# workingDirectory: 'build'
# cmakeArgs: "-DCMAKE_TOOLCHAIN_FILE=/Users/runner/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_NATIVE_API_LEVEL=27 -DANDROID_BUILD_TOOLS_VERSION=29.0.2 -DANDROID_SDK=/Users/runner/Library/Android/sdk -DJAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home -DANDROID_KEYSTORE=$(Build.Repository.LocalPath)/android.release.keystore -DANDROID_KEYSTORE_PASS=\"pass:$(RELEASE_STORE_PASSWORD)\" -DANDROID_KEY_PASS=\"pass:$(RELEASE_KEY_PASSWORD)\" -DANDROID_VARIANT=pico .."
# - script: env VERBOSE=1 make Alloverse
# workingDirectory: build
# displayName: "Make"
# - script: bash rename-builds.sh
# displayName: "Rename builds"
# - task: CopyFiles@2
# displayName: "Stage artifacts"
# inputs:
# contents: |
# build/*.apk
# targetFolder: $(Build.ArtifactStagingDirectory)
# - task: PublishBuildArtifacts@1
# displayName: "Publish artifacts"
# inputs:
# pathtoPublish: '$(Build.ArtifactStagingDirectory)'
# artifactName: Alloverse_visor-Pico
# - task: S3Upload@1
# inputs:
# awsCredentials: 'aws-ci'
# regionName: 'eu-north-1'
# bucketName: 'alloverse-downloads-prod'
# globExpressions: '**/*.apk'
# targetFolder: 'visor'
# filesAcl: 'public-read'
# sourceFolder: '$(Build.ArtifactStagingDirectory)'
# flattenFolders: true