|
|
|
@ -50,16 +50,20 @@ jobs:
|
|
|
|
|
|
|
|
|
|
pool: |
|
|
|
|
vmImage: 'Ubuntu 16.04' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
variables: |
|
|
|
|
GOPATH: '$(system.defaultWorkingDirectory)' |
|
|
|
|
GOPATH: '$(system.defaultWorkingDirectory)/gopath' |
|
|
|
|
BAZEL_VER: '0.23.0' |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- checkout: none |
|
|
|
|
- checkout: self |
|
|
|
|
- task: GoTool@0 |
|
|
|
|
inputs: |
|
|
|
|
version: '1.12' |
|
|
|
|
- script: | |
|
|
|
|
mkdir gopath |
|
|
|
|
displayName: Prepare Environment |
|
|
|
|
workingDirectory: '$(system.defaultWorkingDirectory)' |
|
|
|
|
- script: | |
|
|
|
|
sudo apt-get -y update |
|
|
|
|
sudo apt-get -y install jq git file pkg-config zip g++ zlib1g-dev unzip python openssl |
|
|
|
@ -67,26 +71,26 @@ jobs:
|
|
|
|
|
- script: | |
|
|
|
|
go version |
|
|
|
|
go get -v -t -d v2ray.com/core/... |
|
|
|
|
workingDirectory: '$(system.defaultWorkingDirectory)' |
|
|
|
|
workingDirectory: '$(GOPATH)' |
|
|
|
|
displayName: 'Fetch sources' |
|
|
|
|
- script: | |
|
|
|
|
mkdir release |
|
|
|
|
cd src |
|
|
|
|
zip -9 -r ../release/src_all.zip * -x '*.git*' |
|
|
|
|
workingDirectory: '$(system.defaultWorkingDirectory)' |
|
|
|
|
workingDirectory: '$(GOPATH)' |
|
|
|
|
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)' |
|
|
|
|
workingDirectory: '$(GOPATH)' |
|
|
|
|
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)' |
|
|
|
|
workingDirectory: '$(GOPATH)' |
|
|
|
|
displayName: 'Build Binaries' |
|
|
|
|
- script: | |
|
|
|
|
cp ./src/v2ray.com/core/bazel-bin/release/*.zip ./release/ |
|
|
|
|
workingDirectory: '$(system.defaultWorkingDirectory)' |
|
|
|
|
workingDirectory: '$(GOPATH)' |
|
|
|
|
displayName: 'Dump Binaries' |
|
|
|
|