azure-pipelines.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. trigger:
  2. batch: true
  3. branches:
  4. include:
  5. - master
  6. pr: none
  7. jobs:
  8. - template: azure-pipelines.template.yml
  9. parameters:
  10. name: linux
  11. vmImage: 'ubuntu-16.04'
  12. - template: azure-pipelines.template.yml
  13. parameters:
  14. name: windows
  15. vmImage: 'vs2017-win2016'
  16. - template: azure-pipelines.template.yml
  17. parameters:
  18. name: macos
  19. vmImage: 'macOS-10.13'
  20. - job: linux_coverage
  21. dependsOn: linux
  22. condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
  23. timeoutInMinutes: 30
  24. pool:
  25. vmImage: 'Ubuntu 16.04'
  26. variables:
  27. GOPATH: '$(system.defaultWorkingDirectory)'
  28. CODECOV_TOKEN: '$(coverage.token)'
  29. steps:
  30. - checkout: none
  31. - task: GoTool@0
  32. inputs:
  33. version: '1.11.5'
  34. - script: |
  35. go version
  36. go get -v -t -d v2ray.com/core/...
  37. go get -v -t -d v2ray.com/ext/...
  38. workingDirectory: '$(system.defaultWorkingDirectory)'
  39. displayName: 'Fetch sources'
  40. - script: |
  41. cd ./src/v2ray.com/core
  42. bash ./testing/coverage/coverall
  43. workingDirectory: '$(system.defaultWorkingDirectory)'
  44. displayName: 'Coverage'
  45. - job: make_release
  46. dependsOn: linux
  47. condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
  48. timeoutInMinutes: 60
  49. pool:
  50. vmImage: 'Ubuntu 16.04'
  51. variables:
  52. GOPATH: '$(system.defaultWorkingDirectory)'
  53. CODECOV_TOKEN: '$(coverage.token)'
  54. BAZEL_VER: '0.22.0'
  55. steps:
  56. - checkout: none
  57. - task: GoTool@0
  58. inputs:
  59. version: '1.11.5'
  60. - script: |
  61. go version
  62. go get -v -t -d v2ray.com/core/...
  63. go get -v -t -d v2ray.com/ext/...
  64. workingDirectory: '$(system.defaultWorkingDirectory)'
  65. displayName: 'Fetch sources'
  66. - script: |
  67. curl -L -o bazel-installer.sh https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VER}/bazel-${BAZEL_VER}-installer-linux-x86_64.sh
  68. chmod +x bazel-installer.sh
  69. ./bazel-installer.sh --user
  70. workingDirectory: '$(system.defaultWorkingDirectory)'
  71. displayName: 'Install Bazel'
  72. - script: |
  73. cd ./src/v2ray.com/core
  74. $HOME/bin/bazel build --action_env=GOPATH=$GOPATH --action_env=PATH=$PATH --action_env=GPG_PASS=${SIGN_KEY_PASS} //release:all
  75. workingDirectory: '$(system.defaultWorkingDirectory)'
  76. displayName: 'Build Binaries'