|
1 |
| -# Starter pipeline |
2 |
| -# Start with a minimal pipeline that you can customize to build and deploy your code. |
3 |
| -# Add steps that build, run tests, deploy, and more: |
4 |
| -# https://aka.ms/yaml |
| 1 | +variables: |
| 2 | + CIBW_BEFORE_BUILD: pip install pybind11==2.4.3 |
| 3 | + CIBW_SKIP: cp27-win* |
5 | 4 |
|
6 |
| -trigger: |
7 |
| -- master |
| 5 | +jobs: |
| 6 | + - job: unit_linux |
| 7 | + pool: { vmImage: "ubuntu-latest" } |
| 8 | + steps: |
| 9 | + - script: | |
| 10 | + cd tests |
| 11 | + make && ./tester |
| 12 | + displayName: Run unit tests |
| 13 | +
|
| 14 | + - job: python_linux |
| 15 | + pool: { vmImage: "Ubuntu-16.04" } |
| 16 | + steps: |
| 17 | + - task: UsePythonVersion@0 |
| 18 | + - bash: | |
| 19 | + # Make the header files available to the build. |
| 20 | + cp *.h python |
| 21 | + python -m pip install --upgrade pip |
| 22 | + pip install cibuildwheel==0.12.0 |
| 23 | + cd python |
| 24 | + cibuildwheel --output-dir wheelhouse . |
| 25 | + - task: PublishBuildArtifacts@1 |
| 26 | + inputs: { pathtoPublish: "python/wheelhouse" } |
| 27 | + - script: | |
| 28 | + pip install black==19.10b0 |
| 29 | + black --check python/ |
| 30 | + displayName: Check Python code format |
8 | 31 |
|
9 |
| -pool: |
10 |
| - vmImage: 'ubuntu-latest' |
| 32 | + - job: python_macos |
| 33 | + pool: { vmImage: "macOS-10.13" } |
| 34 | + variables: |
| 35 | + # Support C++11: https://github.com/joerick/cibuildwheel/pull/156 |
| 36 | + MACOSX_DEPLOYMENT_TARGET: 10.9 |
| 37 | + steps: |
| 38 | + - task: UsePythonVersion@0 |
| 39 | + - bash: | |
| 40 | + # Make the header files available to the build. |
| 41 | + cp *.h python |
| 42 | + python -m pip install --upgrade pip |
| 43 | + pip install cibuildwheel==0.12.0 |
| 44 | + cd python |
| 45 | + cibuildwheel --output-dir wheelhouse . |
| 46 | + - task: PublishBuildArtifacts@1 |
| 47 | + inputs: { pathtoPublish: "python/wheelhouse" } |
11 | 48 |
|
12 |
| -steps: |
| 49 | + - job: python_windows |
| 50 | + pool: { vmImage: "vs2017-win2016" } |
| 51 | + steps: |
| 52 | + - { |
| 53 | + task: UsePythonVersion@0, |
| 54 | + inputs: { versionSpec: "2.7", architecture: x86 }, |
| 55 | + } |
| 56 | + - { |
| 57 | + task: UsePythonVersion@0, |
| 58 | + inputs: { versionSpec: "2.7", architecture: x64 }, |
| 59 | + } |
| 60 | + - { |
| 61 | + task: UsePythonVersion@0, |
| 62 | + inputs: { versionSpec: "3.5", architecture: x86 }, |
| 63 | + } |
| 64 | + - { |
| 65 | + task: UsePythonVersion@0, |
| 66 | + inputs: { versionSpec: "3.5", architecture: x64 }, |
| 67 | + } |
| 68 | + - { |
| 69 | + task: UsePythonVersion@0, |
| 70 | + inputs: { versionSpec: "3.6", architecture: x86 }, |
| 71 | + } |
| 72 | + - { |
| 73 | + task: UsePythonVersion@0, |
| 74 | + inputs: { versionSpec: "3.6", architecture: x64 }, |
| 75 | + } |
| 76 | + - { |
| 77 | + task: UsePythonVersion@0, |
| 78 | + inputs: { versionSpec: "3.7", architecture: x86 }, |
| 79 | + } |
| 80 | + - { |
| 81 | + task: UsePythonVersion@0, |
| 82 | + inputs: { versionSpec: "3.7", architecture: x64 }, |
| 83 | + } |
| 84 | + - script: choco install vcpython27 -f -y |
| 85 | + displayName: Install Visual C++ for Python 2.7 |
| 86 | + - bash: | |
| 87 | + cp *.h python |
| 88 | + python -m pip install --upgrade pip |
| 89 | + pip install cibuildwheel==0.12.0 |
| 90 | + cd python |
| 91 | + cibuildwheel --output-dir wheelhouse . |
| 92 | + - task: PublishBuildArtifacts@1 |
| 93 | + inputs: { pathtoPublish: "python/wheelhouse" } |
| 94 | + |
| 95 | +trigger: |
| 96 | + - master |
13 | 97 |
|
14 |
| -- script: | |
15 |
| - cd tests |
16 |
| - make && ./tester |
17 |
| - displayName: 'Run unit tests' |
| 98 | +pr: |
| 99 | + branches: |
| 100 | + include: |
| 101 | + - "*" |
0 commit comments