azure-pipelines.yml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #-------------------------------------------------------------------------------------------------------
  2. # Copyright (c) 2021 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.NoJit:
  28. image_name: 'ubuntu-20.04'
  29. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  30. build_type: 'Debug'
  31. libtype_flag: '-DDISABLE_JIT=ON'
  32. Linux.ReleaseWithDebug:
  33. image_name: 'ubuntu-20.04'
  34. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  35. build_type: 'RelWithDebInfo'
  36. libtype_flag: ''
  37. Linux.Release:
  38. image_name: 'ubuntu-20.04'
  39. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  40. build_type: 'Release'
  41. libtype_flag: ''
  42. Ubuntu18.ReleaseWithDebug:
  43. image_name: 'ubuntu-18.04'
  44. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  45. build_type: 'RelWithDebInfo'
  46. libtype_flag: ''
  47. Ubuntu18.Release:
  48. image_name: 'ubuntu-18.04'
  49. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  50. build_type: 'Release'
  51. libtype_flag: ''
  52. OSX.DebugNoICU:
  53. image_name: 'macOS-latest'
  54. deps: 'brew install ninja'
  55. build_type: 'Debug'
  56. libtype_flag: '-DSTATIC_LIBRARY=ON'
  57. OSX.ReleaseWithDebug:
  58. image_name: 'macOS-latest'
  59. deps: 'brew install ninja icu4c'
  60. build_type: 'RelWithDebInfo'
  61. libtype_flag: '-DICU_INCLUDE_PATH=/usr/local/opt/icu4c/include'
  62. OSX.Release:
  63. image_name: 'macOS-latest'
  64. deps: 'brew install ninja icu4c'
  65. build_type: 'Release'
  66. libtype_flag: '-DICU_INCLUDE_PATH=/usr/local/opt/icu4c/include'
  67. pool:
  68. vmImage: $(image_name)
  69. steps:
  70. - script: $(deps)
  71. displayName: 'Install dependencies'
  72. - script: |
  73. mkdir -p build
  74. displayName: 'Create build directories'
  75. - script: |
  76. cd build
  77. cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $LIBTYPE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..
  78. displayName: CMake
  79. env:
  80. BUILD_TYPE: $(build_type)
  81. LIBTYPE: $(libtype_flag)
  82. - script: |
  83. cd build
  84. ninja
  85. displayName: 'Build'
  86. - script: |
  87. cd build
  88. ninja check
  89. displayName: 'Test'
  90. - job: MSVC
  91. timeoutInMinutes: 120
  92. strategy:
  93. maxParallel: 4
  94. matrix:
  95. x86.Debug:
  96. image_name: 'windows-2022'
  97. build_type: 'debug'
  98. target: 'x86'
  99. special_build: ''
  100. do_test: true
  101. test_tags: ''
  102. x86.Test:
  103. image_name: 'windows-2022'
  104. build_type: 'test'
  105. target: 'x86'
  106. special_build: ''
  107. do_test: true
  108. test_tags: '--include-slow'
  109. x86.NoJit:
  110. image_name: 'windows-2022'
  111. build_type: 'debug'
  112. target: 'x86'
  113. special_build: '"/p:BuildJIT=false"'
  114. do_test: true
  115. test_tags: '-disablejit'
  116. x86.Release:
  117. image_name: 'windows-2022'
  118. build_type: 'release'
  119. target: 'x86'
  120. special_build: ''
  121. do_test: false
  122. test_tags: ''
  123. x64.Debug:
  124. image_name: 'windows-2022'
  125. build_type: 'debug'
  126. target: 'x64'
  127. special_build: ''
  128. do_test: true
  129. test_tags: ''
  130. x64.Test:
  131. image_name: 'windows-2022'
  132. build_type: 'test'
  133. target: 'x64'
  134. special_build: ''
  135. do_test: true
  136. test_tags: '--include-slow'
  137. x64.Release:
  138. image_name: 'windows-2022'
  139. build_type: 'release'
  140. target: 'x64'
  141. special_build: ''
  142. do_test: false
  143. test_tags: ''
  144. win19.x86.Release:
  145. image_name: 'windows-2019'
  146. build_type: 'release'
  147. target: 'x86'
  148. special_build: ''
  149. do_test: false
  150. test_tags: ''
  151. win19.x64.Release:
  152. image_name: 'windows-2019'
  153. build_type: 'release'
  154. target: 'x64'
  155. special_build: ''
  156. do_test: false
  157. test_tags: ''
  158. pool:
  159. vmImage: $(image_name)
  160. steps:
  161. - script: test\ci.buildone.cmd %TARGET% %BUILD% %SPECIAL%
  162. displayName: 'Build'
  163. env:
  164. TARGET: $(target)
  165. BUILD: $(build_type)
  166. SPECIAL: $(special_build)
  167. - script: test\ci.testone.cmd %TARGET% %BUILD% %TEST_TAGS%
  168. displayName: 'Test'
  169. condition: eq(variables['do_test'], true)
  170. env:
  171. TARGET: $(target)
  172. BUILD: $(build_type)
  173. TEST_TAGS: ${test_tags}