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.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. pytest-asyncio semver typing-extensions
  22. displayName: Install Python deps
  23. - script: |
  24. echo Loading VS environment
  25. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 || exit 1
  26. echo Executing Build and Tests
  27. reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1
  28. python -u tools/ci.py -B download -T tools\msvc.jsonc || exit 1
  29. move _build\dds.exe _build\dds-win-x64.exe || exit 1
  30. displayName: Build and Test
  31. - publish: _build\dds-win-x64.exe
  32. displayName: Publish
  33. artifact: dds-win-x64
  34. - job: linux_gcc9
  35. displayName: Linux - GCC 9
  36. pool:
  37. vmImage: ubuntu-18.04
  38. steps:
  39. - script: make alpine-static-ci
  40. displayName: Build and Test
  41. - publish: _build/dds-linux-x64
  42. displayName: Publish
  43. artifact: dds-linux-x64
  44. - job: macos_gcc9
  45. displayName: macOS - GCC 9
  46. pool:
  47. vmImage: macOS-10.15
  48. steps:
  49. - script: brew install gcc@9 ccache
  50. displayName: Get GCC 9
  51. - script: brew install openssl@1.1
  52. displayName: Install OpenSSL
  53. - script: python3 -m pip install pytest pytest-xdist pytest-asyncio semver typing-extensions
  54. displayName: Get Python Dependencies
  55. - script: 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: and(succeeded(), eq(variables.shouldDeploy, 'true'))
  63. jobs:
  64. - job: deploy
  65. displayName: Deploy (${{variables['Build.SourceBranch']}})
  66. steps:
  67. - checkout: none
  68. - task: DownloadPipelineArtifact@2
  69. displayName: Download builds
  70. inputs:
  71. targetPath: art-dirs/
  72. - bash: |
  73. set -eu
  74. mkdir -p art/
  75. mv -- $(find art-dirs/ -type f) art/
  76. displayName: Rearrange
  77. - task: CopyFilesOverSSH@0
  78. displayName: Post builds
  79. inputs:
  80. sshEndpoint: dds.pizza
  81. sourceFolder: art/
  82. targetFolder: ${{ variables.deployDest }}
  83. failOnEmptySource: true
  84. overwrite: true