azure-pipelines.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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.13'
  25. 'Python 3.5':
  26. YCM_PYTHON_VERSION: '3.5.3'
  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 --ts-completer --clangd-completer --java-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. YCM_PYTHON_VERSION: '2.7.13'
  87. 'Python 3.5':
  88. YCM_PYTHON_VERSION: '3.5.3'
  89. maxParallel: 2
  90. variables:
  91. COVERAGE: true
  92. steps:
  93. - checkout: self
  94. submodules: recursive
  95. - script: ./azure/macos/install_dependencies.sh
  96. displayName: Install dependencies
  97. - script: ./azure/run_tests.sh
  98. displayName: Run tests
  99. - script: ./azure/send_coverage.sh
  100. displayName: Send coverage
  101. env:
  102. CODECOV_TOKEN: $(CODECOV_TOKEN)
  103. CODECOV_JOB_NAME: '$(Agent.JobName)'
  104. - job: windows
  105. displayName: Windows
  106. pool:
  107. # List of available software on this image:
  108. # https://github.com/microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2019-Server2019-Readme.md
  109. vmImage: 'windows-2019'
  110. strategy:
  111. matrix:
  112. # We only test Python 2.7 on 64-bit.
  113. 'Python 2.7 64-bit':
  114. YCM_PYTHON_VERSION: '2.7'
  115. YCM_ARCH: x64
  116. 'Python 3.7 32-bit':
  117. YCM_PYTHON_VERSION: '3.7'
  118. YCM_ARCH: x86
  119. 'Python 3.7 64-bit':
  120. YCM_PYTHON_VERSION: '3.7'
  121. YCM_ARCH: x64
  122. maxParallel: 3
  123. variables:
  124. COVERAGE: true
  125. steps:
  126. - checkout: self
  127. submodules: recursive
  128. # See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azure-devops
  129. # for a description of this task.
  130. - task: UsePythonVersion@0
  131. inputs:
  132. versionSpec: '$(YCM_PYTHON_VERSION)'
  133. architecture: '$(YCM_ARCH)'
  134. - script: pip install -r python/test_requirements.txt
  135. displayName: Install dependencies
  136. - script: python run_tests.py
  137. displayName: Run tests
  138. - script: codecov --name "$(Agent.JobName)"
  139. displayName: Send coverage
  140. env:
  141. CODECOV_TOKEN: $(CODECOV_TOKEN)