mirror of
https://github.com/python/cpython.git
synced 2024-12-01 11:15:56 +01:00
77 lines
2.2 KiB
YAML
77 lines
2.2 KiB
YAML
steps:
|
|
- checkout: self
|
|
clean: true
|
|
fetchDepth: 5
|
|
|
|
- ${{ if ne(parameters.targetBranch, '') }}:
|
|
- script: |
|
|
git fetch -q origin ${{ parameters.targetbranch }}
|
|
if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qvE '(\.rst$|^Doc|^Misc)'
|
|
then
|
|
echo "Only docs were updated, stopping build process."
|
|
echo "##vso[task.setvariable variable=DocOnly]true"
|
|
exit
|
|
fi
|
|
displayName: Detect doc-only changes
|
|
|
|
- task: docker@0
|
|
displayName: 'Configure CPython (debug)'
|
|
inputs:
|
|
action: 'Run an image'
|
|
imageName: $(imageName)
|
|
volumes: |
|
|
$(build.sourcesDirectory):/src
|
|
$(build.binariesDirectory):/build
|
|
workDir: '/src'
|
|
containerCommand: './configure --with-pydebug'
|
|
detached: false
|
|
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
|
|
|
|
- task: docker@0
|
|
displayName: 'Build CPython'
|
|
inputs:
|
|
action: 'Run an image'
|
|
imageName: $(imageName)
|
|
volumes: |
|
|
$(build.sourcesDirectory):/src
|
|
$(build.binariesDirectory):/build
|
|
workDir: '/src'
|
|
containerCommand: 'make -s -j4'
|
|
detached: false
|
|
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
|
|
|
|
- task: docker@0
|
|
displayName: 'Display build info'
|
|
inputs:
|
|
action: 'Run an image'
|
|
imageName: $(imageName)
|
|
volumes: |
|
|
$(build.sourcesDirectory):/src
|
|
$(build.binariesDirectory):/build
|
|
workDir: '/src'
|
|
containerCommand: 'make pythoninfo'
|
|
detached: false
|
|
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
|
|
|
|
- task: docker@0
|
|
displayName: 'Tests'
|
|
inputs:
|
|
action: 'Run an image'
|
|
imageName: $(imageName)
|
|
volumes: |
|
|
$(build.sourcesDirectory):/src
|
|
$(build.binariesDirectory):/build
|
|
workDir: '/src'
|
|
containerCommand: 'make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=/build/test-results.xml"'
|
|
detached: false
|
|
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
|
|
|
|
- task: PublishTestResults@2
|
|
displayName: 'Publish Test Results'
|
|
inputs:
|
|
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
|
|
mergeTestResults: true
|
|
testRunTitle: $(testRunTitle)
|
|
platform: $(testRunPlatform)
|
|
condition: and(succeededOrFailed(), ne(variables['DocOnly'], 'true'))
|