azure-pipelines.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 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
  41. displayName: 'Linux 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-16.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. - script: ./test/run_vim_tests
  64. displayName: Run vim tests
  65. - bash: codecov --disable gcov --name '$(Agent.JobName)'
  66. displayName: Send coverage
  67. env:
  68. CODECOV_TOKEN: $(CODECOV_TOKEN)
  69. CODECOV_JOB_NAME: '$(Agent.JobName)'
  70. - job: macos
  71. displayName: 'macOS'
  72. pool:
  73. # List of available software on this image:
  74. # https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/macos/macos-10.13-Readme.md
  75. vmImage: 'macOS-10.13'
  76. strategy:
  77. matrix:
  78. 'Python 3.6':
  79. YCM_PYTHON_VERSION: '3.6.3'
  80. maxParallel: 2
  81. variables:
  82. COVERAGE: true
  83. steps:
  84. - checkout: self
  85. submodules: recursive
  86. - script: ./azure/macos/install_dependencies.sh
  87. displayName: Install dependencies
  88. - script: ./azure/run_tests.sh
  89. displayName: Run tests
  90. - script: ./azure/send_coverage.sh
  91. displayName: Send coverage
  92. env:
  93. CODECOV_TOKEN: $(CODECOV_TOKEN)
  94. CODECOV_JOB_NAME: '$(Agent.JobName)'
  95. - job: windows
  96. displayName: Windows
  97. pool:
  98. # List of available software on this image:
  99. # https://github.com/microsoft/azure-pipelines-image-generation/blob/master/images/win/Vs2019-Server2019-Readme.md
  100. vmImage: 'windows-2019'
  101. strategy:
  102. matrix:
  103. 'Python 3.7 32-bit':
  104. YCM_PYTHON_VERSION: '3.7'
  105. YCM_ARCH: x86
  106. 'Python 3.7 64-bit':
  107. YCM_PYTHON_VERSION: '3.7'
  108. YCM_ARCH: x64
  109. maxParallel: 3
  110. variables:
  111. COVERAGE: true
  112. steps:
  113. - checkout: self
  114. submodules: recursive
  115. # See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azure-devops
  116. # for a description of this task.
  117. - task: UsePythonVersion@0
  118. inputs:
  119. versionSpec: '$(YCM_PYTHON_VERSION)'
  120. architecture: '$(YCM_ARCH)'
  121. - script: pip install -r python/test_requirements.txt
  122. displayName: Install dependencies
  123. - script: python run_tests.py
  124. displayName: Run tests
  125. - script: codecov --name "$(Agent.JobName)"
  126. displayName: Send coverage
  127. env:
  128. CODECOV_TOKEN: $(CODECOV_TOKEN)