Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e38de43

Browse files
authored
Merge branch 'master' into fix_dc_introspect
2 parents 8400415 + b0e0877 commit e38de43

File tree

1,173 files changed

+35380
-21372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,173 files changed

+35380
-21372
lines changed

.azure-pipelines/ci.yml

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
variables:
2+
manylinux: false
3+
coverage: false
4+
5+
jobs:
6+
- job: Prebuild
7+
displayName: Pre-build checks
8+
9+
pool:
10+
vmImage: ubuntu-16.04
11+
12+
steps:
13+
- template: ./prebuild-checks.yml
14+
15+
16+
- job: Docs_PR
17+
displayName: Docs PR
18+
dependsOn: Prebuild
19+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
20+
21+
pool:
22+
vmImage: ubuntu-16.04
23+
24+
steps:
25+
- template: ./docs-steps.yml
26+
parameters:
27+
upload: true
28+
29+
30+
- job: macOS_CI_Tests
31+
displayName: macOS CI Tests
32+
dependsOn: Prebuild
33+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
34+
35+
variables:
36+
testRunTitle: '$(build.sourceBranchName)-macos'
37+
testRunPlatform: macos
38+
39+
pool:
40+
vmImage: xcode9-macos10.13
41+
42+
steps:
43+
- template: ./macos-steps.yml
44+
45+
46+
- job: Ubuntu_CI_Tests
47+
displayName: Ubuntu CI Tests
48+
dependsOn: Prebuild
49+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
50+
51+
pool:
52+
vmImage: ubuntu-16.04
53+
54+
variables:
55+
testRunTitle: '$(build.sourceBranchName)-linux'
56+
testRunPlatform: linux
57+
openssl_version: 1.1.0g
58+
59+
steps:
60+
- template: ./posix-steps.yml
61+
62+
63+
- job: ManyLinux1_CI_Tests
64+
displayName: ManyLinux1 CI Tests
65+
dependsOn: Prebuild
66+
condition: |
67+
and(
68+
and(
69+
succeeded(),
70+
eq(variables['manylinux'], 'true')
71+
),
72+
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
73+
)
74+
75+
pool:
76+
vmImage: ubuntu-16.04
77+
78+
variables:
79+
testRunTitle: '$(build.sourceBranchName)-manylinux1'
80+
testRunPlatform: manylinux1
81+
imageName: 'dockcross/manylinux-x64'
82+
83+
steps:
84+
- template: ./docker-steps.yml
85+
86+
87+
- job: Ubuntu_Coverage_CI_Tests
88+
displayName: Ubuntu CI Tests (coverage)
89+
dependsOn: Prebuild
90+
condition: |
91+
and(
92+
and(
93+
succeeded(),
94+
eq(variables['coverage'], 'true')
95+
),
96+
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
97+
)
98+
99+
pool:
100+
vmImage: ubuntu-16.04
101+
102+
variables:
103+
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
104+
testRunPlatform: linux-coverage
105+
openssl_version: 1.1.0g
106+
107+
steps:
108+
- template: ./posix-steps.yml
109+
parameters:
110+
coverage: true
111+
112+
113+
- job: Windows_CI_Tests
114+
displayName: Windows CI Tests
115+
dependsOn: Prebuild
116+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
117+
118+
pool:
119+
vmImage: vs2017-win2016
120+
121+
strategy:
122+
matrix:
123+
win32:
124+
arch: win32
125+
buildOpt:
126+
testRunTitle: '$(Build.SourceBranchName)-win32'
127+
testRunPlatform: win32
128+
win64:
129+
arch: amd64
130+
buildOpt: '-p x64'
131+
testRunTitle: '$(Build.SourceBranchName)-win64'
132+
testRunPlatform: win64
133+
maxParallel: 2
134+
135+
steps:
136+
- template: ./windows-steps.yml

