You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

azure-pipelines.yml 3.4KB

5 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. stages:
  9. - stage: build_test
  10. displayName: Build and Test
  11. jobs:
  12. - job: win_vs2019
  13. displayName: Windows - VS 2019
  14. pool:
  15. vmImage: windows-2019
  16. steps:
  17. - script: |
  18. echo Loading VS environment
  19. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 || exit 1
  20. echo Executing Build and Tests
  21. reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1
  22. python -m pip install pytest pytest-xdist || exit 1
  23. python -u tools/ci.py -B download -T tools\msvc.jsonc -T2 tools\msvc.next.jsonc || exit 1
  24. move _build\dds.exe _build\dds-win-x64.exe || exit 1
  25. displayName: Build and Test
  26. - publish: _build\dds-win-x64.exe
  27. displayName: Publish
  28. artifact: dds-win-x64
  29. - job: linux_gcc9
  30. displayName: Linux - GCC 9
  31. pool:
  32. vmImage: ubuntu-18.04
  33. steps:
  34. - script: |
  35. set -eu
  36. sudo apt update -y
  37. sudo apt install -y python3-minimal g++-9 ccache
  38. python3 -m pip install pytest pytest-xdist
  39. displayName: Prepare System
  40. - script: make linux-ci
  41. displayName: Build and Test
  42. - publish: _build/dds-linux-x64
  43. displayName: Publish
  44. artifact: dds-linux-x64
  45. - job: macos_gcc9
  46. displayName: macOS - GCC 9
  47. pool:
  48. vmImage: macOS-10.14
  49. steps:
  50. - script: brew install gcc@9 ccache
  51. displayName: Prepare System
  52. - script: |
  53. set -eu
  54. python3 -m pip install pytest pytest-xdist
  55. make macos-ci
  56. displayName: Build and Test
  57. - publish: _build/dds-macos-x64
  58. displayName: Publish
  59. artifact: dds-macos-x64
  60. - stage: deploy_build
  61. displayName: Deploy
  62. condition: eq(variables.shouldDeploy, true)
  63. jobs:
  64. - job: deploy
  65. displayName: Deploy for ${{variables.Build.SourceBranchName}}
  66. condition: succeeded()
  67. steps:
  68. - task: DownloadPipelineArtifact@2
  69. displayName: Download builds
  70. inputs:
  71. targetPath: art/
  72. - task: CopyFilesOverSSH@0
  73. displayName: Post builds
  74. inputs:
  75. sshEndpoint: dds.pizza
  76. sourceFolder: art/
  77. targetFolder: ~/${{variables.Build.SourceBranchName}}/
  78. failOnEmptySource: true
  79. overwrite: true
  80. # - job: deploy
  81. # displayName: Deploy Canary
  82. # # Only deploy the "canary" build when we are on the 'develop' branch
  83. # condition: and(succeeded(), eq(variables.Build.SourceBranchName, 'develop'))
  84. # steps:
  85. # - task: DownloadPipelineArtifact@2
  86. # displayName: Download builds
  87. # inputs:
  88. # targetPath: art/
  89. # - task: CopyFilesOverSSH@0
  90. # displayName: Post builds
  91. # inputs:
  92. # sshEndpoint: dds.pizza
  93. # sourceFolder: art/
  94. # targetFolder: ~/canary/
  95. # failOnEmptySource: true
  96. # overwrite: true