From 0e890a6ec1c53730c2ff347566bd3dfbf0451234 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Wed, 6 May 2020 17:43:45 -0700 Subject: [PATCH] ci: add build jobs for Python wheels --- ci/azure-pipelines.yml | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 629b4d8ef..e5984bc7a 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -13,3 +13,73 @@ jobs: parameters: name: Windows vmImage: windows-2019 + +- job: wheel_linux + pool: + vmImage: ubuntu-18.04 + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: 3.8 + + - script: | + python3.8 -m pip install --upgrade pip==20.0.2 + python3.8 -m pip install cibuildwheel==1.4.1 + python3.8 -m cibuildwheel --output-dir wheelhouse . + env: + CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' + CIBW_BEFORE_BUILD: 'ci/install-rust-linux.sh' + CIBW_BUILD: cp38-manylinux_x86_64 + CIBW_BUILD_VERBOSITY: 1 + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: wheelhouse + +- job: wheel_macos + pool: + vmImage: macOS-10.15 + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: 3.8 + + - script: | + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN + echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin" + + python3.8 -m pip install --upgrade pip==20.0.2 + python3.8 -m pip install cibuildwheel==1.4.1 + python3.8 -m cibuildwheel --output-dir wheelhouse . + env: + CIBW_BUILD: cp38-macosx_x86_64 + CIBW_BUILD_VERBOSITY: 1 + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: wheelhouse + +- job: wheel_windows + pool: + vmImage: vs2017-win2016 + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: 3.8 + + - script: | + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y --default-toolchain stable-x86_64-pc-windows-msvc + set PATH=%PATH%;%USERPROFILE%\.cargo\bin + echo "##vso[task.setvariable variable=PATH;]%PATH%;%USERPROFILE%\.cargo\bin" + + python -m pip install --upgrade pip==20.0.2 + python -m pip install cibuildwheel==1.4.1 + python -m cibuildwheel --output-dir wheelhouse . + env: + CIBW_BUILD_VERBOSITY: 1 + CIBW_BUILD: cp38-win_amd64 + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: wheelhouse