appveyor64.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. version: '{build}'
  2. os: Visual Studio 2019
  3. configuration: Release
  4. platform: x64
  5. environment:
  6. DOWNLOAD_APIKEY:
  7. secure: SEKmgfhiwujukYrr2xjqp63FEwvDUcoQOy7pCuYSyu+CTbGRRIzTbUCwwu4EPJmE
  8. APPVEYOR_SAVE_CACHE_ON_ERROR: true
  9. branches:
  10. except:
  11. - coverity_scan # No need for Windows builds on that branch
  12. skip_commits:
  13. message: /\[(skip ci)|(ci skip)\]/
  14. cache: c:\tools\vcpkg\installed -> appveyor64.yml
  15. install:
  16. - cd C:\Tools\vcpkg
  17. - git pull
  18. - .\bootstrap-vcpkg.bat
  19. - cd %APPVEYOR_BUILD_FOLDER%
  20. before_build:
  21. - cmd: |
  22. echo Installing dependencies...
  23. vcpkg integrate install
  24. copy mk\cmake\x64-windows.cmake C:\tools\vcpkg\triplets\
  25. vcpkg install boost-date-time:x64-windows
  26. vcpkg install boost-filesystem:x64-windows
  27. vcpkg install boost-format:x64-windows
  28. vcpkg install boost-locale:x64-windows
  29. vcpkg install boost-optional:x64-windows
  30. vcpkg install boost-system:x64-windows
  31. vcpkg install curl:x64-windows
  32. vcpkg install --recurse freetype:x64-windows
  33. vcpkg install glew:x64-windows
  34. vcpkg install libogg:x64-windows
  35. vcpkg install libraqm:x64-windows
  36. vcpkg install libvorbis:x64-windows
  37. vcpkg install openal-soft:x64-windows
  38. vcpkg install sdl2:x64-windows
  39. vcpkg install sdl2-image[libjpeg-turbo]:x64-windows
  40. git submodule update --init --recursive
  41. echo Running cmake ..
  42. cmake -G "Visual Studio 16 2019" -A x64 -DVCPKG_BUILD=ON -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=%P% -DHAVE_SDL=true -DPACKAGE_VCREDIST=true %APPVEYOR_BUILD_FOLDER%
  43. build:
  44. project: ALL_BUILD.vcxproj
  45. parallel: true
  46. verbosity: minimal
  47. after_build:
  48. - cmd: '"C:\Program Files (x86)\CMake\bin\cpack.exe"'
  49. test: off
  50. artifacts:
  51. - path: SuperTux-*
  52. name: setup
  53. deploy:
  54. - provider: GitHub
  55. description: 'SuperTux release'
  56. auth_token:
  57. secure: dsfeuV2aC3dINer3z3PdXnQF6AosFVRTp71hdsaGI+LbcTXfmkH0nmVfqH0Dznyv
  58. artifact: setup
  59. draft: true
  60. on:
  61. appveyor_repo_tag: true # deploy on tag push only
  62. - provider: S3
  63. access_key_id:
  64. secure: +cR4ZicEZHr0OiXAsitUhBL7PsqPzHQZb9q+IKK5P2o=
  65. secret_access_key:
  66. secure: Y3+rqowdiTkG3OgTUD1fb4mJzjb7jUKqCs3CKJuOy6WCHovLmw8ocemOsMyQ3WrR
  67. bucket: supertux-ci-downloads
  68. region: us-west-2
  69. artifact: setup
  70. folder: $(APPVEYOR_REPO_COMMIT)/appveyor/$(PLATFORM)/$(APPVEYOR_JOB_ID)/
  71. after_deploy:
  72. - ps: |
  73. Write-Output Get-FileHash SuperTux-*
  74. foreach ($path in get-ChildItem SuperTux-*) {
  75. $file = Get-Item $path;
  76. $url = "https://supertux-ci-downloads.s3-us-west-2.amazonaws.com/$($Env:APPVEYOR_REPO_COMMIT)/appveyor/$($Env:PLATFORM)/$($Env:APPVEYOR_JOB_ID)/$($file.Name)"
  77. $shasum = Get-FileHash $file -Algorithm SHA256
  78. $postParams = @{
  79. apikey=$Env:DOWNLOAD_APIKEY;
  80. size=$file.length;
  81. url=$url;
  82. branch=$Env:APPVEYOR_REPO_BRANCH;
  83. shasum = $shasum.Hash
  84. }
  85. Invoke-WebRequest -Uri https://download.supertux.org/submit.php -Method POST -Body $postParams
  86. }