azure-pipelines.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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-16.04'
  19. strategy:
  20. matrix:
  21. 'Python 2.7':
  22. # Tests are failing on Python 2.7.0 with the exception
  23. # "TypeError: argument can't be <type 'unicode'>"
  24. YCM_PYTHON_VERSION: '2.7.1'
  25. 'Python 3.5':
  26. YCM_PYTHON_VERSION: '3.5.1'
  27. maxParallel: 2
  28. variables:
  29. COVERAGE: true
  30. # Cannot take advantage of the UsePythonVersion task because headers are
  31. # missing from the provided Python.
  32. steps:
  33. - checkout: self
  34. submodules: recursive
  35. - script: ./azure/linux/install_dependencies.sh
  36. displayName: Install dependencies
  37. - script: ./azure/run_tests.sh
  38. displayName: Run tests
  39. - script: ./azure/send_coverage.sh
  40. displayName: Send coverage
  41. env:
  42. CODECOV_TOKEN: $(CODECOV_TOKEN)
  43. CODECOV_JOB_NAME: '$(Agent.JobName)'
  44. - job: linuxvim
  45. displayName: 'Linux Vim tests'
  46. pool:
  47. # List of available software on this image:
  48. # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/linux/Ubuntu1604-README.md
  49. vmImage: 'ubuntu-16.04'
  50. strategy:
  51. matrix:
  52. 'Python 2.7':
  53. IMAGE: ycm-vim-py2
  54. PIP: pip
  55. 'Python 3.5':
  56. IMAGE: ycm-vim-py3
  57. PIP: pip3
  58. maxParallel: 2
  59. variables:
  60. COVERAGE: true
  61. YCM_TEST_STDOUT: true
  62. container: 'youcompleteme/$(IMAGE):test'
  63. steps:
  64. - checkout: self
  65. submodules: recursive
  66. - bash: sudo -H $(PIP) install -r python/test_requirements.txt
  67. displayName: Install dependencies
  68. - bash: python3 ./install.py --clangd-completer
  69. displayName: Build ycmd
  70. - script: ./test/run_vim_tests
  71. displayName: Run vim tests
  72. - bash: codecov --disable gcov --name '$(Agent.JobName)'
  73. displayName: Send coverage
  74. env:
  75. CODECOV_TOKEN: $(CODECOV_TOKEN)
  76. CODECOV_JOB_NAME: '$(Agent.JobName)'
  77. - job: macos
  78. displayName: 'macOS'
  79. pool:
  80. # List of available software on this image:
  81. # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/macos/macos-10.13-Readme.md
  82. vmImage: 'macOS-10.13'
  83. strategy:
  84. matrix:
  85. 'Python 2.7':
  86. # Prior versions fail to compile with error "ld: library not found for
  87. # -lSystemStubs"
  88. YCM_PYTHON_VERSION: '2.7.2'
  89. 'Python 3.5':
  90. YCM_PYTHON_VERSION: '3.5.1'
  91. maxParallel: 2
  92. variables:
  93. COVERAGE: true
  94. steps:
  95. - checkout: self
  96. submodules: recursive
  97. - script: ./azure/macos/install_dependencies.sh
  98. displayName: Install dependencies
  99. - script: ./azure/run_tests.sh
  100. displayName: Run tests
  101. - script: ./azure/send_coverage.sh
  102. displayName: Send coverage
  103. env:
  104. CODECOV_TOKEN: $(CODECOV_TOKEN)
  105. CODECOV_JOB_NAME: '$(Agent.JobName)'
  106. - job: windows
  107. displayName: Windows
  108. pool:
  109. # List of available software on this image:
  110. # https://github.com/microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2019-Server2019-Readme.md
  111. vmImage: 'windows-2019'
  112. strategy:
  113. matrix:
  114. # We only test Python 2.7 on 64-bit.
  115. 'Python 2.7 64-bit':
  116. YCM_PYTHON_VERSION: '2.7'
  117. YCM_ARCH: x64
  118. 'Python 3.7 32-bit':
  119. YCM_PYTHON_VERSION: '3.7'
  120. YCM_ARCH: x86
  121. 'Python 3.7 64-bit':
  122. YCM_PYTHON_VERSION: '3.7'
  123. YCM_ARCH: x64
  124. maxParallel: 3
  125. variables:
  126. COVERAGE: true
  127. steps:
  128. - checkout: self
  129. submodules: recursive
  130. # See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azure-devops
  131. # for a description of this task.
  132. - task: UsePythonVersion@0
  133. inputs:
  134. versionSpec: '$(YCM_PYTHON_VERSION)'
  135. architecture: '$(YCM_ARCH)'
  136. - script: pip install -r python/test_requirements.txt
  137. displayName: Install dependencies
  138. - script: python run_tests.py
  139. displayName: Run tests
  140. - script: codecov --name "$(Agent.JobName)"
  141. displayName: Send coverage
  142. env:
  143. CODECOV_TOKEN: $(CODECOV_TOKEN)