1jobs: 2- job: Make_Embed_Layout 3 displayName: Make embeddable layout 4 condition: and(succeeded(), eq(variables['DoEmbed'], 'true')) 5 6 pool: 7 vmImage: windows-2019 8 9 workspace: 10 clean: all 11 12 strategy: 13 matrix: 14 win32: 15 Name: win32 16 Python: $(Build.BinariesDirectory)\bin\python.exe 17 PYTHONHOME: $(Build.SourcesDirectory) 18 amd64: 19 Name: amd64 20 Python: $(Build.BinariesDirectory)\bin\python.exe 21 PYTHONHOME: $(Build.SourcesDirectory) 22 arm64: 23 Name: arm64 24 HostArch: amd64 25 Python: $(Build.BinariesDirectory)\bin_amd64\python.exe 26 PYTHONHOME: $(Build.SourcesDirectory) 27 28 steps: 29 - template: ./checkout.yml 30 31 - task: DownloadPipelineArtifact@1 32 displayName: 'Download artifact: bin_$(Name)' 33 inputs: 34 artifactName: bin_$(Name) 35 targetPath: $(Build.BinariesDirectory)\bin 36 37 - template: ./layout-command.yml 38 39 - powershell: | 40 $d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }}; 41 Write-Host "##vso[task.setvariable variable=VersionText]$($d.PythonVersion)" 42 displayName: 'Extract version numbers' 43 44 - powershell: > 45 $(LayoutCmd) 46 --copy "$(Build.ArtifactStagingDirectory)\layout" 47 --zip "$(Build.ArtifactStagingDirectory)\embed\python-$(VersionText)-embed-$(Name).zip" 48 --preset-embed 49 displayName: 'Generate embeddable layout' 50 51 - task: PublishPipelineArtifact@0 52 displayName: 'Publish Artifact: layout_embed_$(Name)' 53 inputs: 54 targetPath: '$(Build.ArtifactStagingDirectory)\layout' 55 artifactName: layout_embed_$(Name) 56 57 - task: PublishBuildArtifacts@1 58 displayName: 'Publish Artifact: embed' 59 inputs: 60 PathtoPublish: '$(Build.ArtifactStagingDirectory)\embed' 61 ArtifactName: embed 62