azure-pipelines.yml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. #-------------------------------------------------------------------------------------------------------
  2. # Copyright (c) ChakraCore Project Contributors. All rights reserved.
  3. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. #-------------------------------------------------------------------------------------------------------
  5. trigger:
  6. - master
  7. - release/*
  8. jobs:
  9. - job: Style
  10. timeoutInMinutes: 10
  11. pool:
  12. vmImage: 'ubuntu-latest'
  13. steps:
  14. - script: tools/StyleChecks/check_copyright.sh
  15. displayName: "Copyright Check"
  16. - script: tools/StyleChecks/check_ascii.sh
  17. displayName: "Ascii Check"
  18. - script: tools/StyleChecks/check_eol.sh
  19. displayName: "EOL Check"
  20. - script: tools/StyleChecks/check_tabs.sh
  21. displayName: "Tab Check"
  22. - job: CMake
  23. timeoutInMinutes: 120
  24. strategy:
  25. maxParallel: 6
  26. matrix:
  27. Linux.Debug:
  28. image_name: 'ubuntu-22.04'
  29. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  30. build_type: 'Debug'
  31. libtype_flag: ''
  32. Linux.NoJit:
  33. image_name: 'ubuntu-22.04'
  34. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  35. build_type: 'Debug'
  36. libtype_flag: '-DDISABLE_JIT=ON'
  37. Linux.ReleaseWithDebug:
  38. image_name: 'ubuntu-22.04'
  39. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  40. build_type: 'RelWithDebInfo'
  41. libtype_flag: ''
  42. Linux.Release:
  43. image_name: 'ubuntu-22.04'
  44. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  45. build_type: 'Release'
  46. libtype_flag: ''
  47. Ubuntu20.ReleaseWithDebug:
  48. image_name: 'ubuntu-20.04'
  49. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  50. build_type: 'RelWithDebInfo'
  51. libtype_flag: ''
  52. Ubuntu20.Release:
  53. image_name: 'ubuntu-20.04'
  54. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  55. build_type: 'Release'
  56. libtype_flag: ''
  57. OSX.DebugNoICU:
  58. image_name: 'macOS-latest'
  59. deps: 'brew install ninja'
  60. build_type: 'Debug'
  61. libtype_flag: '-DSTATIC_LIBRARY=ON'
  62. OSX.ReleaseWithDebug:
  63. image_name: 'macOS-latest'
  64. deps: 'brew install ninja icu4c'
  65. build_type: 'RelWithDebInfo'
  66. libtype_flag: '-DICU_INCLUDE_PATH=/usr/local/opt/icu4c/include'
  67. OSX.Release:
  68. image_name: 'macOS-latest'
  69. deps: 'brew install ninja icu4c'
  70. build_type: 'Release'
  71. libtype_flag: '-DICU_INCLUDE_PATH=/usr/local/opt/icu4c/include'
  72. pool:
  73. vmImage: $(image_name)
  74. steps:
  75. - script: $(deps)
  76. displayName: 'Install dependencies'
  77. - script: |
  78. mkdir -p build
  79. displayName: 'Create build directories'
  80. - script: |
  81. cd build
  82. cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $LIBTYPE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..
  83. displayName: CMake
  84. env:
  85. BUILD_TYPE: $(build_type)
  86. LIBTYPE: $(libtype_flag)
  87. - script: |
  88. cd build
  89. ninja
  90. displayName: 'Build'
  91. - publish: $(System.DefaultWorkingDirectory)/build/bin
  92. artifact: $(Agent.JobName)
  93. - script: |
  94. cd build
  95. ninja check
  96. displayName: 'Test'
  97. - job: MSVC
  98. timeoutInMinutes: 120
  99. strategy:
  100. maxParallel: 4
  101. matrix:
  102. x86.Debug:
  103. image_name: 'windows-2022'
  104. build_type: 'debug'
  105. target: 'x86'
  106. special_build: ''
  107. do_test: true
  108. test_tags: ''
  109. build_outdir_suffix: ''
  110. x86.Test:
  111. image_name: 'windows-2022'
  112. build_type: 'test'
  113. target: 'x86'
  114. special_build: ''
  115. do_test: true
  116. test_tags: '--include-slow'
  117. build_outdir_suffix: ''
  118. x86.NoJit:
  119. image_name: 'windows-2022'
  120. build_type: 'debug'
  121. target: 'x86'
  122. special_build: '"/p:BuildJIT=false"'
  123. do_test: true
  124. test_tags: '-disablejit'
  125. build_outdir_suffix: '.NoJIT'
  126. x86.Release:
  127. image_name: 'windows-2022'
  128. build_type: 'release'
  129. target: 'x86'
  130. special_build: ''
  131. do_test: false
  132. test_tags: ''
  133. build_outdir_suffix: ''
  134. x64.Debug:
  135. image_name: 'windows-2022'
  136. build_type: 'debug'
  137. target: 'x64'
  138. special_build: ''
  139. do_test: true
  140. test_tags: ''
  141. build_outdir_suffix: ''
  142. x64.Test:
  143. image_name: 'windows-2022'
  144. build_type: 'test'
  145. target: 'x64'
  146. special_build: ''
  147. do_test: true
  148. test_tags: '--include-slow'
  149. build_outdir_suffix: ''
  150. x64.Release:
  151. image_name: 'windows-2022'
  152. build_type: 'release'
  153. target: 'x64'
  154. special_build: ''
  155. do_test: false
  156. test_tags: ''
  157. build_outdir_suffix: ''
  158. win19.x86.Release:
  159. image_name: 'windows-2019'
  160. build_type: 'release'
  161. target: 'x86'
  162. special_build: ''
  163. do_test: false
  164. test_tags: ''
  165. build_outdir_suffix: ''
  166. win19.x64.Release:
  167. image_name: 'windows-2019'
  168. build_type: 'release'
  169. target: 'x64'
  170. special_build: ''
  171. do_test: false
  172. test_tags: ''
  173. build_outdir_suffix: ''
  174. pool:
  175. vmImage: $(image_name)
  176. steps:
  177. - script: test\ci.buildone.cmd %TARGET% %BUILD% %SPECIAL%
  178. displayName: 'Build'
  179. env:
  180. TARGET: $(target)
  181. BUILD: $(build_type)
  182. SPECIAL: $(special_build)
  183. - publish: $(System.DefaultWorkingDirectory)/Build/VcBuild$(build_outdir_suffix)/bin
  184. artifact: $(Agent.JobName)
  185. - script: test\ci.testone.cmd %TARGET% %BUILD% %TEST_TAGS%
  186. displayName: 'Test'
  187. condition: eq(variables['do_test'], true)
  188. env:
  189. TARGET: $(target)
  190. BUILD: $(build_type)
  191. TEST_TAGS: ${test_tags}