summaryrefslogtreecommitdiffstats
path: root/.azure-pipelines/docker-steps.yml
diff options
context:
space:
mode:
Diffstat (limited to '.azure-pipelines/docker-steps.yml')
-rw-r--r--.azure-pipelines/docker-steps.yml76
1 files changed, 76 insertions, 0 deletions
diff --git a/.azure-pipelines/docker-steps.yml b/.azure-pipelines/docker-steps.yml
new file mode 100644
index 0000000..ba4dfd7
--- /dev/null
+++ b/.azure-pipelines/docker-steps.yml
@@ -0,0 +1,76 @@
+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'))