summaryrefslogtreecommitdiffstats
path: root/.azure-pipelines/posix-steps.yml
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2018-09-24 11:44:50 (GMT)
committerGitHub <noreply@github.com>2018-09-24 11:44:50 (GMT)
commit57675090b0fe7d6c7d72e56384dc2ff6798f1723 (patch)
tree17a838f9f8c953cef01ccc2d32f00be980c8c8e3 /.azure-pipelines/posix-steps.yml
parent2d3ff2b5ea6c903973f99d2155c9c1b60591dceb (diff)
downloadcpython-57675090b0fe7d6c7d72e56384dc2ff6798f1723.zip
cpython-57675090b0fe7d6c7d72e56384dc2ff6798f1723.tar.gz
cpython-57675090b0fe7d6c7d72e56384dc2ff6798f1723.tar.bz2
bpo-34582: Update syntax of Azure Pipelines builds (GH-9521)
Diffstat (limited to '.azure-pipelines/posix-steps.yml')
-rw-r--r--.azure-pipelines/posix-steps.yml63
1 files changed, 63 insertions, 0 deletions
diff --git a/.azure-pipelines/posix-steps.yml b/.azure-pipelines/posix-steps.yml
new file mode 100644
index 0000000..429381a
--- /dev/null
+++ b/.azure-pipelines/posix-steps.yml
@@ -0,0 +1,63 @@
+parameters:
+ coverage: false
+
+steps:
+- checkout: self
+ clean: true
+ fetchDepth: 5
+
+- script: ./.azure-pipelines/posix-deps.sh $(openssl_version)
+ displayName: 'Install dependencies'
+
+- script: ./configure --with-pydebug
+ displayName: 'Configure CPython (debug)'
+
+- script: make -s -j4
+ displayName: 'Build CPython'
+
+- ${{ if eq(parameters.coverage, 'true') }}:
+ - script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
+ displayName: 'Set up virtual environment'
+
+ - script: ./venv/bin/python -m test.pythoninfo
+ displayName: 'Display build info'
+
+ - script: |
+ xvfb-run ./venv/bin/python -m coverage run --pylib -m test \
+ --fail-env-changed \
+ -uall,-cpu \
+ --junit-xml=$(build.binariesDirectory)/test-results.xml" \
+ -x test_multiprocessing_fork \
+ -x test_multiprocessing_forkserver \
+ -x test_multiprocessing_spawn \
+ -x test_concurrent_futures
+ displayName: 'Tests with coverage'
+
+ - script: ./venv/bin/python -m coverage xml
+ displayName: 'Generate coverage.xml'
+
+ - script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
+ displayName: 'Publish code coverage results'
+
+
+- ${{ if ne(parameters.coverage, 'true') }}:
+ - script: make pythoninfo
+ displayName: 'Display build info'
+
+ - script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
+ displayName: 'Tests'
+
+
+- script: python Tools/scripts/patchcheck.py --travis true
+ displayName: 'Run patchcheck.py'
+ condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
+
+
+- task: PublishTestResults@2
+ displayName: 'Publish Test Results'
+ inputs:
+ testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
+ mergeTestResults: true
+ testRunTitle: $(testRunTitle)
+ platform: $(testRunPlatform)
+ condition: succeededOrFailed()