-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yaml
73 lines (66 loc) · 1.74 KB
/
azure-pipelines.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: $(SourceBranchName)-$(Date:yyyyMMdd).$(Rev:r)
variables:
GOVER: '1.13.5'
trigger:
batch: true
branches:
include: [ "master", "develop" ]
paths:
exclude: [ "README.md", "LICENSE", ".github/*", "examples/*", ".golangci.yml" ]
pr:
autoCancel: true
branches:
include: [ "master", "develop" ]
paths:
exclude: [ "README.md", "LICENSE", ".github/*", "examples/*", ".golangci.yml" ]
jobs:
- job: binary
displayName: "binary build"
pool:
vmImage: "ubuntu-16.04"
workspace:
clean: all
timeoutInMinutes: 15
strategy:
matrix:
linux-amd64:
GOOS: 'linux'
GOARCH: 'amd64'
FILENAME_SUFFIX: ''
linux-arm:
GOOS: 'linux'
GOARCH: 'arm'
FILENAME_SUFFIX: ''
linux-arm64:
GOOS: 'linux'
GOARCH: 'arm64'
FILENAME_SUFFIX: ''
windows-amd64:
GOOS: 'windows'
GOARCH: 'amd64'
FILENAME_SUFFIX: '.exe'
darwin-amd64:
GOOS: 'darwin'
GOARCH: 'amd64'
FILENAME_SUFFIX: ''
steps:
- task: GoTool@0
displayName: 'Use Go'
inputs:
version: $(GOVER)
- bash: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y upx
displayName: 'Install Dependencies'
- bash: |
export GOPATH="/tmp/go"
export GOBIN="/opt/hostedtoolcache/go/${GOVER}/x64/bin"
export OUT_FILE="myip-${GOOS}-${GOARCH}${FILENAME_SUFFIX}"
./build.sh
cp build/* ${BUILD_ARTIFACTSTAGINGDIRECTORY}
displayName: 'Build'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
ArtifactName: 'myip-$(GOOS)-$(GOARCH)'