mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
781 B
28 lines
781 B
# Go |
|
# Build your Go project. |
|
# Add steps that test, save build artifacts, deploy, and more: |
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/go |
|
|
|
pool: |
|
vmImage: 'Ubuntu 16.04' |
|
|
|
variables: |
|
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path |
|
modulePath: '$(GOPATH)/src/v2ray.com/core' # Path to the module's code |
|
|
|
steps: |
|
- script: | |
|
mkdir -p '$(modulePath)' |
|
shopt -s extglob |
|
mv !(gopath) '$(modulePath)' |
|
echo '##vso[task.prependpath]$(GOBIN)' |
|
echo '##vso[task.prependpath]$(GOROOT)/bin' |
|
displayName: 'Set up the Go workspace' |
|
|
|
- script: | |
|
set -x |
|
go version |
|
go get -v -t -d ./... |
|
go test -p 1 -tags json -v v2ray.com/core/... |
|
workingDirectory: '$(modulePath)' |
|
displayName: 'Get dependencies, then build'
|
|
|