Skip to content

In Windows release builds, do not attempt to copy Tcl/Tk for ARM64 when it is not being published #31918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .azure-pipelines/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ parameters:
displayName: "Publish ARM64 build"
type: boolean
default: true
# Because there is no ARM64 Tcl/Tk pre-3.11, we need a separate option
# to keep those builds working when the files are going to be absent.
# Eventually when we stop releasing anything that old, we can drop this
# argument (and make it implicitly always 'true')
- name: ARM64TclTk
displayName: "Use Tcl/Tk for ARM64"
type: boolean
default: true
- name: DoPGO
displayName: "Run PGO"
type: boolean
Expand Down Expand Up @@ -98,6 +106,8 @@ stages:
displayName: Build binaries
jobs:
- template: windows-release/stage-build.yml
parameters:
ARM64TclTk: ${{ parameters.ARM64TclTk }}

- stage: Sign
displayName: Sign binaries
Expand All @@ -110,6 +120,8 @@ stages:
dependsOn: Sign
jobs:
- template: windows-release/stage-layout-full.yml
parameters:
ARM64TclTk: ${{ parameters.ARM64TclTk }}
- template: windows-release/stage-layout-embed.yml
- template: windows-release/stage-layout-nuget.yml

Expand All @@ -130,6 +142,8 @@ stages:
condition: and(succeeded(), eq(variables['DoMSIX'], 'true'))
jobs:
- template: windows-release/stage-layout-msix.yml
parameters:
ARM64TclTk: ${{ parameters.ARM64TclTk }}

- stage: Pack_MSIX
displayName: Package MSIX
Expand All @@ -143,6 +157,8 @@ stages:
condition: and(succeeded(), eq(variables['DoMSI'], 'true'))
jobs:
- template: windows-release/stage-msi.yml
parameters:
ARM64TclTk: ${{ parameters.ARM64TclTk }}

- stage: Test_MSI
displayName: Test MSI installer
Expand Down
19 changes: 12 additions & 7 deletions .azure-pipelines/windows-release/msi-steps.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
ARM64TclTk: true

steps:
- template: ./checkout.yml

Expand Down Expand Up @@ -71,12 +74,13 @@ steps:
artifactName: tcltk_lib_amd64
targetPath: $(Build.BinariesDirectory)\tcltk_lib_amd64

- task: DownloadPipelineArtifact@1
displayName: 'Download artifact: tcltk_lib_arm64'
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
inputs:
artifactName: tcltk_lib_arm64
targetPath: $(Build.BinariesDirectory)\tcltk_lib_arm64
- ${{ if eq(parameters.ARM64TclTk, true) }}:
- task: DownloadPipelineArtifact@1
displayName: 'Download artifact: tcltk_lib_arm64'
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
inputs:
artifactName: tcltk_lib_arm64
targetPath: $(Build.BinariesDirectory)\tcltk_lib_arm64

- powershell: |
copy $(Build.BinariesDirectory)\amd64\Activate.ps1 Lib\venv\scripts\common\Activate.ps1 -Force
Expand Down Expand Up @@ -137,8 +141,9 @@ steps:
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe
PYTHONHOME: $(Build.SourcesDirectory)
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_arm64
BuildForRelease: true
${{ if eq(parameters.ARM64TclTk, true) }}:
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_arm64

- task: CopyFiles@2
displayName: 'Assemble artifact: msi (win32)'
Expand Down
27 changes: 16 additions & 11 deletions .azure-pipelines/windows-release/stage-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
ARM64TclTk: true

jobs:
- job: Build_Docs
displayName: Docs build
Expand Down Expand Up @@ -166,12 +169,13 @@ jobs:
platform: x64
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_amd64"

- task: MSBuild@1
displayName: 'Copy Tcl/Tk lib for publish'
inputs:
solution: PCbuild\tcltk.props
platform: ARM64
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_arm64"
- ${{ if eq(parameters.ARM64TclTk, true) }}:
- task: MSBuild@1
displayName: 'Copy Tcl/Tk lib for publish'
inputs:
solution: PCbuild\tcltk.props
platform: ARM64
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_arm64"

- task: PublishPipelineArtifact@0
displayName: 'Publish artifact: tcltk_lib_win32'
Expand All @@ -185,8 +189,9 @@ jobs:
targetPath: '$(Build.ArtifactStagingDirectory)\tcl_amd64'
artifactName: tcltk_lib_amd64

- task: PublishPipelineArtifact@0
displayName: 'Publish artifact: tcltk_lib_arm64'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)\tcl_arm64'
artifactName: tcltk_lib_arm64
- ${{ if eq(parameters.ARM64TclTk, true) }}:
- task: PublishPipelineArtifact@0
displayName: 'Publish artifact: tcltk_lib_arm64'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)\tcl_arm64'
artifactName: tcltk_lib_arm64
6 changes: 5 additions & 1 deletion .azure-pipelines/windows-release/stage-layout-full.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
ARM64TclTk: true

jobs:
- job: Make_Layouts
displayName: Make layouts
Expand Down Expand Up @@ -26,7 +29,8 @@ jobs:
HostArch: amd64
Python: $(Build.BinariesDirectory)\bin_amd64\python.exe
PYTHONHOME: $(Build.SourcesDirectory)
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
${{ if eq(parameters.ARM64TclTk, true) }}:
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8

steps:
- template: ./checkout.yml
Expand Down
6 changes: 5 additions & 1 deletion .azure-pipelines/windows-release/stage-layout-msix.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
ARM64TclTk: true

jobs:
- job: Make_MSIX_Layout
displayName: Make MSIX layout
Expand Down Expand Up @@ -25,7 +28,8 @@ jobs:
HostArch: amd64
Python: $(Build.BinariesDirectory)\bin_amd64\python.exe
PYTHONHOME: $(Build.SourcesDirectory)
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
${{ if eq(parameters.ARM64TclTk, true) }}:
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8

steps:
- template: ./checkout.yml
Expand Down
7 changes: 7 additions & 0 deletions .azure-pipelines/windows-release/stage-msi.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
ARM64TclTk: true

jobs:
- job: Make_MSI
displayName: Make MSI
Expand All @@ -16,6 +19,8 @@ jobs:

steps:
- template: msi-steps.yml
parameters:
ARM64TclTk: ${{ parameters.ARM64TclTk }}

- job: Make_Signed_MSI
displayName: Make signed MSI
Expand All @@ -34,3 +39,5 @@ jobs:

steps:
- template: msi-steps.yml
parameters:
ARM64TclTk: ${{ parameters.ARM64TclTk }}