appveyor.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. version: '{build}'
  2. os: Previous Visual Studio 2019
  3. configuration: Release
  4. platform: x86
  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 -> appveyor.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 /y mk\vcpkg\openal-soft\portfile.cmake C:\tools\vcpkg\ports\openal-soft\
  25. copy mk\cmake\x86-windows.cmake C:\tools\vcpkg\triplets\
  26. vcpkg install boost-asio:x86-windows
  27. vcpkg install boost-date-time:x86-windows
  28. vcpkg install boost-filesystem:x86-windows
  29. vcpkg install boost-format:x86-windows
  30. vcpkg install boost-locale:x86-windows
  31. vcpkg install boost-optional:x86-windows
  32. vcpkg install boost-system:x86-windows
  33. vcpkg install boost-uuid:x86-windows
  34. vcpkg remove curl:x86-windows
  35. vcpkg install curl:x86-windows
  36. vcpkg install --recurse freetype:x86-windows
  37. vcpkg install glew:x86-windows
  38. vcpkg install libogg:x86-windows
  39. vcpkg install libraqm:x86-windows
  40. vcpkg install libvorbis:x86-windows
  41. vcpkg install openal-soft:x86-windows
  42. vcpkg install sdl2:x86-windows
  43. vcpkg install sdl2-image[libjpeg-turbo]:x86-windows
  44. git submodule update --init --recursive
  45. echo Running cmake ..
  46. cmake -G "Visual Studio 16" -A Win32 -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%
  47. build:
  48. project: ALL_BUILD.vcxproj
  49. parallel: true
  50. verbosity: minimal
  51. after_build:
  52. - cmd: '"C:\Program Files (x86)\CMake\bin\cpack.exe"'
  53. test: off
  54. artifacts:
  55. - path: SuperTux-*
  56. name: setup
  57. deploy:
  58. - provider: GitHub
  59. description: 'SuperTux release'
  60. auth_token:
  61. secure: dsfeuV2aC3dINer3z3PdXnQF6AosFVRTp71hdsaGI+LbcTXfmkH0nmVfqH0Dznyv
  62. artifact: setup
  63. draft: true
  64. on:
  65. appveyor_repo_tag: true # deploy on tag push only
  66. - provider: S3
  67. access_key_id:
  68. secure: +cR4ZicEZHr0OiXAsitUhBL7PsqPzHQZb9q+IKK5P2o=
  69. secret_access_key:
  70. secure: Y3+rqowdiTkG3OgTUD1fb4mJzjb7jUKqCs3CKJuOy6WCHovLmw8ocemOsMyQ3WrR
  71. bucket: supertux-ci-downloads
  72. region: us-west-2
  73. artifact: setup
  74. folder: $(APPVEYOR_REPO_COMMIT)/appveyor/$(PLATFORM)/$(APPVEYOR_JOB_ID)/
  75. after_deploy:
  76. - ps: |
  77. Write-Output Get-FileHash SuperTux-*
  78. foreach ($path in get-ChildItem SuperTux-*) {
  79. $file = Get-Item $path;
  80. $url = "https://supertux-ci-downloads.s3-us-west-2.amazonaws.com/$($Env:APPVEYOR_REPO_COMMIT)/appveyor/$($Env:PLATFORM)/$($Env:APPVEYOR_JOB_ID)/$($file.Name)"
  81. $shasum = Get-FileHash $file -Algorithm SHA256
  82. $postParams = @{
  83. apikey=$Env:DOWNLOAD_APIKEY;
  84. size=$file.length;
  85. url=$url;
  86. branch=$Env:APPVEYOR_REPO_BRANCH;
  87. shasum = $shasum.Hash
  88. }
  89. Invoke-WebRequest -Uri https://download.supertux.org/submit.php -Method POST -Body $postParams
  90. }