Skip to content

Commit 9933ad5

Browse files
Merge branch 'master' into fix-issue24255
2 parents bba6224 + 4044c84 commit 9933ad5

1,922 files changed

Lines changed: 175898 additions & 83198 deletions

File tree

Some content is hidden

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

.azure-pipelines/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ jobs:
3535
- job: macOS_CI_Tests
3636
displayName: macOS CI Tests
3737
dependsOn: Prebuild
38-
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
38+
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
39+
# bpo-39837: macOS tests on Azure Pipelines are disabled
40+
condition: false
3941

4042
variables:
4143
testRunTitle: '$(build.sourceBranchName)-macos'
4244
testRunPlatform: macos
4345

4446
pool:
45-
vmImage: xcode9-macos10.13
47+
vmImage: macos-10.14
4648

4749
steps:
4850
- template: ./macos-steps.yml
@@ -59,7 +61,7 @@ jobs:
5961
variables:
6062
testRunTitle: '$(build.sourceBranchName)-linux'
6163
testRunPlatform: linux
62-
openssl_version: 1.1.1c
64+
openssl_version: 1.1.1f
6365

6466
steps:
6567
- template: ./posix-steps.yml
@@ -116,7 +118,7 @@ jobs:
116118
variables:
117119
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118120
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.1c
121+
openssl_version: 1.1.1f
120122

121123
steps:
122124
- template: ./posix-steps.yml
@@ -131,7 +133,7 @@ jobs:
131133
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
132134

133135
pool:
134-
vmImage: vs2017-win2016
136+
vmImage: windows-2019
135137

136138
strategy:
137139
matrix:
@@ -145,7 +147,7 @@ jobs:
145147
buildOpt: '-p x64'
146148
testRunTitle: '$(Build.SourceBranchName)-win64'
147149
testRunPlatform: win64
148-
maxParallel: 2
150+
maxParallel: 4
149151

150152
steps:
151153
- template: ./windows-steps.yml

.azure-pipelines/docs-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
inputs:
1313
versionSpec: '>=3.6'
1414

15-
- script: python -m pip install sphinx==2.0.1 blurb python-docs-theme
15+
- script: python -m pip install sphinx==2.2.0 blurb python-docs-theme
1616
displayName: 'Install build dependencies'
1717

1818
- ${{ if ne(parameters.latex, 'true') }}:
@@ -21,7 +21,7 @@ steps:
2121
displayName: 'Build documentation'
2222

2323
- ${{ if eq(parameters.latex, 'true') }}:
24-
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
24+
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
2525
displayName: 'Install LaTeX'
2626

2727
- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb'

.azure-pipelines/macos-steps.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ steps:
66
- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-azdev
77
displayName: 'Configure CPython (debug)'
88

9-
- script: make -s -j4
9+
- script: make -j4
1010
displayName: 'Build CPython'
1111

1212
- script: make pythoninfo
1313
displayName: 'Display build info'
1414

1515
- script: make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
1616
displayName: 'Tests'
17+
continueOnError: true
18+
timeoutInMinutes: 30
1719

1820
- task: PublishTestResults@2
1921
displayName: 'Publish Test Results'

.azure-pipelines/posix-deps-apt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/sh
12
apt-get update
23

34
apt-get -yq install \

.azure-pipelines/posix-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ steps:
2020
- script: ./configure --with-pydebug
2121
displayName: 'Configure CPython (debug)'
2222

23-
- script: make -s -j4
23+
- script: make -j4
2424
displayName: 'Build CPython'
2525

2626
- ${{ if eq(parameters.coverage, 'true') }}:
@@ -49,7 +49,7 @@ steps:
4949
- script: ./venv/bin/python -m coverage xml
5050
displayName: 'Generate coverage.xml'
5151

52-
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
52+
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
5353
displayName: 'Publish code coverage results'
5454

5555

.azure-pipelines/pr.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ jobs:
3333
- job: macOS_PR_Tests
3434
displayName: macOS PR Tests
3535
dependsOn: Prebuild
36-
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
36+
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
37+
# bpo-39837: macOS tests on Azure Pipelines are disabled
38+
condition: false
3739

3840
variables:
3941
testRunTitle: '$(system.pullRequest.TargetBranch)-macos'
4042
testRunPlatform: macos
4143

4244
pool:
43-
vmImage: xcode9-macos10.13
45+
vmImage: macos-10.14
4446

