azure-pipelines.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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: jenkins/check_copyright.sh
  15. displayName: "Copyright Check"
  16. - script: jenkins/check_ascii.sh
  17. displayName: "Ascii Check"
  18. - script: jenkins/check_eol.sh
  19. displayName: "EOL Check"
  20. - script: jenkins/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-latest'
  29. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  30. build_type: 'Debug'
  31. do_test: true
  32. libtype_flag: ''
  33. Linux.ReleaseWithDebug:
  34. image_name: 'ubuntu-latest'
  35. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  36. build_type: 'RelWithDebInfo'
  37. do_test: true
  38. libtype_flag: ''
  39. Linux.Release:
  40. image_name: 'ubuntu-latest'
  41. deps: 'sudo apt-get install -y ninja-build clang libicu-dev'
  42. build_type: 'Release'
  43. do_test: false
  44. libtype_flag: ''
  45. OSX.noJit:
  46. image_name: 'macOS-latest'
  47. deps: 'brew install ninja icu4c'
  48. build_type: 'Debug'
  49. do_test: true
  50. libtype_flag: '-DSTATIC_LIBRARY=ON -DDISABLE_JIT=1'
  51. OSX.Debug:
  52. image_name: 'macOS-latest'
  53. deps: 'brew install ninja icu4c'
  54. build_type: 'Debug'
  55. do_test: true
  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. do_test: true
  62. libtype_flag: ''
  63. OSX.Release:
  64. image_name: 'macOS-latest'
  65. deps: 'brew install ninja icu4c'
  66. build_type: 'Release'
  67. do_test: false
  68. libtype_flag: ''
  69. pool:
  70. vmImage: $(image_name)
  71. steps:
  72. - script: $(deps)
  73. displayName: 'Install dependencies'
  74. - script: |
  75. mkdir -p build
  76. displayName: 'Create build directories'
  77. - script: |
  78. cd build
  79. cmake -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE $LIBTYPE -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang ..
  80. displayName: CMake
  81. env:
  82. BUILD_TYPE: $(build_type)
  83. LIBTYPE: $(libtype_flag)
  84. - script: |
  85. cd build
  86. ninja
  87. displayName: 'Build'
  88. - script: |
  89. cd build
  90. ninja check
  91. displayName: 'Test'
  92. condition: eq(variables['do_test'], true)
  93. - job: MSVC
  94. timeoutInMinutes: 120
  95. pool:
  96. vmImage: 'windows-latest'
  97. strategy:
  98. maxParallel: 4
  99. matrix:
  100. x86.Debug:
  101. build_type: 'debug'
  102. target: 'x86'
  103. do_test: true
  104. x86.Test:
  105. build_type: 'test'
  106. target: 'x86'
  107. do_test: true
  108. x86.Release:
  109. build_type: 'release'
  110. target: 'x86'
  111. do_test: false
  112. x64.Debug:
  113. build_type: 'debug'
  114. target: 'x64'
  115. do_test: true
  116. x64.Test:
  117. build_type: 'test'
  118. target: 'x64'
  119. do_test: true
  120. x64.Release:
  121. build_type: 'release'
  122. target: 'x64'
  123. do_test: false
  124. steps:
  125. - script: jenkins\buildone.cmd %TARGET% %BUILD%
  126. displayName: 'Build'
  127. env:
  128. TARGET: $(target)
  129. BUILD: $(build_type)
  130. - script: jenkins\testone.cmd %TARGET% %BUILD%
  131. displayName: 'Test'
  132. condition: eq(variables['do_test'], true)
  133. env:
  134. TARGET: $(target)
  135. BUILD: $(build_type)