Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

89 Zeilen
3.0KB

  1. # Refer: https://aka.ms/yaml
  2. variables:
  3. shouldDeploy: >-
  4. ${{ or(
  5. eq(variables['Build.SourceBranch'], 'refs/heads/develop'),
  6. eq(variables['Build.SourceBranch'], 'refs/heads/master')
  7. ) }}
  8. deployDest: ${{ format('~/web/{0}/', variables['Build.SourceBranchName']) }}
  9. stages:
  10. - stage: build_test
  11. displayName: Build and Test
  12. jobs:
  13. - job: win_vs2019
  14. displayName: Windows - VS 2019
  15. pool:
  16. vmImage: windows-2019
  17. steps:
  18. - pwsh: tools\get-win-openssl.ps1
  19. displayName: Get OpenSSL for Windows
  20. - script: python -m pip install pytest pytest-xdist
  21. displayName: Install Python deps
  22. - script: |
  23. echo Loading VS environment
  24. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 || exit 1
  25. echo Executing Build and Tests
  26. reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1
  27. python -u tools/ci.py -B download -T tools\msvc.jsonc || exit 1
  28. move _build\dds.exe _build\dds-win-x64.exe || exit 1
  29. displayName: Build and Test
  30. - publish: _build\dds-win-x64.exe
  31. displayName: Publish
  32. artifact: dds-win-x64
  33. - job: linux_gcc9
  34. displayName: Linux - GCC 9
  35. pool:
  36. vmImage: ubuntu-18.04
  37. steps:
  38. - script: make alpine-static-ci
  39. displayName: Build and Test
  40. - publish: _build/dds-linux-x64
  41. displayName: Publish
  42. artifact: dds-linux-x64
  43. - job: macos_gcc9
  44. displayName: macOS - GCC 9
  45. pool:
  46. vmImage: macOS-10.15
  47. steps:
  48. - script: brew install gcc@9 ccache
  49. displayName: Get GCC 9
  50. - script: brew install openssl@1.1
  51. displayName: Install OpenSSL
  52. - script: python3 -m pip install pytest pytest-xdist
  53. displayName: Get Python Dependencies
  54. - script: make macos-ci
  55. displayName: Build and Test
  56. - publish: _build/dds-macos-x64
  57. displayName: Publish
  58. artifact: dds-macos-x64
  59. - stage: deploy_build
  60. displayName: Deploy
  61. condition: and(succeeded(), eq(variables.shouldDeploy, 'true'))
  62. jobs:
  63. - job: deploy
  64. displayName: Deploy (${{variables['Build.SourceBranch']}})
  65. steps:
  66. - checkout: none
  67. - task: DownloadPipelineArtifact@2
  68. displayName: Download builds
  69. inputs:
  70. targetPath: art-dirs/
  71. - bash: |
  72. set -eu
  73. mkdir -p art/
  74. mv -- $(find art-dirs/ -type f) art/
  75. displayName: Rearrange
  76. - task: CopyFilesOverSSH@0
  77. displayName: Post builds
  78. inputs:
  79. sshEndpoint: dds.pizza
  80. sourceFolder: art/
  81. targetFolder: ${{ variables.deployDest }}
  82. failOnEmptySource: true
  83. overwrite: true