summaryrefslogtreecommitdiffstats
path: root/.azure-pipelines/windows-release/stage-layout-embed.yml
blob: 3306e1cbc49d98182016e083d9f968e3dd1ceeb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
jobs:
- job: Make_Embed_Layout
  displayName: Make embeddable layout
  condition: and(succeeded(), eq(variables['DoEmbed'], 'true'))

  pool:
    vmName: win2016-vs2017

  workspace:
    clean: all

  strategy:
    matrix:
      win32:
        Name: win32
        Python: $(Build.BinariesDirectory)\bin\python.exe
        PYTHONHOME: $(Build.SourcesDirectory)
      amd64:
        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

  - task: DownloadPipelineArtifact@1
    displayName: 'Download artifact: bin_$(Name)'
    inputs:
      artifactName: bin_$(Name)
      targetPath: $(Build.BinariesDirectory)\bin

  - template: ./layout-command.yml

  - powershell: |
      $d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
      Write-Host "##vso[task.setvariable variable=VersionText]$($d.PythonVersion)"
    displayName: 'Extract version numbers'

  - powershell: >
      $(LayoutCmd)
      --copy "$(Build.ArtifactStagingDirectory)\layout"
      --zip "$(Build.ArtifactStagingDirectory)\embed\python-$(VersionText)-embed-$(Name).zip"
      --preset-embed
    displayName: 'Generate embeddable layout'

  - task: PublishPipelineArtifact@0
    displayName: 'Publish Artifact: layout_embed_$(Name)'
    inputs:
      targetPath: '$(Build.ArtifactStagingDirectory)\layout'
      artifactName: layout_embed_$(Name)

  - task: PublishBuildArtifacts@1
    displayName: 'Publish Artifact: embed'
    inputs:
      PathtoPublish: '$(Build.ArtifactStagingDirectory)\embed'
      ArtifactName: embed