-
Notifications
You must be signed in to change notification settings - Fork 165
/
template.job.build-on-msys2.yml
80 lines (70 loc) · 2.92 KB
/
template.job.build-on-msys2.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
# 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 }}
dependsOn: script_check
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 2
matrix:
MinGW_Debug:
BuildPlatform: 'MinGW'
Configuration: 'Debug'
MinGW_Release:
BuildPlatform: 'MinGW'
Configuration: 'Release'
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: all # what to clean each time; if not mentioned, does not clean
# show environmental variables for debug.
- script: set
displayName: Show environmental variables for debug
- template: /ci/azure-pipelines/template.steps.install-mingw-w64-gcc.yml
# Build GNU C++
- script: build-gnu.bat $(BuildPlatform) $(Configuration)
displayName: Build with MinGW-w64-gcc
# Unit tests
- pwsh: .\tests1.exe --gtest_output=xml:$(build.sourcesDirectory)\tests1.exe-googletest-$(BuildPlatform)-$(Configuration).xml
workingDirectory: $(build.sourcesDirectory)\$(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