appveyor.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. version: '{build}'
  2. os: Visual Studio 2015
  3. configuration: Release
  4. platform: x86
  5. environment:
  6. DOWNLOAD_APIKEY:
  7. secure: SEKmgfhiwujukYrr2xjqp63FEwvDUcoQOy7pCuYSyu+CTbGRRIzTbUCwwu4EPJmE
  8. branches:
  9. except:
  10. - coverity_scan # No need for Windows builds on that branch
  11. install:
  12. - ps: |
  13. Invoke-WebRequest https://download.supertux.org/builddep/dependencies-win32.zip -OutFile "$env:APPVEYOR_BUILD_FOLDER/dependencies.zip"
  14. Add-Type -assembly "system.io.compression.filesystem"
  15. [io.compression.zipfile]::ExtractToDirectory("$env:APPVEYOR_BUILD_FOLDER/dependencies.zip", "$env:APPVEYOR_BUILD_FOLDER/")
  16. before_build:
  17. - cmd: |
  18. git submodule update --init --recursive
  19. echo Running cmake ..
  20. cmake -G "Visual Studio 14 2015" -DCMAKE_INSTALL_PREFIX=%P% -DHAVE_SDL=true -DPACKAGE_VCREDIST=true
  21. build:
  22. project: ALL_BUILD.vcxproj
  23. parallel: true
  24. verbosity: minimal
  25. after_build:
  26. - cmd: '"C:\Program Files (x86)\CMake\bin\cpack.exe"'
  27. - ps: |
  28. Write-Output Get-FileHash SuperTux-*
  29. function transfer ($filename)
  30. {
  31. $file = Get-Item $filename;
  32. invoke-webrequest -method put -infile $file.FullName https://transfer.sh/$($file.Name)
  33. }
  34. if(-not $Env:APPVEYOR_PULL_REQUEST_NUMBER) {
  35. foreach ($path in get-ChildItem SuperTux-*) {
  36. $response = transfer($path)
  37. $url = $response.Content
  38. $file = Get-Item $path;
  39. $shasum = Get-FileHash $file -Algorithm SHA256
  40. $postParams = @{
  41. apikey=$Env:DOWNLOAD_APIKEY;
  42. size=$file.length;
  43. url=$url;
  44. branch=$Env:APPVEYOR_REPO_BRANCH;
  45. shasum = $shasum.Hash
  46. }
  47. Invoke-WebRequest -Uri https://download.supertux.org/submit.php -Method POST -Body $postParams
  48. }
  49. }
  50. test: off
  51. artifacts:
  52. - path: SuperTux-*
  53. name: setup
  54. deploy:
  55. - provider: GitHub
  56. description: 'SuperTux release'
  57. auth_token:
  58. secure: 1sgroG7ycKHC6R2y/V7DECd/SHxXK4CNSDU7zZOnAlyBiVKT9ykvRKWt2DGcEZDq
  59. artifact: setup
  60. draft: true
  61. on:
  62. branch: master # release from master branch only
  63. appveyor_repo_tag: true # deploy on tag push only
  64. #- provider: BinTray
  65. # username: maths22
  66. # api_key:
  67. # secure: 9miH0V65c10cbWfovqIfIHWsbyrg6jZDnaYxyGYHF5pyQbPnS+LcIX6Y/8gK2pM4
  68. # subject: supertux
  69. # repo: SuperTux-Nightly
  70. # package: win32
  71. # publish: true
  72. # override: true
  73. # on:
  74. # branch: master