diff options
author | Steve Dower <steve.dower@python.org> | 2019-11-20 17:30:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-20 17:30:47 (GMT) |
commit | de148f263fba75cd10d2cb010fe9c495cee4ec83 (patch) | |
tree | 7559853c00252bb9e300e6815ee3615a90e3973b /.azure-pipelines | |
parent | abce2d9bc6b990831d303f4cf9f2de8a6712a1fc (diff) | |
download | cpython-de148f263fba75cd10d2cb010fe9c495cee4ec83.zip cpython-de148f263fba75cd10d2cb010fe9c495cee4ec83.tar.gz cpython-de148f263fba75cd10d2cb010fe9c495cee4ec83.tar.bz2 |
bpo-33125: Add support for building and releasing Windows ARM64 packages (GH-16828)
Note that the support is not actually enabled yet, and so we won't be publishing these packages. However, for those who want to build it themselves (even by reusing the Azure Pipelines definition), it's now relatively easy to enable.
Diffstat (limited to '.azure-pipelines')
-rw-r--r-- | .azure-pipelines/ci.yml | 2 | ||||
-rw-r--r-- | .azure-pipelines/pr.yml | 5 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/build-steps.yml | 3 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/layout-command.yml | 10 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/msi-steps.yml | 1 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-build.yml | 18 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-layout-embed.yml | 5 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-layout-full.yml | 17 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-layout-msix.yml | 19 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-layout-nuget.yml | 12 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-pack-msix.yml | 10 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-pack-nuget.yml | 2 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-publish-nugetorg.yml | 5 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-publish-pythonorg.yml | 4 | ||||
-rw-r--r-- | .azure-pipelines/windows-release/stage-sign.yml | 2 | ||||
-rw-r--r-- | .azure-pipelines/windows-steps.yml | 4 |
16 files changed, 98 insertions, 21 deletions
diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index fe10e45..4c2f115 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -145,7 +145,7 @@ jobs: buildOpt: '-p x64' testRunTitle: '$(Build.SourceBranchName)-win64' testRunPlatform: win64 - maxParallel: 2 + maxParallel: 4 steps: - template: ./windows-steps.yml diff --git a/.azure-pipelines/pr.yml b/.azure-pipelines/pr.yml index 09209fc..73d4f55 100644 --- a/.azure-pipelines/pr.yml +++ b/.azure-pipelines/pr.yml @@ -145,7 +145,10 @@ jobs: buildOpt: '-p x64' testRunTitle: '$(System.PullRequest.TargetBranch)-win64' testRunPlatform: win64 - maxParallel: 2 + winarm64: + arch: arm64 + buildOpt: '-p arm64' + maxParallel: 4 steps: - template: ./windows-steps.yml diff --git a/.azure-pipelines/windows-release/build-steps.yml b/.azure-pipelines/windows-release/build-steps.yml index d4563cd..e2b6683 100644 --- a/.azure-pipelines/windows-release/build-steps.yml +++ b/.azure-pipelines/windows-release/build-steps.yml @@ -43,7 +43,7 @@ steps: - powershell: | $env:SigningCertificate = $null - .\python.bat PC\layout -vv -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default + python PC\layout -vv -b "$(Build.BinariesDirectory)\bin" -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default --arch $(Arch) makecat "${env:CAT}.cdf" del "${env:CAT}.cdf" if (-not (Test-Path "${env:CAT}.cat")) { @@ -52,6 +52,7 @@ steps: displayName: 'Generate catalog' env: CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python + PYTHON_HEXVERSION: $(VersionHex) - task: PublishPipelineArtifact@0 displayName: 'Publish binaries' diff --git a/.azure-pipelines/windows-release/layout-command.yml b/.azure-pipelines/windows-release/layout-command.yml index 2dcd6ed..406ccd8 100644 --- a/.azure-pipelines/windows-release/layout-command.yml +++ b/.azure-pipelines/windows-release/layout-command.yml @@ -1,12 +1,20 @@ steps: +- task: DownloadPipelineArtifact@1 + displayName: 'Download artifact: bin_$(HostArch)' + condition: and(succeeded(), variables['HostArch']) + inputs: + artifactName: bin_$(HostArch) + targetPath: $(Build.BinariesDirectory)\bin_$(HostArch) + - powershell: > Write-Host ( '##vso[task.setvariable variable=LayoutCmd]& - "{0}\bin\python.exe" + "$(Python)" "{1}\PC\layout" -vv --source "{1}" --build "{0}\bin" + --arch "$(Name)" --temp "{0}\layout-temp" --include-cat "{0}\bin\python.cat" --doc-build "{0}\doc"' diff --git a/.azure-pipelines/windows-release/msi-steps.yml b/.azure-pipelines/windows-release/msi-steps.yml index f7bff16..a460eb1 100644 --- a/.azure-pipelines/windows-release/msi-steps.yml +++ b/.azure-pipelines/windows-release/msi-steps.yml @@ -54,6 +54,7 @@ steps: - powershell: | copy $(Build.BinariesDirectory)\amd64\Activate.ps1 Lib\venv\scripts\common\Activate.ps1 -Force displayName: 'Copy signed files into sources' + condition: and(succeeded(), variables['SigningCertificate']) - script: | call Tools\msi\get_externals.bat diff --git a/.azure-pipelines/windows-release/stage-build.yml b/.azure-pipelines/windows-release/stage-build.yml index c98576e..60d72b2 100644 --- a/.azure-pipelines/windows-release/stage-build.yml +++ b/.azure-pipelines/windows-release/stage-build.yml @@ -16,14 +16,16 @@ jobs: env: BUILDDIR: $(Build.BinariesDirectory)\Doc - #- powershell: iwr "https://www.python.org/ftp/python/3.7.3/python373.chm" -OutFile "$(Build.BinariesDirectory)\python390a0.chm" - # displayName: 'Cheat at building CHM docs' - - script: Doc\make.bat htmlhelp displayName: 'Build CHM docs' env: BUILDDIR: $(Build.BinariesDirectory)\Doc + #- powershell: | + # mkdir -Force "$(Build.BinariesDirectory)\Doc\htmlhelp" + # iwr "https://www.python.org/ftp/python/3.8.0/python380.chm" -OutFile "$(Build.BinariesDirectory)\Doc\htmlhelp\python390a0.chm" + # displayName: 'Cheat at building CHM docs' + - task: CopyFiles@2 displayName: 'Assemble artifact: Doc' inputs: @@ -65,6 +67,16 @@ jobs: Arch: amd64 Platform: x64 Configuration: Debug + arm64: + Name: arm64 + Arch: arm64 + Platform: ARM64 + Configuration: Release + arm64_d: + Name: arm64_d + Arch: arm64 + Platform: ARM64 + Configuration: Debug steps: - template: ./build-steps.yml diff --git a/.azure-pipelines/windows-release/stage-layout-embed.yml b/.azure-pipelines/windows-release/stage-layout-embed.yml index 09857ff..3306e1c 100644 --- a/.azure-pipelines/windows-release/stage-layout-embed.yml +++ b/.azure-pipelines/windows-release/stage-layout-embed.yml @@ -19,6 +19,11 @@ jobs: Name: amd64 Python: $(Build.BinariesDirectory)\bin\python.exe PYTHONHOME: $(Build.SourcesDirectory) + arm64: + Name: arm64 + HostArch: amd64 + Python: $(Build.BinariesDirectory)\bin_amd64\python.exe + PYTHONHOME: $(Build.SourcesDirectory) steps: - template: ./checkout.yml diff --git a/.azure-pipelines/windows-release/stage-layout-full.yml b/.azure-pipelines/windows-release/stage-layout-full.yml index 12c3472..78bc1b3 100644 --- a/.azure-pipelines/windows-release/stage-layout-full.yml +++ b/.azure-pipelines/windows-release/stage-layout-full.yml @@ -13,11 +13,18 @@ jobs: matrix: win32: Name: win32 - Python: $(Build.BinariesDirectory)\bin_$(Name)\python.exe + Python: $(Build.BinariesDirectory)\bin\python.exe PYTHONHOME: $(Build.SourcesDirectory) + TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8 amd64: Name: amd64 - Python: $(Build.BinariesDirectory)\bin_$(Name)\python.exe + Python: $(Build.BinariesDirectory)\bin\python.exe + PYTHONHOME: $(Build.SourcesDirectory) + TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8 + arm64: + Name: arm64 + HostArch: amd64 + Python: $(Build.BinariesDirectory)\bin_amd64\python.exe PYTHONHOME: $(Build.SourcesDirectory) steps: @@ -43,13 +50,15 @@ jobs: - task: DownloadPipelineArtifact@1 displayName: 'Download artifact: tcltk_lib_$(Name)' + condition: and(succeeded(), variables['TclLibrary']) inputs: artifactName: tcltk_lib_$(Name) targetPath: $(Build.BinariesDirectory)\tcltk_lib - powershell: | - copy $(Build.BinariesDirectory)\bin\Activate.ps1 Lib\venv\scripts\common\Activate.ps1 -Force + copy "$(Build.BinariesDirectory)\bin\Activate.ps1" Lib\venv\scripts\common\Activate.ps1 -Force displayName: 'Copy signed files into sources' + condition: and(succeeded(), variables['SigningCertificate']) - template: ./layout-command.yml @@ -57,7 +66,7 @@ jobs: $(LayoutCmd) --copy "$(Build.ArtifactStagingDirectory)\layout" --preset-default displayName: 'Generate full layout' env: - TCL_LIBRARY: $(Build.BinariesDirectory)\tcltk_lib\tcl8 + TCL_LIBRARY: $(TclLibrary) - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: layout_full_$(Name)' diff --git a/.azure-pipelines/windows-release/stage-layout-msix.yml b/.azure-pipelines/windows-release/stage-layout-msix.yml index ba86392..60a5c9e 100644 --- a/.azure-pipelines/windows-release/stage-layout-msix.yml +++ b/.azure-pipelines/windows-release/stage-layout-msix.yml @@ -12,11 +12,18 @@ jobs: matrix: #win32: # Name: win32 - # Python: $(Build.BinariesDirectory)\bin_$(Name)\python.exe + # Python: $(Build.BinariesDirectory)\bin\python.exe # PYTHONHOME: $(Build.SourcesDirectory) + # TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8 amd64: Name: amd64 - Python: $(Build.BinariesDirectory)\bin_$(Name)\python.exe + Python: $(Build.BinariesDirectory)\bin\python.exe + PYTHONHOME: $(Build.SourcesDirectory) + TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8 + arm64: + Name: arm64 + HostArch: amd64 + Python: $(Build.BinariesDirectory)\bin_amd64\python.exe PYTHONHOME: $(Build.SourcesDirectory) steps: @@ -36,13 +43,15 @@ jobs: - task: DownloadPipelineArtifact@1 displayName: 'Download artifact: tcltk_lib_$(Name)' + condition: and(succeeded(), variables['TclLibrary']) inputs: artifactName: tcltk_lib_$(Name) targetPath: $(Build.BinariesDirectory)\tcltk_lib - powershell: | - copy $(Build.BinariesDirectory)\bin\Activate.ps1 Lib\venv\scripts\common\Activate.ps1 -Force + copy "$(Build.BinariesDirectory)\bin\Activate.ps1" Lib\venv\scripts\common\Activate.ps1 -Force displayName: 'Copy signed files into sources' + condition: and(succeeded(), variables['SigningCertificate']) - template: ./layout-command.yml @@ -51,7 +60,7 @@ jobs: $(LayoutCmd) --copy "$(Build.ArtifactStagingDirectory)\appx-store" --preset-appx --precompile displayName: 'Generate store APPX layout' env: - TCL_LIBRARY: $(Build.BinariesDirectory)\tcltk_lib\tcl8 + TCL_LIBRARY: $(TclLibrary) - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: layout_appxstore_$(Name)' @@ -79,7 +88,7 @@ jobs: $(LayoutCmd) --copy "$(Build.ArtifactStagingDirectory)\appx" --preset-appx --precompile --include-symbols --include-tests displayName: 'Generate sideloading APPX layout' env: - TCL_LIBRARY: $(Build.BinariesDirectory)\tcltk_lib\tcl8 + TCL_LIBRARY: $(TclLibrary) - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: layout_appx_$(Name)' diff --git a/.azure-pipelines/windows-release/stage-layout-nuget.yml b/.azure-pipelines/windows-release/stage-layout-nuget.yml index 7954c45..7e20f89 100644 --- a/.azure-pipelines/windows-release/stage-layout-nuget.yml +++ b/.azure-pipelines/windows-release/stage-layout-nuget.yml @@ -13,11 +13,16 @@ jobs: matrix: win32: Name: win32 - Python: $(Build.BinariesDirectory)\bin_$(Name)\python.exe + Python: $(Build.BinariesDirectory)\bin\python.exe PYTHONHOME: $(Build.SourcesDirectory) amd64: Name: amd64 - Python: $(Build.BinariesDirectory)\bin_$(Name)\python.exe + Python: $(Build.BinariesDirectory)\bin\python.exe + PYTHONHOME: $(Build.SourcesDirectory) + arm64: + Name: arm64 + HostArch: amd64 + Python: $(Build.BinariesDirectory)\bin_amd64\python.exe PYTHONHOME: $(Build.SourcesDirectory) steps: @@ -32,14 +37,13 @@ jobs: - powershell: | copy $(Build.BinariesDirectory)\bin\Activate.ps1 Lib\venv\scripts\common\Activate.ps1 -Force displayName: 'Copy signed files into sources' + condition: and(succeeded(), variables['SigningCertificate']) - template: ./layout-command.yml - powershell: | $(LayoutCmd) --copy "$(Build.ArtifactStagingDirectory)\nuget" --preset-nuget displayName: 'Generate nuget layout' - env: - TCL_LIBRARY: $(Build.BinariesDirectory)\bin_$(Name)\tcl\tcl8 - task: PublishPipelineArtifact@0 displayName: 'Publish Artifact: layout_nuget_$(Name)' diff --git a/.azure-pipelines/windows-release/stage-pack-msix.yml b/.azure-pipelines/windows-release/stage-pack-msix.yml index eebc63f..f17ba96 100644 --- a/.azure-pipelines/windows-release/stage-pack-msix.yml +++ b/.azure-pipelines/windows-release/stage-pack-msix.yml @@ -20,6 +20,16 @@ jobs: Artifact: appxstore Suffix: -store Upload: true + arm64: + Name: arm64 + Artifact: appx + Suffix: + ShouldSign: true + arm64_store: + Name: arm64 + Artifact: appxstore + Suffix: -store + Upload: true steps: - template: ./checkout.yml diff --git a/.azure-pipelines/windows-release/stage-pack-nuget.yml b/.azure-pipelines/windows-release/stage-pack-nuget.yml index f59bbe9..34619fc 100644 --- a/.azure-pipelines/windows-release/stage-pack-nuget.yml +++ b/.azure-pipelines/windows-release/stage-pack-nuget.yml @@ -15,6 +15,8 @@ jobs: Name: amd64 win32: Name: win32 + arm64: + Name: arm64 steps: - checkout: none diff --git a/.azure-pipelines/windows-release/stage-publish-nugetorg.yml b/.azure-pipelines/windows-release/stage-publish-nugetorg.yml index 570cdb3..5aba048 100644 --- a/.azure-pipelines/windows-release/stage-publish-nugetorg.yml +++ b/.azure-pipelines/windows-release/stage-publish-nugetorg.yml @@ -31,6 +31,11 @@ jobs: buildVersionToDownload: specific buildId: $(BuildToPublish) + - powershell: gci pythonarm*.nupkg | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del + displayName: 'Prevent publishing ARM/ARM64 packages' + workingDirectory: '$(Build.BinariesDirectory)\nuget' + condition: and(succeeded(), not(variables['PublishArmPackages'])) + - task: NuGetCommand@2 displayName: Push packages condition: and(succeeded(), eq(variables['SigningCertificate'], variables['__RealSigningCertificate'])) diff --git a/.azure-pipelines/windows-release/stage-publish-pythonorg.yml b/.azure-pipelines/windows-release/stage-publish-pythonorg.yml index 2dd354a..6c61e9a 100644 --- a/.azure-pipelines/windows-release/stage-publish-pythonorg.yml +++ b/.azure-pipelines/windows-release/stage-publish-pythonorg.yml @@ -39,6 +39,10 @@ jobs: artifactName: embed downloadPath: $(Build.BinariesDirectory) + - powershell: gci *embed-arm*.zip | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del + displayName: 'Prevent publishing ARM/ARM64 packages' + workingDirectory: '$(Build.BinariesDirectory)\embed' + condition: and(succeeded(), not(variables['PublishArmPackages'])) - task: DownloadPipelineArtifact@1 displayName: 'Download artifact from $(BuildToPublish): Doc' diff --git a/.azure-pipelines/windows-release/stage-sign.yml b/.azure-pipelines/windows-release/stage-sign.yml index 2307c6c..a0adc05 100644 --- a/.azure-pipelines/windows-release/stage-sign.yml +++ b/.azure-pipelines/windows-release/stage-sign.yml @@ -19,6 +19,8 @@ jobs: Name: win32 amd64: Name: amd64 + arm64: + Name: arm64 steps: - template: ./checkout.yml diff --git a/.azure-pipelines/windows-steps.yml b/.azure-pipelines/windows-steps.yml index 794a23a..f502c40 100644 --- a/.azure-pipelines/windows-steps.yml +++ b/.azure-pipelines/windows-steps.yml @@ -19,9 +19,11 @@ steps: - script: python.bat -m test.pythoninfo displayName: 'Display build info' + condition: and(succeeded(), variables['testRunPlatform']) - script: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results.xml" --tempdir="$(Build.BinariesDirectory)\test" displayName: 'Tests' + condition: and(succeeded(), variables['testRunPlatform']) env: PREFIX: $(Py_OutDir)\$(arch) @@ -32,4 +34,4 @@ steps: mergeTestResults: true testRunTitle: $(testRunTitle) platform: $(testRunPlatform) - condition: succeededOrFailed() + condition: and(succeededOrFailed(), variables['testRunPlatform']) |