azure-pipelines.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. trigger:
  2. - master
  3. - release/*
  4. jobs:
  5. - job: CMake
  6. timeoutInMinutes: 120
  7. strategy:
  8. maxParallel: 6
  9. matrix:
  10. Linux.Debug:
  11. image_name: 'ubuntu-latest'
  12. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  13. build_type: 'Debug'
  14. do_test: true
  15. libtype_flag: ''
  16. Linux.ReleaseWithDebug:
  17. image_name: 'ubuntu-latest'
  18. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  19. build_type: 'RelWithDebInfo'
  20. do_test: true
  21. libtype_flag: ''
  22. Linux.Release:
  23. image_name: 'ubuntu-latest'
  24. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  25. build_type: 'Release'
  26. do_test: false
  27. libtype_flag: ''
  28. OSX.Debug:
  29. image_name: 'macOS-latest'
  30. deps: 'brew install ninja icu4c'
  31. build_type: 'Debug'
  32. do_test: true
  33. libtype_flag: '-DSTATIC_LIBRARY=ON'
  34. OSX.ReleaseWithDebug:
  35. image_name: 'macOS-latest'
  36. deps: 'brew install ninja icu4c'
  37. build_type: 'RelWithDebInfo'
  38. do_test: true
  39. libtype_flag: ''
  40. OSX.Release:
  41. image_name: 'macOS-latest'
  42. deps: 'brew install ninja icu4c'
  43. build_type: 'Release'
  44. do_test: false
  45. libtype_flag: ''
  46. pool:
  47. vmImage: $(image_name)
  48. steps:
  49. - script: $(deps)
  50. displayName: 'Install dependencies'
  51. - script: |
  52. mkdir -p build
  53. displayName: 'Create build directories'
  54. - script: |
  55. cd build
  56. cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $LIBTYPE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..
  57. displayName: CMake
  58. env:
  59. BUILD_TYPE: $(build_type)
  60. LIBTYPE: $(libtype_flag)
  61. - script: |
  62. cd build
  63. ninja
  64. displayName: 'Build'
  65. - script: |
  66. cd build
  67. ninja check
  68. displayName: 'Test'
  69. condition: eq(variables['do_test'], true)
  70. - job: MSVC
  71. timeoutInMinutes: 120
  72. pool:
  73. vmImage: 'windows-latest'
  74. strategy:
  75. maxParallel: 4
  76. matrix:
  77. x86.Debug:
  78. build_type: 'debug'
  79. target: 'x86'
  80. do_test: true
  81. x86.Test:
  82. build_type: 'test'
  83. target: 'x86'
  84. do_test: true
  85. x86.Release:
  86. build_type: 'release'
  87. target: 'x86'
  88. do_test: false
  89. x64.Debug:
  90. build_type: 'debug'
  91. target: 'x64'
  92. do_test: true
  93. x64.Test:
  94. build_type: 'test'
  95. target: 'x64'
  96. do_test: true
  97. x64.Release:
  98. build_type: 'release'
  99. target: 'x64'
  100. do_test: false
  101. steps:
  102. - script: jenkins\buildone.cmd %TARGET% %BUILD%
  103. displayName: 'Build'
  104. env:
  105. TARGET: $(target)
  106. BUILD: $(build_type)
  107. - script: jenkins\testone.cmd %TARGET% %BUILD%
  108. displayName: 'Test'
  109. condition: eq(variables['do_test'], true)
  110. env:
  111. TARGET: $(target)
  112. BUILD: $(build_type)