-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy path.appveyor.yml
More file actions
211 lines (179 loc) · 8.54 KB
/
Copy path.appveyor.yml
File metadata and controls
211 lines (179 loc) · 8.54 KB
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
branches:
only:
- master
skip_tags: true
skip_branch_with_pr: true
version: 1.33-appveyor{build}
matrix:
fast_finish: true
environment:
OPENMPT_APPVEYOR_API_TOKEN:
secure: bxGFLD4QFin6OMSHsO5tYiKkuifNPMEsZNHvc2wfMYk=
matrix:
- job_name: VS2022 Win11 x86
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win11
MPT_APPVEYOR_ARCH: x86
MPT_APPVEYOR_ARCH_CONFIG: Win32
- job_name: VS2022 Win11 amd64
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win11
MPT_APPVEYOR_ARCH: amd64
MPT_APPVEYOR_ARCH_CONFIG: x64
- job_name: VS2022 Win11 arm64
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win11
MPT_APPVEYOR_ARCH: arm64
MPT_APPVEYOR_ARCH_CONFIG: ARM64
- job_name: VS2022 Win11 arm64ec
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win11
MPT_APPVEYOR_ARCH: arm64ec
MPT_APPVEYOR_ARCH_CONFIG: ARM64EC
- job_name: VS2022 Win7 x86
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win7
MPT_APPVEYOR_ARCH: x86
MPT_APPVEYOR_ARCH_CONFIG: Win32
- job_name: VS2022 Win7 amd64
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win7
MPT_APPVEYOR_ARCH: amd64
MPT_APPVEYOR_ARCH_CONFIG: x64
- job_name: VS2022 Win8 arm
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win8
MPT_APPVEYOR_ARCH: arm
MPT_APPVEYOR_ARCH_CONFIG: ARM
- job_name: VS2022 Win10 arm64
job_group: Builds
MPT_APPVEYOR_VS: vs2022
MPT_APPVEYOR_TARGET: win10
MPT_APPVEYOR_ARCH: arm64
MPT_APPVEYOR_ARCH_CONFIG: ARM64
- job_name: Package
job_depends_on: Builds
image: Visual Studio 2022
clone_depth: 2500
cache:
- build\externals
install:
- build\download_externals.cmd auto
before_build:
- build\auto\appveyor_set_version.cmd
for:
-
matrix:
only:
- job_group: Builds
build_script:
- build\auto\build_openmpt_args.cmd %MPT_APPVEYOR_VS% %MPT_APPVEYOR_TARGET% %MPT_APPVEYOR_ARCH_CONFIG% Release 7z default
- build\tools\7zip\7z.exe a -r -t7z -mx9 -y bin\%MPT_APPVEYOR_VS%-%MPT_APPVEYOR_TARGET%-%MPT_APPVEYOR_ARCH%.7z bin\release\%MPT_APPVEYOR_VS%-%MPT_APPVEYOR_TARGET%-static\%MPT_APPVEYOR_ARCH%
artifacts:
- path: 'bin\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-$(MPT_APPVEYOR_ARCH).7z'
-
matrix:
only:
- job_name: Package
before_build:
- ps: |
function Get-AppVeyorArtifacts
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Low')]
param(
#The name of the account you wish to download artifacts from
[parameter(Mandatory = $true)]
[string]$Account,
#The name of the project you wish to download artifacts from
[parameter(Mandatory = $true)]
[string]$Project,
#Where to save the downloaded artifacts. Defaults to current directory.
[alias("DownloadDirectory")][string]$Path = '.',
[string]$Token,
#Filter to a specific branch or project directory. You can specify Branch as either branch name ("master") or build version ("0.1.29")
[string]$Branch,
#If you have multiple build jobs, specify which job you wish to retrieve the artifacts from
[string]$JobName,
#Download all files into a single directory, do not preserve any hierarchy that might exist in the artifacts
[switch]$Flat,
[string]$Proxy,
[switch]$ProxyUseDefaultCredentials,
#URL of Appveyor API. You normally shouldn't need to change this.
$apiUrl = 'https://ci.appveyor.com/api'
)
$headers = @{
'Content-type' = 'application/json'
}
if ($Token) {$headers.'Authorization' = "Bearer $token"}
# Prepare proxy args to splat to Invoke-RestMethod
$proxyArgs = @{}
if (-not [string]::IsNullOrEmpty($proxy)) {
$proxyArgs.Add('Proxy', $proxy)
}
if ($proxyUseDefaultCredentials.IsPresent) {
$proxyArgs.Add('ProxyUseDefaultCredentials', $proxyUseDefaultCredentials)
}
$errorActionPreference = 'Stop'
$projectURI = "$apiUrl/projects/$account/$project"
if ($Branch) {$projectURI = $projectURI + "/branch/$Branch"}
$projectObject = Invoke-RestMethod -Method Get -Uri $projectURI `
-Headers $headers @proxyArgs
if (-not $projectObject.build.jobs) {throw "No jobs found for this project or the project and/or account name was incorrectly specified"}
if (($projectObject.build.jobs.count -gt 1) -and -not $jobName) {
throw "Multiple Jobs found for the latest build. Please specify the -JobName paramter to select which job you want the artifacts for"
}
if ($JobName) {
$jobid = ($projectObject.build.jobs | Where-Object name -eq "$JobName" | Select-Object -first 1).jobid
if (-not $jobId) {throw "Unable to find a job named $JobName within the latest specified build. Did you spell it correctly?"}
} else {
$jobid = $projectObject.build.jobs[0].jobid
}
$artifacts = Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts" `
-Headers $headers @proxyArgs
$artifacts `
| ? { $psCmdlet.ShouldProcess($_.fileName) } `
| % {
$type = $_.type
$localArtifactPath = $_.fileName -split '/' | % { [Uri]::UnescapeDataString($_) }
if ($flat.IsPresent) {
$localArtifactPath = ($localArtifactPath | select -Last 1)
} else {
$localArtifactPath = $localArtifactPath -join [IO.Path]::DirectorySeparatorChar
}
$localArtifactPath = Join-Path $path $localArtifactPath
$artifactUrl = "$apiUrl/buildjobs/$jobId/artifacts/$($_.fileName)"
Write-Verbose "Downloading $artifactUrl to $localArtifactPath"
$localArtifactPathParent = Split-Path -Path $localArtifactPath -Parent
New-Item -Path $localArtifactPathParent -ItemType Directory -Force
Invoke-RestMethod -Method Get -Uri $artifactUrl -OutFile $localArtifactPath -Headers $headers @proxyArgs
New-Object PSObject -Property @{
'Source' = $artifactUrl
'Type' = $type
'Target' = $localArtifactPath
}
}
}
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win11 x86'
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win11 amd64'
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win11 arm64'
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win11 arm64ec'
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win7 x86'
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win7 amd64'
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win8 arm'
Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2022 Win10 arm64'
- build\tools\7zip\7z.exe x -y bin\*.7z
- move bin\release\vs2022-win11-static bin\release\vs2026-win11-static
build_script:
- build\auto\build_openmpt_release_packages_multiarch.cmd auto
- build\auto\build_openmpt_update_information.cmd auto
- build\auto\package_openmpt_installer_multiarch_args.cmd vs2026 win11 Win32 Release 7z default
after_build:
- appveyor PushArtifact bin\openmpt-pkg.win-multi.tar
test: off