jobs:
- job: linux
  pool: {vmImage: 'ubuntu-latest'}
  steps:
    - task: UsePythonVersion@0
    - bash: |
        set -o errexit
        python3 -m pip install --upgrade pip
        pip3 install cibuildwheel==2.1.2
      displayName: Install dependencies
    - bash: cibuildwheel --output-dir wheelhouse .
      displayName: Build wheels
    - task: PublishBuildArtifacts@1
      inputs: {pathtoPublish: 'wheelhouse'}

- job: macos
  pool: {vmImage: 'macOS-latest'}
  variables:
    CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
    # Skip trying to test arm64 builds on Intel Macs
    # CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
    # Disable building PyPy wheels
    CIBW_SKIP: pp*

  steps:
    - task: UsePythonVersion@0
    - bash: |
        set -o errexit
        python3 -m pip install --upgrade pip
        python3 -m pip install cibuildwheel==2.1.2
      displayName: Install dependencies
    - bash: cibuildwheel --output-dir wheelhouse .
      displayName: Build wheels
    - task: PublishBuildArtifacts@1
      inputs: {pathtoPublish: wheelhouse}

# - job: windows
#   pool: {vmImage: 'windows-latest'}
#   steps:
#     - task: UsePythonVersion@0
#     - bash: |
#         set -o errexit
#         python -m pip install --upgrade pip
#         pip install cibuildwheel==2.1.2
#       displayName: Install dependencies
#     - bash: cibuildwheel --output-dir wheelhouse .
#       displayName: Build wheels
#     - task: PublishBuildArtifacts@1
#       inputs: {pathtoPublish: 'wheelhouse'}
