azure-pipelines.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # A note about CODECOV_TOKEN
  2. #
  3. # To set the token for a specific Pipeline:
  4. # - navigate to codecov.io and log in
  5. # - click the github org, repo
  6. # - click settings
  7. # - copy the "Repository upload token"
  8. # - go to the pipeline in the Azure web ui, and click Edit
  9. # - Find the "Variables" button and click add
  10. # - Call it "CODECOV_TOKEN"
  11. # - Set the value to the repository upload token you got earlier
  12. jobs:
  13. - job: linux
  14. displayName: 'Linux'
  15. pool:
  16. # List of available software on this image:
  17. # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/linux/Ubuntu1604-README.md
  18. vmImage: 'ubuntu-18.04'
  19. strategy:
  20. matrix:
  21. 'Python 3.6':
  22. YCM_PYTHON_VERSION: '3.6.3'
  23. maxParallel: 2
  24. variables:
  25. COVERAGE: true
  26. # Cannot take advantage of the UsePythonVersion task because headers are
  27. # missing from the provided Python.
  28. steps:
  29. - checkout: self
  30. submodules: recursive
  31. - script: ./azure/linux/install_dependencies.sh
  32. displayName: Install dependencies
  33. - script: ./azure/run_tests.sh
  34. displayName: Run tests
  35. - script: ./azure/send_coverage.sh
  36. displayName: Send coverage
  37. env:
  38. CODECOV_TOKEN: $(CODECOV_TOKEN)
  39. CODECOV_JOB_NAME: '$(Agent.JobName)'
  40. - job: linuxvim_min
  41. displayName: 'Linux Earliest Vim tests'
  42. pool:
  43. # List of available software on this image:
  44. # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/linux/Ubuntu1604-README.md
  45. vmImage: 'ubuntu-18.04'
  46. strategy:
  47. matrix:
  48. 'Python 3.6':
  49. IMAGE: ycm-vim-py3
  50. PIP: pip3
  51. maxParallel: 2
  52. variables:
  53. COVERAGE: true
  54. YCM_TEST_STDOUT: true
  55. container: 'youcompleteme/$(IMAGE):test'
  56. steps:
  57. - checkout: self
  58. submodules: recursive
  59. - bash: sudo -H $(PIP) install -r python/test_requirements.txt
  60. displayName: Install dependencies
  61. - bash: python3 ./install.py --ts-completer --clangd-completer --java-completer
  62. displayName: Build ycmd
  63. # use the system vim - should be the minimal supported version
  64. - script: ./test/run_vim_tests --vim /usr/bin/vim
  65. displayName: Run vim tests
  66. - bash: codecov --disable gcov --name '$(Agent.JobName)'
  67. displayName: Send coverage
  68. env:
  69. CODECOV_TOKEN: $(CODECOV_TOKEN)
  70. CODECOV_JOB_NAME: '$(Agent.JobName)'
  71. - job: linuxvim
  72. displayName: 'Linux Recent Vim tests'
  73. pool:
  74. # List of available software on this image:
  75. # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/linux/Ubuntu1604-README.md
  76. vmImage: 'ubuntu-18.04'
  77. strategy:
  78. matrix:
  79. 'Python 3.6':
  80. IMAGE: ycm-vim-py3
  81. PIP: pip3
  82. maxParallel: 2
  83. variables:
  84. COVERAGE: true
  85. YCM_TEST_STDOUT: true
  86. container: 'youcompleteme/$(IMAGE):test'
  87. steps:
  88. - checkout: self
  89. submodules: recursive
  90. - bash: sudo -H $(PIP) install -r python/test_requirements.txt
  91. displayName: Install dependencies
  92. - bash: python3 ./install.py --ts-completer --clangd-completer --java-completer
  93. displayName: Build ycmd
  94. - script: ./test/run_vim_tests
  95. displayName: Run vim tests
  96. - bash: codecov --disable gcov --name '$(Agent.JobName)'
  97. displayName: Send coverage
  98. env:
  99. CODECOV_TOKEN: $(CODECOV_TOKEN)
  100. CODECOV_JOB_NAME: '$(Agent.JobName)'
  101. - job: macos
  102. displayName: 'macOS'
  103. pool:
  104. # List of available software on this image:
  105. # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/macos/macos-10.13-Readme.md
  106. vmImage: 'macOS-10.15'
  107. strategy:
  108. matrix:
  109. 'Python 3.6':
  110. YCM_PYTHON_VERSION: '3.6.3'
  111. maxParallel: 2
  112. variables:
  113. COVERAGE: true
  114. steps:
  115. - checkout: self
  116. submodules: recursive
  117. - script: ./azure/macos/install_dependencies.sh
  118. displayName: Install dependencies
  119. - script: ./azure/run_tests.sh
  120. displayName: Run tests
  121. - script: ./azure/send_coverage.sh
  122. displayName: Send coverage
  123. env:
  124. CODECOV_TOKEN: $(CODECOV_TOKEN)
  125. CODECOV_JOB_NAME: '$(Agent.JobName)'
  126. - job: windows
  127. displayName: Windows
  128. pool:
  129. # List of available software on this image:
  130. # https://github.com/microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2019-Server2019-Readme.md
  131. vmImage: 'windows-2019'
  132. strategy:
  133. matrix:
  134. 'Python 3.7 32-bit':
  135. YCM_PYTHON_VERSION: '3.7'
  136. YCM_ARCH: x86
  137. 'Python 3.7 64-bit':
  138. YCM_PYTHON_VERSION: '3.7'
  139. YCM_ARCH: x64
  140. maxParallel: 3
  141. variables:
  142. COVERAGE: true
  143. steps:
  144. - checkout: self
  145. submodules: recursive
  146. # See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azure-devops
  147. # for a description of this task.
  148. - task: UsePythonVersion@0
  149. inputs:
  150. versionSpec: '$(YCM_PYTHON_VERSION)'
  151. architecture: '$(YCM_ARCH)'
  152. - script: pip install -r python/test_requirements.txt
  153. displayName: Install dependencies
  154. - script: python run_tests.py
  155. displayName: Run tests
  156. - script: codecov --name "$(Agent.JobName)"
  157. displayName: Send coverage
  158. env:
  159. CODECOV_TOKEN: $(CODECOV_TOKEN)