1- parameters :
2- coverage : false
3- sudo_dependencies : sudo
4- dependencies : apt
5- patchcheck : true
6- xvfb : true
7-
81steps :
92- checkout : self
103 clean : true
147- script : sudo setfacl -Rb /home/vsts
158 displayName : ' Workaround ACL issue'
169
17- - script : ${{ parameters.sudo_dependencies }} . /.azure-pipelines/posix-deps-${{ parameters.dependencies }} .sh $(openssl_version)
10+ - script : sudo . /.azure-pipelines/posix-deps-apt .sh $(openssl_version)
1811 displayName : ' Install dependencies'
1912
2013- script : ./configure --with-pydebug
@@ -23,61 +16,11 @@ steps:
2316- script : make -j4
2417 displayName : ' Build CPython'
2518
26- - ${{ if eq(parameters.coverage, 'true') }} :
27- - script : ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
28- displayName : ' Set up virtual environment'
29-
30- - script : ./venv/bin/python -m test.pythoninfo
31- displayName : ' Display build info'
32-
33- - script : |
34- $COMMAND -m coverage run --pylib -m test \
35- --fail-env-changed \
36- -uall,-cpu \
37- --junit-xml=$(build.binariesDirectory)/test-results.xml \
38- -x test_multiprocessing_fork \
39- -x test_multiprocessing_forkserver \
40- -x test_multiprocessing_spawn \
41- -x test_concurrent_futures
42- displayName: 'Tests with coverage'
43- env:
44- ${{ if eq(parameters.xvfb, 'true') }}:
45- COMMAND: xvfb-run ./venv/bin/python
46- ${{ if ne(parameters.xvfb, 'true') }}:
47- COMMAND: ./venv/bin/python
48-
49- - script : ./venv/bin/python -m coverage xml
50- displayName : ' Generate coverage.xml'
51-
52- - script : source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
53- displayName : ' Publish code coverage results'
54-
55-
56- - ${{ if ne(parameters.coverage, 'true') }} :
57- - script : make pythoninfo
58- displayName : ' Display build info'
59-
60- - script : $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
61- displayName : ' Tests'
62- env :
63- ${{ if eq(parameters.xvfb, 'true') }} :
64- COMMAND : xvfb-run make
65- ${{ if ne(parameters.xvfb, 'true') }} :
66- COMMAND : make
67-
68- - ${{ if eq(parameters.patchcheck, 'true') }} :
69- - script : |
70- git fetch origin
71- ./python Tools/patchcheck/patchcheck.py --ci true
72- displayName: 'Run patchcheck.py'
73- condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
74-
19+ - script : make pythoninfo
20+ displayName : ' Display build info'
7521
76- - task : PublishTestResults@2
77- displayName : ' Publish Test Results'
78- inputs :
79- testResultsFiles : ' $(build.binariesDirectory)/test-results.xml'
80- mergeTestResults : true
81- testRunTitle : $(testRunTitle)
82- platform : $(testRunPlatform)
83- condition : succeededOrFailed()
22+ - script : |
23+ git fetch origin
24+ ./python Tools/patchcheck/patchcheck.py --ci true
25+ displayName : ' Run patchcheck.py'
26+ condition : and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
0 commit comments