Skip to content

Commit cb495a1

Browse files
authored
In Windows release builds, do not attempt to copy Tcl/Tk for ARM64 when it is not being published (GH-31918)
1 parent 49e1e1e commit cb495a1

File tree

6 files changed

+61
-20
lines changed

6 files changed

+61
-20
lines changed

.azure-pipelines/windows-release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ parameters:
3838
displayName: "Publish ARM64 build"
3939
type: boolean
4040
default: true
41+
# Because there is no ARM64 Tcl/Tk pre-3.11, we need a separate option
42+
# to keep those builds working when the files are going to be absent.
43+
# Eventually when we stop releasing anything that old, we can drop this
44+
# argument (and make it implicitly always 'true')
45+
- name: ARM64TclTk
46+
displayName: "Use Tcl/Tk for ARM64"
47+
type: boolean
48+
default: true
4149
- name: DoPGO
4250
displayName: "Run PGO"
4351
type: boolean
@@ -98,6 +106,8 @@ stages:
98106
displayName: Build binaries
99107
jobs:
100108
- template: windows-release/stage-build.yml
109+
parameters:
110+
ARM64TclTk: ${{ parameters.ARM64TclTk }}
101111

102112
- stage: Sign
103113
displayName: Sign binaries
@@ -110,6 +120,8 @@ stages:
110120
dependsOn: Sign
111121
jobs:
112122
- template: windows-release/stage-layout-full.yml
123+
parameters:
124+
ARM64TclTk: ${{ parameters.ARM64TclTk }}
113125
- template: windows-release/stage-layout-embed.yml
114126
- template: windows-release/stage-layout-nuget.yml
115127

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

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

147163
- stage: Test_MSI
148164
displayName: Test MSI installer

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
ARM64TclTk: true
3+
14
steps:
25
- template: ./checkout.yml
36

@@ -71,12 +74,13 @@ steps:
7174
artifactName: tcltk_lib_amd64
7275
targetPath: $(Build.BinariesDirectory)\tcltk_lib_amd64
7376

74-
- task: DownloadPipelineArtifact@1
75-
displayName: 'Download artifact: tcltk_lib_arm64'
76-
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
77-
inputs:
78-
artifactName: tcltk_lib_arm64
79-
targetPath: $(Build.BinariesDirectory)\tcltk_lib_arm64
77+
- ${{ if eq(parameters.ARM64TclTk, true) }}:
78+
- task: DownloadPipelineArtifact@1
79+
displayName: 'Download artifact: tcltk_lib_arm64'
80+
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
81+
inputs:
82+
artifactName: tcltk_lib_arm64
83+
targetPath: $(Build.BinariesDirectory)\tcltk_lib_arm64
8084

8185
- powershell: |
8286
copy $(Build.BinariesDirectory)\amd64\Activate.ps1 Lib\venv\scripts\common\Activate.ps1 -Force
@@ -137,8 +141,9 @@ steps:
137141
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
138142
PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe
139143
PYTHONHOME: $(Build.SourcesDirectory)
140-
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_arm64
141144
BuildForRelease: true
145+
${{ if eq(parameters.ARM64TclTk, true) }}:
146+
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_arm64
142147
143148
- task: CopyFiles@2
144149
displayName: 'Assemble artifact: msi (win32)'

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

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
ARM64TclTk: true
3+
14
jobs:
25
- job: Build_Docs
36
displayName: Docs build
@@ -166,12 +169,13 @@ jobs:
166169
platform: x64
167170
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_amd64"
168171

169-
- task: MSBuild@1
170-
displayName: 'Copy Tcl/Tk lib for publish'
171-
inputs:
172-
solution: PCbuild\tcltk.props
173-
platform: ARM64
174-
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_arm64"
172+
- ${{ if eq(parameters.ARM64TclTk, true) }}:
173+
- task: MSBuild@1
174+
displayName: 'Copy Tcl/Tk lib for publish'
175+
inputs:
176+
solution: PCbuild\tcltk.props
177+
platform: ARM64
178+
msbuildArguments: /t:CopyTclTkLib /p:OutDir="$(Build.ArtifactStagingDirectory)\tcl_arm64"
175179

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

188-
- task: PublishPipelineArtifact@0
189-
displayName: 'Publish artifact: tcltk_lib_arm64'
190-
inputs:
191-
targetPath: '$(Build.ArtifactStagingDirectory)\tcl_arm64'
192-
artifactName: tcltk_lib_arm64
192+
- ${{ if eq(parameters.ARM64TclTk, true) }}:
193+
- task: PublishPipelineArtifact@0
194+
displayName: 'Publish artifact: tcltk_lib_arm64'
195+
inputs:
196+
targetPath: '$(Build.ArtifactStagingDirectory)\tcl_arm64'
197+
artifactName: tcltk_lib_arm64

.azure-pipelines/windows-release/stage-layout-full.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
ARM64TclTk: true
3+
14
jobs:
25
- job: Make_Layouts
36
displayName: Make layouts
@@ -26,7 +29,8 @@ jobs:
2629
HostArch: amd64
2730
Python: $(Build.BinariesDirectory)\bin_amd64\python.exe
2831
PYTHONHOME: $(Build.SourcesDirectory)
29-
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
32+
${{ if eq(parameters.ARM64TclTk, true) }}:
33+
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
3034

3135
steps:
3236
- template: ./checkout.yml

.azure-pipelines/windows-release/stage-layout-msix.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
ARM64TclTk: true
3+
14
jobs:
25
- job: Make_MSIX_Layout
36
displayName: Make MSIX layout
@@ -25,7 +28,8 @@ jobs:
2528
HostArch: amd64
2629
Python: $(Build.BinariesDirectory)\bin_amd64\python.exe
2730
PYTHONHOME: $(Build.SourcesDirectory)
28-
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
31+
${{ if eq(parameters.ARM64TclTk, true) }}:
32+
TclLibrary: $(Build.BinariesDirectory)\tcltk_lib\tcl8
2933

3034
steps:
3135
- template: ./checkout.yml

.azure-pipelines/windows-release/stage-msi.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
parameters:
2+
ARM64TclTk: true
3+
14
jobs:
25
- job: Make_MSI
36
displayName: Make MSI
@@ -16,6 +19,8 @@ jobs:
1619

1720
steps:
1821
- template: msi-steps.yml
22+
parameters:
23+
ARM64TclTk: ${{ parameters.ARM64TclTk }}
1924

2025
- job: Make_Signed_MSI
2126
displayName: Make signed MSI
@@ -34,3 +39,5 @@ jobs:
3439

3540
steps:
3641
- template: msi-steps.yml
42+
parameters:
43+
ARM64TclTk: ${{ parameters.ARM64TclTk }}

0 commit comments

Comments
 (0)