1name: tcl$(TkSourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2
3variables:
4  IntDir: '$(Build.BinariesDirectory)\obj'
5  ExternalsDir: '$(Build.BinariesDirectory)\externals'
6  OutDir: '$(Build.ArtifactStagingDirectory)'
7  Configuration: 'Release'
8
9  # MUST BE SET AT QUEUE TIME
10  # SigningCertificate: 'Python Software Foundation'
11  # SourcesRepo: 'https://github.com/python/cpython-source-deps'
12  # TclSourceTag: 'tcl-core-8.6.12.0'
13  # TkSourceTag: 'tk-8.6.12.0'
14  # TixSourceTag: 'tix-8.4.3.6'
15
16jobs:
17- job: Build_TclTk
18  displayName: 'Tcl/Tk'
19  pool:
20    name: 'Windows Release'
21    #vmImage: windows-latest
22
23  workspace:
24    clean: all
25
26  steps:
27    - template: ./find-tools.yml
28
29    - powershell: |
30        git clone $(SourcesRepo) -b $(TclSourceTag) --depth 1 "$(ExternalsDir)\$(TclSourceTag)"
31      displayName: 'Check out Tcl sources'
32
33    - powershell: |
34        git clone $(SourcesRepo) -b $(TkSourceTag) --depth 1 "$(ExternalsDir)\$(TkSourceTag)"
35      displayName: 'Check out Tk sources'
36
37    - powershell: |
38        git clone $(SourcesRepo) -b $(TixSourceTag) --depth 1 "$(ExternalsDir)\$(TixSourceTag)"
39      displayName: 'Check out Tix sources'
40
41    # This msbuild.rsp file will be used by the build to forcibly override these variables
42    - powershell: |
43        del -Force -EA 0 msbuild.rsp
44        "/p:IntDir=$(IntDir)\" >> msbuild.rsp
45        "/p:ExternalsDir=$(ExternalsDir)\" >> msbuild.rsp
46        "/p:tclDir=$(ExternalsDir)\$(TclSourceTag)\" >> msbuild.rsp
47        "/p:tkDir=$(ExternalsDir)\$(TkSourceTag)\" >> msbuild.rsp
48        "/p:tixDir=$(ExternalsDir)\$(TixSourceTag)\" >> msbuild.rsp
49      displayName: 'Generate msbuild.rsp'
50
51    - powershell: |
52        & "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
53        & "$(msbuild)" PCbuild\tk.vcxproj  "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
54        & "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
55      displayName: 'Build for win32'
56
57    - powershell: |
58        & "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
59        & "$(msbuild)" PCbuild\tk.vcxproj  "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
60        & "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
61      displayName: 'Build for amd64'
62
63    - powershell: |
64        & "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
65        & "$(msbuild)" PCbuild\tk.vcxproj  "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
66        & "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
67      displayName: 'Build for arm64'
68
69    - publish: '$(OutDir)'
70      artifact: 'tcltk'
71      displayName: 'Publishing tcltk'
72