summaryrefslogtreecommitdiffstats
path: root/.azure-pipelines/windows-release/stage-test-nuget.yml
blob: 94d815e95226ef38853d570cea34c05c09efeea5 (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
jobs:
- job: Test_Nuget
  displayName: Test Nuget
  condition: and(succeeded(), eq(variables['DoNuget'], 'true'))

  pool:
    vmImage: windows-2019

  workspace:
    clean: all

  strategy:
    matrix:
      win32:
        Package: pythonx86
      amd64:
        Package: python

  steps:
  - checkout: none

  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: nuget'
    inputs:
      artifactName: nuget
      downloadPath: $(Build.BinariesDirectory)

  - task: NugetToolInstaller@0
    inputs:
      versionSpec: '>= 5'

  - powershell: >
      nuget install
      $(Package)
      -Source "$(Build.BinariesDirectory)\nuget"
      -OutputDirectory "$(Build.BinariesDirectory)\install"
      -Prerelease
      -ExcludeVersion
      -NonInteractive
    displayName: 'Install Python'

  - powershell: |
      $p = gi "$(Build.BinariesDirectory)\install\$(Package)\tools\python.exe"
      Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)"
    displayName: 'Add test Python to PATH'

  - script: |
      python -c "import sys; print(sys.version)"
    displayName: 'Collect version number'

  - script: |
      python -m site
    displayName: 'Collect site'

  - script: |
      python -m pip install "azure<0.10"
      python -m pip uninstall -y azure python-dateutil six
    displayName: 'Test (un)install package'