forked from Hyperledger-TWGC/tape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
79 lines (74 loc) · 2.44 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Go
# Build your Go project.
# Add steps that test, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
trigger:
- master
jobs:
- job: ut
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
mac:
imageName: 'macOS-latest'
# windows:
# imageName: 'windows-latest'
displayName: ut
pool:
vmImage: $(imageName)
steps:
- task: CMake@1
displayName: install make tool
- task: GoTool@0
inputs:
version: '1.14'
displayName: install go tools
- script: make tape
displayName: build tape binary program
- script: make test
displayName: run unit test
- job: dockerbuild
displayName: dockerbuild
steps:
- script: make docker
displayName: build tape docker
- job: integrationTest
displayName: integrationTest
dependsOn:
- ut
- dockerbuild
strategy:
matrix:
# as temp solution, upgrade fabric 2.x version to 2.3
FABRIC_2_3:
FABRIC_VERSION: '2_3'
INTERGATION_CASE: 'ANDLogic'
FABRIC_2_3_ORLogic:
FABRIC_VERSION: '2_3'
INTERGATION_CASE: 'ORLogic'
FABRIC_1_4:
FABRIC_VERSION: '1_4'
INTERGATION_CASE: 'ANDLogic'
LATEST:
FABRIC_VERSION: 'latest'
INTERGATION_CASE: 'ANDLogic'
steps:
- script: make integration-test FABRIC_VERSION=$(FABRIC_VERSION) INTERGATION_CASE=$(INTERGATION_CASE)
- job: BuildAndReleaseBinaries
displayName: BuildAndReleaseBinaries
dependsOn:
- integrationTest
steps:
- script: GOOS=linux GOARCH=amd64 make tape && cp tape linux-amd64 && cp config.yaml linux-amd64 && tar -czvf "tape-linux-amd64.tar.gz" linux-amd64 && GOOS=darwin GOARCH=amd64 make tape && cp tape darwin-amd64 && cp config.yaml darwin-amd64 && tar -czvf "tape-darwin-amd64.tar.gz" darwin-amd64 && GOOS=windows GOARCH=amd64 make tape && cp tape windows-amd64 && cp config.yaml windows-amd64 && tar -czvf "tape-windows-amd64.tar.gz" windows-amd64
displayName: Compile Binary and Create Tarball
- task: GithubRelease@0
displayName: 'Create GitHub Release'
inputs:
repositoryName: '$(Build.Repository.Name)'
gitHubConnection: github.com_stone-ch
action: 'create'
tagSource: 'auto'
tagPattern: 'v.*'
assets: |
./*.tar.gz