1
0

.appveyor.yml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. branches:
  2. only:
  3. - master
  4. skip_tags: true
  5. skip_branch_with_pr: true
  6. version: 1.30-appveyor{build}
  7. matrix:
  8. fast_finish: true
  9. environment:
  10. OPENMPT_APPVEYOR_API_TOKEN:
  11. secure: bxGFLD4QFin6OMSHsO5tYiKkuifNPMEsZNHvc2wfMYk=
  12. matrix:
  13. - job_name: VS2019 Win10 x86
  14. job_group: Builds
  15. MPT_APPVEYOR_VS: vs2019
  16. MPT_APPVEYOR_TARGET: win10
  17. MPT_APPVEYOR_ARCH: x86
  18. MPT_APPVEYOR_ARCH_CONFIG: Win32
  19. - job_name: VS2019 Win10 amd64
  20. job_group: Builds
  21. MPT_APPVEYOR_VS: vs2019
  22. MPT_APPVEYOR_TARGET: win10
  23. MPT_APPVEYOR_ARCH: amd64
  24. MPT_APPVEYOR_ARCH_CONFIG: x64
  25. - job_name: VS2019 Win10 arm
  26. job_group: Builds
  27. MPT_APPVEYOR_VS: vs2019
  28. MPT_APPVEYOR_TARGET: win10
  29. MPT_APPVEYOR_ARCH: arm
  30. MPT_APPVEYOR_ARCH_CONFIG: ARM
  31. - job_name: VS2019 Win10 arm64
  32. job_group: Builds
  33. MPT_APPVEYOR_VS: vs2019
  34. MPT_APPVEYOR_TARGET: win10
  35. MPT_APPVEYOR_ARCH: arm64
  36. MPT_APPVEYOR_ARCH_CONFIG: ARM64
  37. - job_name: VS2019 Win7 x86
  38. job_group: Builds
  39. MPT_APPVEYOR_VS: vs2019
  40. MPT_APPVEYOR_TARGET: win7
  41. MPT_APPVEYOR_ARCH: x86
  42. MPT_APPVEYOR_ARCH_CONFIG: Win32
  43. - job_name: VS2019 Win7 amd64
  44. job_group: Builds
  45. MPT_APPVEYOR_VS: vs2019
  46. MPT_APPVEYOR_TARGET: win7
  47. MPT_APPVEYOR_ARCH: amd64
  48. MPT_APPVEYOR_ARCH_CONFIG: x64
  49. - job_name: Package
  50. job_depends_on: Builds
  51. image: Visual Studio 2019
  52. clone_depth: 2500
  53. cache:
  54. - build\externals
  55. install:
  56. - build\download_externals.cmd auto
  57. before_build:
  58. - build\auto\appveyor_set_version.cmd
  59. for:
  60. -
  61. matrix:
  62. only:
  63. - job_group: Builds
  64. build_script:
  65. - build\auto\build_openmpt_args.cmd %MPT_APPVEYOR_VS% %MPT_APPVEYOR_TARGET% %MPT_APPVEYOR_ARCH_CONFIG% Release 7z default
  66. artifacts:
  67. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\OpenMPT.exe'
  68. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\OpenMPT.pdb'
  69. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\openmpt-lame.dll'
  70. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\openmpt-lame.pdb'
  71. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\openmpt-mpg123.dll'
  72. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\openmpt-mpg123.pdb'
  73. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\openmpt-soundtouch.dll'
  74. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\openmpt-soundtouch.pdb'
  75. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\PluginBridge-$(MPT_APPVEYOR_ARCH).exe'
  76. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\PluginBridge-$(MPT_APPVEYOR_ARCH).pdb'
  77. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\PluginBridgeLegacy-$(MPT_APPVEYOR_ARCH).exe'
  78. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\PluginBridgeLegacy-$(MPT_APPVEYOR_ARCH).pdb'
  79. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\openmpt-wine-support.zip'
  80. - path: 'bin\release\$(MPT_APPVEYOR_VS)-$(MPT_APPVEYOR_TARGET)-static\$(MPT_APPVEYOR_ARCH)\updatesigntool.exe'
  81. -
  82. matrix:
  83. only:
  84. - job_name: Package
  85. before_build:
  86. - ps: |
  87. function Get-AppVeyorArtifacts
  88. {
  89. [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Low')]
  90. param(
  91. #The name of the account you wish to download artifacts from
  92. [parameter(Mandatory = $true)]
  93. [string]$Account,
  94. #The name of the project you wish to download artifacts from
  95. [parameter(Mandatory = $true)]
  96. [string]$Project,
  97. #Where to save the downloaded artifacts. Defaults to current directory.
  98. [alias("DownloadDirectory")][string]$Path = '.',
  99. [string]$Token,
  100. #Filter to a specific branch or project directory. You can specify Branch as either branch name ("master") or build version ("0.1.29")
  101. [string]$Branch,
  102. #If you have multiple build jobs, specify which job you wish to retrieve the artifacts from
  103. [string]$JobName,
  104. #Download all files into a single directory, do not preserve any hierarchy that might exist in the artifacts
  105. [switch]$Flat,
  106. [string]$Proxy,
  107. [switch]$ProxyUseDefaultCredentials,
  108. #URL of Appveyor API. You normally shouldn't need to change this.
  109. $apiUrl = 'https://ci.appveyor.com/api'
  110. )
  111. $headers = @{
  112. 'Content-type' = 'application/json'
  113. }
  114. if ($Token) {$headers.'Authorization' = "Bearer $token"}
  115. # Prepare proxy args to splat to Invoke-RestMethod
  116. $proxyArgs = @{}
  117. if (-not [string]::IsNullOrEmpty($proxy)) {
  118. $proxyArgs.Add('Proxy', $proxy)
  119. }
  120. if ($proxyUseDefaultCredentials.IsPresent) {
  121. $proxyArgs.Add('ProxyUseDefaultCredentials', $proxyUseDefaultCredentials)
  122. }
  123. $errorActionPreference = 'Stop'
  124. $projectURI = "$apiUrl/projects/$account/$project"
  125. if ($Branch) {$projectURI = $projectURI + "/branch/$Branch"}
  126. $projectObject = Invoke-RestMethod -Method Get -Uri $projectURI `
  127. -Headers $headers @proxyArgs
  128. if (-not $projectObject.build.jobs) {throw "No jobs found for this project or the project and/or account name was incorrectly specified"}
  129. if (($projectObject.build.jobs.count -gt 1) -and -not $jobName) {
  130. throw "Multiple Jobs found for the latest build. Please specify the -JobName paramter to select which job you want the artifacts for"
  131. }
  132. if ($JobName) {
  133. $jobid = ($projectObject.build.jobs | Where-Object name -eq "$JobName" | Select-Object -first 1).jobid
  134. if (-not $jobId) {throw "Unable to find a job named $JobName within the latest specified build. Did you spell it correctly?"}
  135. } else {
  136. $jobid = $projectObject.build.jobs[0].jobid
  137. }
  138. $artifacts = Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts" `
  139. -Headers $headers @proxyArgs
  140. $artifacts `
  141. | ? { $psCmdlet.ShouldProcess($_.fileName) } `
  142. | % {
  143. $type = $_.type
  144. $localArtifactPath = $_.fileName -split '/' | % { [Uri]::UnescapeDataString($_) }
  145. if ($flat.IsPresent) {
  146. $localArtifactPath = ($localArtifactPath | select -Last 1)
  147. } else {
  148. $localArtifactPath = $localArtifactPath -join [IO.Path]::DirectorySeparatorChar
  149. }
  150. $localArtifactPath = Join-Path $path $localArtifactPath
  151. $artifactUrl = "$apiUrl/buildjobs/$jobId/artifacts/$($_.fileName)"
  152. Write-Verbose "Downloading $artifactUrl to $localArtifactPath"
  153. $localArtifactPathParent = Split-Path -Path $localArtifactPath -Parent
  154. New-Item -Path $localArtifactPathParent -ItemType Directory -Force
  155. Invoke-RestMethod -Method Get -Uri $artifactUrl -OutFile $localArtifactPath -Headers $headers @proxyArgs
  156. New-Object PSObject -Property @{
  157. 'Source' = $artifactUrl
  158. 'Type' = $type
  159. 'Target' = $localArtifactPath
  160. }
  161. }
  162. }
  163. Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2019 Win10 x86'
  164. Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2019 Win10 amd64'
  165. Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2019 Win10 arm'
  166. Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2019 Win10 arm64'
  167. Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2019 Win7 x86'
  168. Get-AppVeyorArtifacts OpenMPT openmpt -Token $env:OPENMPT_APPVEYOR_API_TOKEN -JobName 'VS2019 Win7 amd64'
  169. build_script:
  170. - build\auto\build_openmpt_release_packages_multiarch.cmd auto
  171. - build\auto\build_openmpt_update_information.cmd auto
  172. - build\auto\package_openmpt_installer_multiarch_args.cmd vs2019 win10 Win32 Release 7z default
  173. after_build:
  174. - appveyor PushArtifact bin\openmpt-pkg.win-multi.tar
  175. test: off