.azure-pipelines/docker-steps.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
steps:
2+
- checkout: self
3+
clean: true
4+
fetchDepth: 5
5+
6+
- ${{ if ne(parameters.targetBranch, '') }}:
7+
- script: |
8+
git fetch -q origin ${{ parameters.targetbranch }}
9+
if ! git diff --name-only HEAD $(git merge-base HEAD FETCH_HEAD) | grep -qvE '(\.rst$|^Doc|^Misc)'
10+
then
11+
echo "Only docs were updated, stopping build process."
12+
echo "##vso[task.setvariable variable=DocOnly]true"
13+
exit
14+
fi
15+
displayName: Detect doc-only changes
16+
17+
- task: docker@0
18+
displayName: 'Configure CPython (debug)'
19+
inputs:
20+
action: 'Run an image'
21+
imageName: $(imageName)
22+
volumes: |
23+
$(build.sourcesDirectory):/src
24+
$(build.binariesDirectory):/build
25+
workDir: '/src'
26+
containerCommand: './configure --with-pydebug'
27+
detached: false
28+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
29+
30+
- task: docker@0
31+
displayName: 'Build CPython'
32+
inputs:
33+
action: 'Run an image'
34+
imageName: $(imageName)
35+
volumes: |
36+
$(build.sourcesDirectory):/src
37+
$(build.binariesDirectory):/build
38+
workDir: '/src'
39+
containerCommand: 'make -s -j4'
40+
detached: false
41+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
42+
43+
- task: docker@0
44+
displayName: 'Display build info'
45+
inputs:
46+
action: 'Run an image'
47+
imageName: $(imageName)
48+
volumes: |
49+
$(build.sourcesDirectory):/src
50+
$(build.binariesDirectory):/build
51+
workDir: '/src'
52+
containerCommand: 'make pythoninfo'
53+
detached: false
54+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
55+
56+
- task: docker@0
57+
displayName: 'Tests'
58+
inputs:
59+
action: 'Run an image'
60+
imageName: $(imageName)
61+
volumes: |
62+
$(build.sourcesDirectory):/src
63+
$(build.binariesDirectory):/build
64+
workDir: '/src'
65+
containerCommand: 'make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=/build/test-results.xml"'
66+
detached: false
67+
condition: and(succeeded(), ne(variables['DocOnly'], 'true'))
68+
69+
- task: PublishTestResults@2
70+
displayName: 'Publish Test Results'
71+
inputs:
72+
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
73+
mergeTestResults: true
74+
testRunTitle: $(testRunTitle)
75+
platform: $(testRunPlatform)
76+
condition: and(succeededOrFailed(), ne(variables['DocOnly'], 'true'))

