summaryrefslogtreecommitdiff
path: root/.azure-pipelines.yml
blob: bb5e9777d2eb16f466607f4bbe694e0f8c1fc7aa (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
trigger:
  branches:
    include:
      - master
      - '*.x'
  tags:
    include:
      - '*'

jobs:
  - job: Test

    variables:
      vmImage: 'ubuntu-latest'
      python.version: '3.8'
      TOXENV: 'py'

    strategy:
      matrix:
        Python 3.8 Linux:
          vmImage: 'ubuntu-latest'
        Python 3.8 Windows:
          vmImage: 'windows-latest'
        Python 3.8 Mac:
          vmImage: 'macos-latest'
        PyPy 3 Linux:
          python.version: 'pypy3'
        Python 3.7 Linux:
          python.version: '3.7'
        Python 3.6 Linux:
          python.version: '3.6'
        Docs:
          TOXENV: 'docs'
        Style:
          TOXENV: 'style'

    pool:
      vmImage: $[ variables.vmImage ]

    steps:
      - task: UsePythonVersion@0
        inputs:
          versionSpec: $(python.version)
        displayName: Use Python $(python.version)

      - script: pip --disable-pip-version-check install -U tox
        displayName: Install tox

      - script: tox
        displayName: Run tox

  - job: Build
    dependsOn: Test
    condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')

    variables:
      CIBW_SKIP: 'cp27-* cp35-*'

    strategy:
      matrix:
        Linux:
          vmImage: 'ubuntu-latest'
        Windows:
          vmImage: 'windows-latest'
        Mac:
          vmImage: 'macos-latest'

    pool:
      vmImage: $[ variables.vmImage ]

    steps:
      - task: UsePythonVersion@0
        displayName: Use Python

      - script: pip install cibuildwheel
        displayName: Install cibuildwheel

      - script: cibuildwheel --output-dir wheels .
        displayName: Run cibuildwheel

      - publish: 'wheels'