mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
multiple platform
This commit is contained in:
parent
ab7930c09b
commit
6dd5365b84
@ -3,26 +3,68 @@
|
|||||||
# Add steps that test, save build artifacts, deploy, and more:
|
# Add steps that test, save build artifacts, deploy, and more:
|
||||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
|
||||||
|
|
||||||
pool:
|
jobs:
|
||||||
vmImage: 'Ubuntu 16.04'
|
- job: Linux
|
||||||
|
|
||||||
variables:
|
pool:
|
||||||
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
|
vmImage: 'Ubuntu 16.04'
|
||||||
modulePath: '$(GOPATH)/src/v2ray.com/core' # Path to the module's code
|
|
||||||
|
|
||||||
steps:
|
variables:
|
||||||
- script: |
|
GOPATH: '$(system.defaultWorkingDirectory)'
|
||||||
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: |
|
steps:
|
||||||
set -x
|
- checkout: none
|
||||||
go version
|
- script: |
|
||||||
go get -v -t -d ./...
|
go version
|
||||||
go test -p 1 -tags json -v v2ray.com/core/...
|
go get -v -t -d v2ray.com/core/...
|
||||||
workingDirectory: '$(modulePath)'
|
go get -v -t -d v2ray.com/ext/...
|
||||||
displayName: 'Get dependencies, then build'
|
workingDirectory: '$(system.defaultWorkingDirectory)'
|
||||||
|
displayName: 'Fetch sources'
|
||||||
|
- script: |
|
||||||
|
go test -p 1 -tags json -v v2ray.com/core/...
|
||||||
|
workingDirectory: '$(system.defaultWorkingDirectory)'
|
||||||
|
displayName: 'Test'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: MacOS
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'macOS-10.13'
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GOPATH: '$(system.defaultWorkingDirectory)'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout: none
|
||||||
|
- script: |
|
||||||
|
go version
|
||||||
|
go get -v -t -d v2ray.com/core/...
|
||||||
|
go get -v -t -d v2ray.com/ext/...
|
||||||
|
workingDirectory: '$(system.defaultWorkingDirectory)'
|
||||||
|
displayName: 'Fetch sources'
|
||||||
|
- script: |
|
||||||
|
go test -p 1 -tags json -v v2ray.com/core/...
|
||||||
|
workingDirectory: '$(system.defaultWorkingDirectory)'
|
||||||
|
displayName: 'Test'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: Windows
|
||||||
|
|
||||||
|
pool:
|
||||||
|
vmImage: 'vs2017-win2016'
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GOPATH: '$(system.defaultWorkingDirectory)'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout: none
|
||||||
|
- script: |
|
||||||
|
go version
|
||||||
|
go get -v -t -d v2ray.com/core/...
|
||||||
|
go get -v -t -d v2ray.com/ext/...
|
||||||
|
workingDirectory: '$(system.defaultWorkingDirectory)'
|
||||||
|
displayName: 'Fetch sources'
|
||||||
|
- script: |
|
||||||
|
go test -p 1 -tags json -v v2ray.com/core/...
|
||||||
|
workingDirectory: '$(system.defaultWorkingDirectory)'
|
||||||
|
displayName: 'Test'
|
||||||
|
Loading…
Reference in New Issue
Block a user