No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

86 líneas
2.8KB

  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('~/{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. - script: |
  19. echo Loading VS environment
  20. call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 || exit 1
  21. echo Executing Build and Tests
  22. reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1
  23. python -m pip install pytest pytest-xdist || exit 1
  24. python -u tools/ci.py -B download -T tools\msvc.jsonc || exit 1
  25. move _build\dds.exe _build\dds-win-x64.exe || exit 1
  26. displayName: Build and Test
  27. - publish: _build\dds-win-x64.exe
  28. displayName: Publish
  29. artifact: dds-win-x64
  30. - job: linux_gcc9
  31. displayName: Linux - GCC 9
  32. pool:
  33. vmImage: ubuntu-18.04
  34. steps:
  35. - script: |
  36. set -eu
  37. sudo apt update -y
  38. sudo apt install -y python3-minimal g++-9 ccache
  39. python3 -m pip install pytest pytest-xdist
  40. displayName: Prepare System
  41. - script: make linux-ci
  42. displayName: Build and Test
  43. - publish: _build/dds-linux-x64
  44. displayName: Publish
  45. artifact: dds-linux-x64
  46. - job: macos_gcc9
  47. displayName: macOS - GCC 9
  48. pool:
  49. vmImage: macOS-10.14
  50. steps:
  51. - script: brew install gcc@9 ccache
  52. displayName: Prepare System
  53. - script: |
  54. set -eu
  55. python3 -m pip install pytest pytest-xdist
  56. make macos-ci
  57. displayName: Build and Test
  58. - publish: _build/dds-macos-x64
  59. displayName: Publish
  60. artifact: dds-macos-x64
  61. - stage: deploy_build
  62. displayName: Deploy
  63. condition: and(succeeded(), eq(variables.shouldDeploy, 'true'))
  64. jobs:
  65. - job: deploy
  66. displayName: Deploy (${{variables['Build.SourceBranch']}})
  67. steps:
  68. - checkout: none
  69. - task: DownloadPipelineArtifact@2
  70. displayName: Download builds
  71. inputs:
  72. targetPath: art/
  73. - task: CopyFilesOverSSH@0
  74. displayName: Post builds
  75. inputs:
  76. sshEndpoint: dds.pizza
  77. sourceFolder: art/
  78. targetFolder: ${{ variables.deployDest }}
  79. failOnEmptySource: true
  80. overwrite: true