-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathazure-pipelines.yml
58 lines (54 loc) · 1.43 KB
/
azure-pipelines.yml
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
trigger:
batch: true
branches:
include:
- master
schedules:
- cron: "0 4 * * Mon-Fri"
displayName: Nightly Build
branches:
include:
- master
pr:
- master
variables:
ExecutableName: 'arduino-language-server'
jobs:
- job: Build
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
ExecutableSuffix: ''
mac:
imageName: 'macOS-latest'
ExecutableSuffix: ''
windows:
imageName: 'vs2017-win2016'
ExecutableSuffix: '.exe'
pool:
vmImage: $(imageName)
steps:
- task: GoTool@0
inputs:
version: '1.12'
- script: |
go build -o "$(Build.BinariesDirectory)/$(Agent.OS)_amd64/$(ExecutableName)$(ExecutableSuffix)"
go test ./...
displayName: 'Build and Test'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/$(Agent.OS)_amd64'
includeRootFolder: false
archiveFile: '$(Build.BinariesDirectory)/archive/$(ExecutableName)_$(Agent.OS)_amd64.zip'
archiveType: 'zip'
- publish: '$(Build.BinariesDirectory)/archive'
artifact: 'binary_$(Agent.OS)'
- task: S3Upload@1
condition: in(variables['Build.Reason'], 'Manual', 'Schedule')
inputs:
awsCredentials: 'language-server-s3-upload'
bucketName: 'arduino-downloads-prod-beagle'
sourceFolder: '$(Build.BinariesDirectory)/archive'
globExpressions: '*.zip'
targetFolder: 'arduino-language-server/nightly'