From d1deebb6a92a8099c76c0bc507382586a6a7c4c9 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 12 Nov 2018 22:37:44 +0100 Subject: [PATCH] azure pipeline template --- azure-pipelines.template.yml | 22 +++++++++++ azure-pipelines.yml | 77 +++++++----------------------------- testing/coverage/coverall | 4 -- 3 files changed, 37 insertions(+), 66 deletions(-) create mode 100644 azure-pipelines.template.yml diff --git a/azure-pipelines.template.yml b/azure-pipelines.template.yml new file mode 100644 index 000000000..5f28c2992 --- /dev/null +++ b/azure-pipelines.template.yml @@ -0,0 +1,22 @@ +jobs: +- job: ${{ parameters.name }} + timeoutInMinutes: 30 + + pool: + vmImage: ${{ parameters.vmImage }} + + 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' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 174ff3a29..f9d6f4c27 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,27 +1,22 @@ jobs: -- job: Linux +- template: azure-pipelines.template.yml + parameters: + name: linux + vmImage: 'ubuntu-16.04' - pool: - vmImage: 'Ubuntu 16.04' +- template: azure-pipelines.template.yml + parameters: + name: windows + vmImage: 'vs2017-win2016' - variables: - GOPATH: '$(system.defaultWorkingDirectory)' +- template: azure-pipelines.template.yml + parameters: + name: macos + vmImage: 'macOS-10.13' - 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' - -- job: Linux_Coverage - dependsOn: Linux +- job: linux_coverage + dependsOn: linux + timeoutInMinutes: 30 pool: vmImage: 'Ubuntu 16.04' @@ -42,45 +37,3 @@ jobs: bash ./testing/coverage/coverall workingDirectory: '$(system.defaultWorkingDirectory)' displayName: 'Coverage' - -- 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' - -- 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' diff --git a/testing/coverage/coverall b/testing/coverage/coverall index ef84835fb..ed655fc20 100755 --- a/testing/coverage/coverall +++ b/testing/coverage/coverall @@ -1,9 +1,5 @@ #!/bin/bash -if [ -n "${TRAVIS_TAG}" ]; then - exit 0 -fi - FAIL=0 V2RAY_OUT=${GOPATH}/out/v2ray