1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-16 04:35:24 +00:00
v2fly/azure-pipelines.yml
2019-10-10 15:14:50 +08:00

93 lines
2.4 KiB
YAML

trigger:
batch: true
branches:
include:
- master
pr: none
jobs:
- template: azure-pipelines.template.yml
parameters:
name: linux
vmImage: 'ubuntu-16.04'
- template: azure-pipelines.template.yml
parameters:
name: windows
vmImage: 'vs2017-win2016'
- template: azure-pipelines.template.yml
parameters:
name: macos
vmImage: 'macOS-10.13'
- job: linux_coverage
dependsOn: linux
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
timeoutInMinutes: 30
pool:
vmImage: 'Ubuntu 16.04'
variables:
CODECOV_TOKEN: '$(coverage.token)'
steps:
- checkout: self
- task: GoTool@0
inputs:
version: '1.13'
- script: |
bash ./testing/coverage/coverall
workingDirectory: '$(Build.SourcesDirectory)'
displayName: 'Coverage'
- job: make_release
dependsOn: linux
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
timeoutInMinutes: 60
pool:
vmImage: 'Ubuntu 16.04'
variables:
GOPATH: '$(system.defaultWorkingDirectory)'
BAZEL_VER: '0.23.0'
steps:
- checkout: none
- task: GoTool@0
inputs:
version: '1.13'
- script: |
sudo apt-get -y update
sudo apt-get -y install jq git file pkg-config zip g++ zlib1g-dev unzip python openssl
displayName: Apt Install
- script: |
go version
go get -insecure -v -t -d v2ray.com/core/...
workingDirectory: '$(system.defaultWorkingDirectory)'
displayName: 'Fetch sources'
- script: |
mkdir release
cd src
zip -9 -r ../release/src_all.zip * -x '*.git*'
workingDirectory: '$(system.defaultWorkingDirectory)'
displayName: 'Dump sources'
- script: |
curl -L -o bazel-installer.sh https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VER}/bazel-${BAZEL_VER}-installer-linux-x86_64.sh
chmod +x bazel-installer.sh
./bazel-installer.sh --user
workingDirectory: '$(system.defaultWorkingDirectory)'
displayName: 'Install Bazel'
- script: |
cd ./src/v2ray.com/core
$HOME/bin/bazel build --action_env=GOPATH=$GOPATH --action_env=PATH=$PATH --action_env=GPG_PASS=${SIGN_KEY_PASS} //release:all
workingDirectory: '$(system.defaultWorkingDirectory)'
displayName: 'Build Binaries'
- script: |
cp ./src/v2ray.com/core/bazel-bin/release/*.zip ./release/
workingDirectory: '$(system.defaultWorkingDirectory)'
displayName: 'Dump Binaries'