.azure-pipelines/docs-steps.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
parameters:
2+
latex: false
3+
upload: false
4+
5+
steps:
6+
- checkout: self
7+
clean: true
8+
fetchDepth: 5
9+
10+
- task: UsePythonVersion@0
11+
displayName: 'Use Python 3.6 or later'
12+
inputs:
13+
versionSpec: '>=3.6'
14+
15+
- script: python -m pip install sphinx==1.8.2 blurb python-docs-theme
16+
displayName: 'Install build dependencies'
17+
18+
- ${{ if ne(parameters.latex, 'true') }}:
19+
- script: make check suspicious html PYTHON=python
20+
workingDirectory: '$(build.sourcesDirectory)/Doc'
21+
displayName: 'Build documentation'
22+
23+
- ${{ if eq(parameters.latex, 'true') }}:
24+
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
25+
displayName: 'Install LaTeX'
26+
27+
- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb'
28+
workingDirectory: '$(build.sourcesDirectory)/Doc'
29+
displayName: 'Build documentation'
30+
31+
- ${{ if eq(parameters.upload, 'true') }}:
32+
- task: PublishBuildArtifacts@1
33+
displayName: 'Publish docs'
34+
35+
inputs:
36+
PathToPublish: '$(build.sourcesDirectory)/Doc/build'
37+
ArtifactName: docs
38+
publishLocation: Container
39+
40+
- ${{ if eq(parameters.latex, 'true') }}:
41+
- task: PublishBuildArtifacts@1
42+
displayName: 'Publish dist'
43+
inputs:
44+
PathToPublish: '$(build.sourcesDirectory)/Doc/dist'
45+
ArtifactName: docs_dist
46+
publishLocation: Container
Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,9 @@
1-
# Current docs for the syntax of this file are at:
2-
# https://github.com/Microsoft/vsts-agent/blob/master/docs/preview/yamlgettingstarted.md
3-
4-
name: $(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.rr)
5-
6-
queue:
7-
name: Hosted macOS
8-
9-
trigger:
10-
branches:
11-
include:
12-
- master
13-
- 3.7
14-
- 3.6
15-
paths:
16-
exclude:
17-
- Doc/*
18-
- Tools/*
19-
20-
#variables:
21-
221
steps:
232
- checkout: self
243
clean: true
254
fetchDepth: 5
265

27-
- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-vsts
6+
- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-azdev
287
displayName: 'Configure CPython (debug)'
298

309
- script: make -s -j4
@@ -41,6 +20,6 @@ steps:
4120
inputs:
4221
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
4322
mergeTestResults: true
44-
testRunTitle: '$(build.sourceBranchName)-macOS'
45-
platform: macOS
23+
testRunTitle: $(testRunTitle)
24+
platform: $(testRunPlatform)
4625
condition: succeededOrFailed()

.vsts/install_deps.sh renamed to .azure-pipelines/posix-deps.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo apt-get update || true
1+
sudo apt-get update
22

33
sudo apt-get -yq install \
44
build-essential \
@@ -17,3 +17,10 @@ sudo apt-get -yq install \
1717
libffi-dev \
1818
uuid-dev \
1919
xvfb
20+
21+
if [ ! -z "$1" ]
22+
then
23+
echo ##vso[task.prependpath]$PWD/multissl/openssl/$1
24+
echo ##vso[task.setvariable variable=OPENSSL_DIR]$PWD/multissl/openssl/$1
25+
python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $1 --system Linux
26+
fi

.azure-pipelines/posix-steps.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
parameters:
2+
coverage: false
3+
4+
steps:
5+
- checkout: self
6+
clean: true
7+
fetchDepth: 5
8+
9+
- script: ./.azure-pipelines/posix-deps.sh $(openssl_version)
10+
displayName: 'Install dependencies'
11+
12+
- script: ./configure --with-pydebug
13+
displayName: 'Configure CPython (debug)'
14+
15+
- script: make -s -j4
16+
displayName: 'Build CPython'
17+
18+
- ${{ if eq(parameters.coverage, 'true') }}:
19+
- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
20+
displayName: 'Set up virtual environment'
21+
22+
- script: ./venv/bin/python -m test.pythoninfo
23+
displayName: 'Display build info'
24+
25+
- script: |
26+
xvfb-run ./venv/bin/python -m coverage run --pylib -m test \
27+
--fail-env-changed \
28+
-uall,-cpu \
29+
--junit-xml=$(build.binariesDirectory)/test-results.xml" \
30+
-x test_multiprocessing_fork \
31+
-x test_multiprocessing_forkserver \
32+
-x test_multiprocessing_spawn \
33+
-x test_concurrent_futures
34+
displayName: 'Tests with coverage'
35+
36+
- script: ./venv/bin/python -m coverage xml
37+
displayName: 'Generate coverage.xml'
38+
39+
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
40+
displayName: 'Publish code coverage results'
41+
42+
43+
- ${{ if ne(parameters.coverage, 'true') }}:
44+
- script: make pythoninfo
45+
displayName: 'Display build info'
46+
47+
- script: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
48+
displayName: 'Tests'
49+
50+
51+
- script: ./python Tools/scripts/patchcheck.py --travis true
52+
displayName: 'Run patchcheck.py'
53+
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
54+
55+
56+
- task: PublishTestResults@2
57+
displayName: 'Publish Test Results'
58+
inputs:
59+
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
60+
mergeTestResults: true
61+
testRunTitle: $(testRunTitle)
62+
platform: $(testRunPlatform)
63+
condition: succeededOrFailed()

0 commit comments

Comments
 (0)