appveyor.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. version: '{build}-{branch}'
  2. image: Visual Studio 2019
  3. branches:
  4. only:
  5. - master
  6. clone_depth: 1
  7. init:
  8. - ps: |
  9. function craft() {
  10. cmd /C "echo %PATH%"
  11. & "C:\Python39-x64\python.exe" "C:\CraftMaster\CraftMaster\CraftMaster.py" --config "$env:APPVEYOR_BUILD_FOLDER\appveyor.ini" --variables "APPVEYOR_BUILD_FOLDER=$env:APPVEYOR_BUILD_FOLDER" --target $env:TARGET -c $args
  12. if($LASTEXITCODE -ne 0) {exit $LASTEXITCODE}
  13. }
  14. function crafttests() {
  15. cmd /C "echo %PATH%"
  16. & "C:\Python39-x64\python.exe" "C:\CraftMaster\CraftMaster\CraftMaster.py" --config "$env:APPVEYOR_BUILD_FOLDER\appveyor.ini" --variables "APPVEYOR_BUILD_FOLDER=$env:APPVEYOR_BUILD_FOLDER" --target $env:TARGET -c $args
  17. }
  18. install:
  19. - ps: |
  20. #use cmd to silence powershell behaviour for stderr
  21. & cmd /C "git clone -q --depth=1 https://invent.kde.org/packaging/craftmaster.git C:\CraftMaster\CraftMaster 2>&1"
  22. craft --add-blueprint-repository [git]https://github.com/nextcloud/desktop-client-blueprints.git
  23. craft craft
  24. craft --install-deps nextcloud-client
  25. craft nsis
  26. build_script:
  27. - ps: |
  28. craft --src-dir $env:APPVEYOR_BUILD_FOLDER nextcloud-client
  29. craft --package --src-dir $env:APPVEYOR_BUILD_FOLDER nextcloud-client
  30. cp C:\CraftMaster\windows-msvc2019_64-cl\tmp\*.7z $env:APPVEYOR_BUILD_FOLDER
  31. cp C:\CraftMaster\windows-msvc2019_64-cl\tmp\*.exe $env:APPVEYOR_BUILD_FOLDER
  32. test_script:
  33. - ps: |
  34. crafttests --test --src-dir $env:APPVEYOR_BUILD_FOLDER nextcloud-client
  35. environment:
  36. matrix:
  37. - TARGET: windows-msvc2019_64-cl
  38. artifacts:
  39. - path: '*.7z'
  40. - path: '*.exe'