зеркало из https://github.com/microsoft/STL.git
36 строки
1.3 KiB
YAML
36 строки
1.3 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
parameters:
|
|
- name: hostArch
|
|
type: string
|
|
- name: targetArch
|
|
type: string
|
|
- name: ctestOptions
|
|
type: string
|
|
- name: skipTesting
|
|
type: boolean
|
|
steps:
|
|
- script: |
|
|
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
|
|
-host_arch=${{ parameters.hostArch }} -arch=${{ parameters.targetArch }} -no_logo
|
|
ctest --verbose ${{ parameters.ctestOptions }}
|
|
displayName: 'Build and Run Tests'
|
|
timeoutInMinutes: 30
|
|
condition: and(succeeded(), not(${{ parameters.skipTesting }}))
|
|
workingDirectory: $(buildOutputLocation)
|
|
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
|
|
- task: PublishTestResults@2
|
|
displayName: 'Publish Tests'
|
|
timeoutInMinutes: 5
|
|
condition: and(succeededOrFailed(), not(${{ parameters.skipTesting }}))
|
|
inputs:
|
|
searchFolder: $(buildOutputLocation)
|
|
testResultsFormat: JUnit
|
|
testResultsFiles: '**/test-results.xml'
|
|
testRunTitle: 'test-${{ parameters.targetArch }}-$(System.JobPositionInPhase)'
|
|
- publish: $(buildOutputLocation)/test-results.xml
|
|
artifact: '${{ parameters.targetArch }}-$(System.JobPositionInPhase)-xml-$(System.JobId)'
|
|
condition: and(failed(), not(${{ parameters.skipTesting }}))
|
|
displayName: 'Publish XML Artifact'
|