-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.job.build-unittest.yml
106 lines (91 loc) · 3.53 KB
/
template.job.build-unittest.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
103
104
105
106
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops&viewFallbackFrom=vsts#passing-parameters
parameters:
name: ''
vmImage: ''
displayName: ''
jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 4
matrix:
Win32_Debug:
BuildPlatform: 'Win32'
Configuration: 'Debug'
Win32_Release:
BuildPlatform: 'Win32'
Configuration: 'Release'
Win64_Debug:
BuildPlatform: 'x64'
Configuration: 'Debug'
Win64_Release:
BuildPlatform: 'x64'
Configuration: 'Release'
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch
variables:
ARG_VSVERSION: ${{ parameters.ARG_VSVERSION }}
steps:
# show environmental variables for debug.
- script: set
displayName: Show environmental variables for debug
- template: /ci/azure-pipelines/template.steps.install-python-modules.yml
# Build solution
- script: build-sln.bat $(BuildPlatform) $(Configuration)
displayName: Build solution
# Toolbar Bitmap Split/Mux
- script: build-bmp-tools.bat $(Configuration)
displayName: Bitmap Split/Mux
# Install Locale Emulator
- script: choco install locale-emulator -y
displayName: Install Locale Emulator
# Build HTML Help
- script: build-chm.bat
displayName: Build HTML Help
# Build installer with Inno Setup
- script: build-installer.bat $(BuildPlatform) $(Configuration)
displayName: Build installer with Inno Setup
# zip files for artifacts
- script: zipArtifacts.bat $(BuildPlatform) $(Configuration)
condition: eq(variables['Configuration'], 'Release')
displayName: Zip files for artifacts
# Unit tests
- script: tests\run-tests.bat $(BuildPlatform) $(Configuration)
displayName: Unit test
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/copy-files?view=azure-devops&tabs=yaml
#
# "condition:" に関しては以下を参照
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml
#
# "succeededOrFailed()" に関しては以下を参照
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml#job-status-functions
#
- task: CopyFiles@1
condition: succeededOrFailed()
displayName: Copy to ArtifactStagingDirectory
inputs:
contents: |
**.zip
**.zip.md5
targetFolder: $(Build.ArtifactStagingDirectory)
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/artifacts/build-artifacts?view=azure-devops&tabs=yaml
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
displayName: Publish ArtifactStagingDirectory
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: $(BuildPlatform)_$(Configuration)
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=yaml
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/*-googletest-*.xml'
#searchFolder: '$(System.DefaultWorkingDirectory)' # Optional
#mergeTestResults: false # Optional
#failTaskOnFailedTests: false # Optional
#testRunTitle: # Optional
#buildPlatform: # Optional
#buildConfiguration: # Optional
#publishRunAttachments: true # Optional