forked from AElfProject/AElf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
102 lines (98 loc) · 3.27 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
jobs:
# All tasks on Windows....
- job: build_all_windows
displayName: Build all tasks (Windows)
timeoutInMinutes: 120
pool:
vmImage: windows-latest
variables:
CI_TEST: true
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: 3.1.102
- script: choco install protoc --version=3.11.4 -y
displayName: 'Install protobuf'
- script: choco install unzip
displayName: 'Install unzip'
- task: BatchScript@1
displayName: 'Download AElf build tools'
inputs:
filename: 'scripts/download_binary.bat'
- script: PowerShell.exe -file build.ps1 -target=Test-with-Codecov-N --parts=3 --n=1
displayName: 'Build and Test'
- task: PublishTestResults@2
condition: always()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
displayName: ReportGenerator
inputs:
reports: '$(Build.SourcesDirectory)/test/*/TestResults/*/coverage.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)/CodeCoverage'
reporttypes: 'Cobertura'
assemblyfilters: '-xunit*'
- script: PowerShell.exe -file build.ps1 -target=Upload-Coverage-Azure
displayName: 'Upload data to Codecov'
# All tasks on Linux
- job: build_all_linux
displayName: Build all tasks (Linux)
timeoutInMinutes: 120
pool:
vmImage: ubuntu-latest
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: 3.1.102
- script: bash scripts/install_protobuf.sh
- script: bash scripts/download_binary.sh
- script: bash build.sh -target=Test-with-Codecov-N --parts=3 --n=2
displayName: 'Build and Test'
- task: PublishTestResults@2
condition: always()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
displayName: ReportGenerator
inputs:
reports: '$(Build.SourcesDirectory)/test/*/TestResults/*/coverage.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)/CodeCoverage'
reporttypes: 'Cobertura'
assemblyfilters: '-xunit*'
- script: bash build.sh -target=Upload-Coverage-Azure
displayName: 'Upload data to Codecov'
# All tasks on macOS
- job: build_all_darwin
displayName: Build all tasks (macOS)
timeoutInMinutes: 120
pool:
vmImage: macos-latest
variables:
CI_TEST: true
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: 3.1.102
- script: bash scripts/install_protobuf.sh
- script: bash scripts/download_binary.sh
- script: bash build.sh -target=Test-with-Codecov-N --parts=3 --n=3
displayName: 'Build and Test'
- task: PublishTestResults@2
condition: always()
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
displayName: ReportGenerator
inputs:
reports: '$(Build.SourcesDirectory)/test/*/TestResults/*/coverage.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)/CodeCoverage'
reporttypes: 'Cobertura'
assemblyfilters: '-xunit*'
- script: bash build.sh -target=Upload-Coverage-Azure
displayName: 'Upload data to Codecov'