4547
steps:
4648
- template: ./macos-steps.yml
@@ -59,7 +61,7 @@ jobs:
5961
variables:
6062
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
6163
testRunPlatform: linux
62-
openssl_version: 1.1.1c
64+
openssl_version: 1.1.1f
6365

6466
steps:
6567
- template: ./posix-steps.yml
@@ -116,7 +118,7 @@ jobs:
116118
variables:
117119
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118120
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.1c
121+
openssl_version: 1.1.1f
120122

121123
steps:
122124
- template: ./posix-steps.yml
@@ -131,7 +133,7 @@ jobs:
131133
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
132134

133135
pool:
134-
vmImage: vs2017-win2016
136+
vmImage: windows-2019
135137

136138
strategy:
137139
matrix:
@@ -145,7 +147,10 @@ jobs:
145147
buildOpt: '-p x64'
146148
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
147149
testRunPlatform: win64
148-
maxParallel: 2
150+
winarm64:
151+
arch: arm64
152+
buildOpt: '-p arm64'
153+
maxParallel: 4
149154

150155
steps:
151156
- template: ./windows-steps.yml
Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Release_$(Build.SourceBranchName)_$(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
22

3+
variables:
4+
__RealSigningCertificate: 'Python Software Foundation'
35
# QUEUE TIME VARIABLES
4-
# variables:
56
# GitRemote: python
67
# SourceTag:
78
# DoPGO: true
@@ -13,84 +14,116 @@ name: Release_$(Build.SourceBranchName)_$(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
1314
# DoEmbed: true
1415
# DoMSI: true
1516
# DoPublish: false
17+
# PyDotOrgUsername: ''
18+
# PyDotOrgServer: ''
19+
# BuildToPublish: ''
1620

1721
trigger: none
1822
pr: none
1923

2024
stages:
2125
- stage: Build
2226
displayName: Build binaries
27+
condition: and(succeeded(), not(variables['BuildToPublish']))
2328
jobs:
2429
- template: windows-release/stage-build.yml
2530

2631
- stage: Sign
2732
displayName: Sign binaries
2833
dependsOn: Build
34+
condition: and(succeeded(), not(variables['BuildToPublish']))
2935
jobs:
3036
- template: windows-release/stage-sign.yml
3137

3238
- stage: Layout
3339
displayName: Generate layouts
3440
dependsOn: Sign
41+
condition: and(succeeded(), not(variables['BuildToPublish']))
3542
jobs:
3643
- template: windows-release/stage-layout-full.yml
3744
- template: windows-release/stage-layout-embed.yml
3845
- template: windows-release/stage-layout-nuget.yml
3946

4047
- stage: Pack
4148
dependsOn: Layout
49+
condition: and(succeeded(), not(variables['BuildToPublish']))
4250
jobs:
4351
- template: windows-release/stage-pack-nuget.yml
4452

4553
- stage: Test
4654
dependsOn: Pack
55+
condition: and(succeeded(), not(variables['BuildToPublish']))
4756
jobs:
4857
- template: windows-release/stage-test-embed.yml
4958
- template: windows-release/stage-test-nuget.yml
5059

5160
- stage: Layout_MSIX
5261
displayName: Generate MSIX layouts
5362
dependsOn: Sign
54-
condition: and(succeeded(), eq(variables['DoMSIX'], 'true'))
63+
condition: and(succeeded(), and(eq(variables['DoMSIX'], 'true'), not(variables['BuildToPublish'])))
5564
jobs:
5665
- template: windows-release/stage-layout-msix.yml
5766

5867
- stage: Pack_MSIX
5968
displayName: Package MSIX
6069
dependsOn: Layout_MSIX
70+
condition: and(succeeded(), not(variables['BuildToPublish']))
6171
jobs:
6272
- template: windows-release/stage-pack-msix.yml
6373

6474
- stage: Build_MSI
6575
displayName: Build MSI installer
6676
dependsOn: Sign
67-
condition: and(succeeded(), eq(variables['DoMSI'], 'true'))
77+
condition: and(succeeded(), and(eq(variables['DoMSI'], 'true'), not(variables['BuildToPublish'])))
6878
jobs:
6979
- template: windows-release/stage-msi.yml
7080

7181
- stage: Test_MSI
7282
displayName: Test MSI installer
7383
dependsOn: Build_MSI
84+
condition: and(succeeded(), not(variables['BuildToPublish']))
7485
jobs:
7586
- template: windows-release/stage-test-msi.yml
7687

7788
- stage: PublishPyDotOrg
7889
displayName: Publish to python.org
7990
dependsOn: ['Test_MSI', 'Test']
80-
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
91+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
8192
jobs:
8293
- template: windows-release/stage-publish-pythonorg.yml
8394

8495
- stage: PublishNuget
8596
displayName: Publish to nuget.org
8697
dependsOn: Test
87-
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
98+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
8899
jobs:
89100
- template: windows-release/stage-publish-nugetorg.yml
90101

91102
- stage: PublishStore
92103
displayName: Publish to Store
93104
dependsOn: Pack_MSIX
94-
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
105+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
106+
jobs:
107+
- template: windows-release/stage-publish-store.yml
108+
109+
110+
- stage: PublishExistingPyDotOrg
111+
displayName: Publish existing build to python.org
112+
dependsOn: []
113+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
114+
jobs:
115+
- template: windows-release/stage-publish-pythonorg.yml
116+
117+
- stage: PublishExistingNuget
118+
displayName: Publish existing build to nuget.org
119+
dependsOn: []
120+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
121+
jobs:
122+
- template: windows-release/stage-publish-nugetorg.yml
123+
124+
- stage: PublishExistingStore
125+
displayName: Publish existing build to Store
126+
dependsOn: []
127+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
95128
jobs:
96129
- template: windows-release/stage-publish-store.yml

.azure-pipelines/windows-release/build-steps.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ steps:
4343

4444
- powershell: |
4545
$env:SigningCertificate = $null
46-
.\python.bat PC\layout -vv -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default
46+
$(_HostPython) PC\layout -vv -b "$(Build.BinariesDirectory)\bin" -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default --arch $(Arch)
4747
makecat "${env:CAT}.cdf"
4848
del "${env:CAT}.cdf"
4949
if (-not (Test-Path "${env:CAT}.cat")) {
@@ -52,6 +52,7 @@ steps:
5252
displayName: 'Generate catalog'
5353
env:
5454
CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python
55+
PYTHON_HEXVERSION: $(VersionHex)
5556

5657
- task: PublishPipelineArtifact@0
5758
displayName: 'Publish binaries'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
parameters:
2+
GPGKeyFile: $(GPGKey)
3+
GPGPassphrase: $(GPGPassphrase)
4+
Files: '*'
5+
WorkingDirectory: $(Build.BinariesDirectory)
6+
7+
steps:
8+
- task: DownloadSecureFile@1
9+
name: gpgkey
10+
inputs:
11+
secureFile: ${{ parameters.GPGKeyFile }}
12+
displayName: 'Download GPG key'
13+
14+
- powershell: |
15+
git clone https://github.com/python/cpython-bin-deps --branch gpg --single-branch --depth 1 --progress -v "gpg"
16+
gpg/gpg2.exe --import "$(gpgkey.secureFilePath)"
17+
(gci -File ${{ parameters.Files }}).FullName | %{
18+
gpg/gpg2.exe -ba --batch --passphrase ${{ parameters.GPGPassphrase }} $_
19+
"Made signature for $_"
20+
}
21+
displayName: 'Generate GPG signatures'
22+
workingDirectory: ${{ parameters.WorkingDirectory }}
23+
24+
- powershell: |
25+
$p = gps "gpg-agent" -EA 0
26+
if ($p) { $p.Kill() }
27+
displayName: 'Kill GPG agent'
28+
condition: true

.azure-pipelines/windows-release/layout-command.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
steps:
2+
- task: DownloadPipelineArtifact@1
3+
displayName: 'Download artifact: bin_$(HostArch)'
4+
condition: and(succeeded(), variables['HostArch'])
5+
inputs:
6+
artifactName: bin_$(HostArch)
7+
targetPath: $(Build.BinariesDirectory)\bin_$(HostArch)
8+
29
- powershell: >
310
Write-Host (
411
'##vso[task.setvariable variable=LayoutCmd]&
5-
"{0}\bin\python.exe"
12+
"$(Python)"
613
"{1}\PC\layout"
714
-vv
815
--source "{1}"
916
--build "{0}\bin"
17+
--arch "$(Name)"
1018
--temp "{0}\layout-temp"
1119
--include-cat "{0}\bin\python.cat"
1220
--doc-build "{0}\doc"'

0 commit comments

Comments
 (0)