Skip to content

Commit 357bb00

Browse files
authored
Merge pull request #93 from sdpython/ci2
Include build wheel for all platforms in CI
2 parents 233c53e + 595e994 commit 357bb00

File tree

1 file changed

+48
-7
lines changed

1 file changed

+48
-7
lines changed

azure-pipelines.yml

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,50 @@ jobs:
4747
displayName: 'Build package inplace'
4848
- script: python -u setup.py unittests
4949
displayName: 'Runs Unit Tests'
50-
- script: python -u setup.py bdist_wheel
51-
displayName: 'Build wheel'
52-
#- script: python -u setup.py build_sphinx
53-
# displayName: 'Builds Documentation'
50+
- script: |
51+
python -m pip install cibuildwheel
52+
export CIBW_MANYLINUX_X86_64_IMAGE="manylinux2014"
53+
export CIBW_BEFORE_BUILD="pip install ."
54+
export CIBW_BEFORE_BUILD="pip install pybind11 cython numpy scipy pyquickhelper scikit-learn pandas pandas_streaming"
55+
export CIBW_BUILD="cp37-manylinux_x86_64 cp38-manylinux_x86_64 cp39-manylinux_x86_64"
56+
python -m cibuildwheel --output-dir dist/wheelhouse --platform linux
57+
displayName: 'Build Package manylinux2014'
5458
- task: PublishPipelineArtifact@0
5559
inputs:
5660
artifactName: 'wheel-linux-$(python.version)'
5761
targetPath: 'dist'
5862

63+
- job: 'TestWindows'
64+
pool:
65+
vmImage: 'windows-latest'
66+
strategy:
67+
matrix:
68+
Python39-Windows:
69+
python.version: '3.9'
70+
maxParallel: 3
71+
steps:
72+
- task: UsePythonVersion@0
73+
inputs:
74+
versionSpec: '$(python.version)'
75+
architecture: 'x64'
76+
- script: python -m pip install --upgrade pip setuptools wheel
77+
displayName: 'Install tools'
78+
- script: pip install -r requirements.txt
79+
displayName: 'Install Requirements'
80+
- script: python -c "import platform;print(platform.version())"
81+
displayName: 'Platform'
82+
- script: |
83+
python -m pip install cibuildwheel
84+
set CIBW_BEFORE_BUILD=pip install .
85+
set CIBW_BEFORE_BUILD=pip install pybind11 cython numpy scipy pyquickhelper scikit-learn pandas pandas_streaming
86+
set CIBW_BUILD=cp37-win_amd64 cp38-win_amd64 cp39-win_amd64
87+
python -m cibuildwheel --output-dir dist/wheelhouse
88+
displayName: 'Build Package many'
89+
- task: PublishPipelineArtifact@0
90+
inputs:
91+
artifactName: 'wheel-windows-$(python.version)'
92+
targetPath: 'dist'
93+
5994
- job: 'TestMac'
6095
pool:
6196
vmImage: 'macOS-latest'
@@ -79,7 +114,8 @@ jobs:
79114
displayName: 'gcc version'
80115
- script: brew install libomp
81116
displayName: 'Install omp'
82-
- script: brew install p7zip
117+
- script: brew upgrade p7zip
118+
continueOnError: true
83119
displayName: 'Install p7zip'
84120
- script: brew install pandoc
85121
displayName: 'Install Pandoc'
@@ -111,8 +147,13 @@ jobs:
111147
displayName: 'Build package inplace'
112148
- script: python -u setup.py unittests
113149
displayName: 'Runs Unit Tests'
114-
- script: python -u setup.py bdist_wheel
115-
displayName: 'Build wheel'
150+
- script: |
151+
python -m pip install cibuildwheel
152+
export CIBW_BEFORE_BUILD="pip install ."
153+
export CIBW_BEFORE_BUILD="pip install pybind11 cython numpy scipy pyquickhelper scikit-learn pandas pandas_streaming"
154+
export CIBW_BUILD="cp37-macosx_x86_64 cp38-macosx_x86_64 cp39-macosx_x86_64"
155+
python -m cibuildwheel --output-dir dist/wheelhouse
156+
displayName: 'Build Package many'
116157
- task: PublishPipelineArtifact@0
117158
inputs:
118159
artifactName: 'wheel-mac-$(python.version)'

0 commit comments

Comments
 (0)