Browse Source

multiple platform

pull/1435/head
Darien Raymond 6 years ago
parent
commit
6dd5365b84
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 66
      azure-pipelines.yml

66
azure-pipelines.yml

@ -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
jobs:
- job: Linux
pool: pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
variables: variables:
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path GOPATH: '$(system.defaultWorkingDirectory)'
modulePath: '$(GOPATH)/src/v2ray.com/core' # Path to the module's code
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: MacOS
pool:
vmImage: 'macOS-10.13'
variables:
GOPATH: '$(system.defaultWorkingDirectory)'
steps: 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: | - script: |
mkdir -p '$(modulePath)' go test -p 1 -tags json -v v2ray.com/core/...
shopt -s extglob workingDirectory: '$(system.defaultWorkingDirectory)'
mv !(gopath) '$(modulePath)' displayName: 'Test'
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin' jobs:
displayName: 'Set up the Go workspace' - job: Windows
pool:
vmImage: 'vs2017-win2016'
variables:
GOPATH: '$(system.defaultWorkingDirectory)'
steps:
- checkout: none
- script: | - script: |
set -x
go version go version
go get -v -t -d ./... 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/... go test -p 1 -tags json -v v2ray.com/core/...
workingDirectory: '$(modulePath)' workingDirectory: '$(system.defaultWorkingDirectory)'
displayName: 'Get dependencies, then build' displayName: 'Test'

Loading…
Cancel
Save