azure-pipelines.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. pool:
  93. vmImage: 'windows-latest'
  94. strategy:
  95. maxParallel: 4
  96. matrix:
  97. x86.Debug:
  98. build_type: 'debug'
  99. target: 'x86'
  100. special_build: ''
  101. do_test: true
  102. test_tags: ''
  103. x86.Test:
  104. build_type: 'test'
  105. target: 'x86'
  106. special_build: ''
  107. do_test: true
  108. test_tags: '--include-slow'
  109. x86.NoJit:
  110. build_type: 'debug'
  111. target: 'x86'
  112. special_build: '"/p:BuildJIT=false"'
  113. do_test: true
  114. test_tags: '-disablejit'
  115. x86.Release:
  116. build_type: 'release'
  117. target: 'x86'
  118. special_build: ''
  119. do_test: false
  120. test_tags: ''
  121. x64.Debug:
  122. build_type: 'debug'
  123. target: 'x64'
  124. special_build: ''
  125. do_test: true
  126. test_tags: ''
  127. x64.Test:
  128. build_type: 'test'
  129. target: 'x64'
  130. special_build: ''
  131. do_test: true
  132. test_tags: '--include-slow'
  133. x64.Release:
  134. build_type: 'release'
  135. target: 'x64'
  136. special_build: ''
  137. do_test: false
  138. test_tags: ''
  139. steps:
  140. - script: test\ci.buildone.cmd %TARGET% %BUILD% %SPECIAL%
  141. displayName: 'Build'
  142. env:
  143. TARGET: $(target)
  144. BUILD: $(build_type)
  145. SPECIAL: $(special_build)
  146. - script: test\ci.testone.cmd %TARGET% %BUILD% %TEST_TAGS%
  147. displayName: 'Test'
  148. condition: eq(variables['do_test'], true)
  149. env:
  150. TARGET: $(target)
  151. BUILD: $(build_type)
  152. TEST_TAGS: ${test_tags}