forked from scikit-image/scikit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (103 loc) · 3.93 KB
/
cibuildwheel.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build CI wheels
on:
push:
branches:
- master
- v[0-9]+.[0-9]+.x
- cibuildwheel
tags:
- v*
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.7'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3
- name: Build wheels for CPython 3.9 and Mac OS
if: matrix.os == 'macos-latest'
run: |
brew install libomp
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp39-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
# CIBW_BEFORE_BUILD: pip install certifi numpy==1.19.3
CC: /usr/bin/clang
CXX: /usr/bin/clang++
CPPFLAGS: "-Xpreprocessor -fopenmp"
CFLAGS: "-Wno-implicit-function-declaration -I/usr/local/opt/libomp/include"
CXXFLAGS: "-I/usr/local/opt/libomp/include"
LDFLAGS: "-Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp"
CIBW_TEST_REQUIRES: pytest pooch pytest-localserver pytest-faulthandler
CIBW_TEST_COMMAND: pytest --pyargs skimage
- name: Build wheels for CPython 3.9 (Linux and Windows)
if: matrix.os != 'macos-latest'
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp39-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
# CIBW_BEFORE_BUILD: pip install certifi numpy==1.19.3
CIBW_TEST_REQUIRES: pytest pooch pytest-localserver pytest-faulthandler
CIBW_TEST_COMMAND: pytest --pyargs skimage
- name: Build wheels for CPython (MacOS)
if: matrix.os == 'macos-latest'
run: |
brew install libomp
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp3?-*"
CIBW_SKIP: "cp35-* cp36-* cp39-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
# CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
CC: /usr/bin/clang
CXX: /usr/bin/clang++
CPPFLAGS: "-Xpreprocessor -fopenmp"
CFLAGS: "-Wno-implicit-function-declaration -I/usr/local/opt/libomp/include"
CXXFLAGS: "-I/usr/local/opt/libomp/include"
LDFLAGS: "-Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp"
CIBW_TEST_REQUIRES: pytest pooch pytest-localserver pytest-faulthandler
CIBW_TEST_COMMAND: pytest --pyargs skimage
- name: Build wheels for CPython (Linux and Windows)
if: matrix.os != 'macos-latest'
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp3?-*"
CIBW_SKIP: "cp35-* cp36-* cp39-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
# CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
CIBW_TEST_REQUIRES: pytest pooch pytest-localserver pytest-faulthandler
CIBW_TEST_COMMAND: pytest --pyargs skimage
- name: Build wheels for CPython 3.6
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp36-*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
CIBW_MANYLINUX_I686_IMAGE: manylinux1
# CIBW_BEFORE_BUILD: pip install certifi numpy==1.16
if: >
startsWith(github.ref, 'refs/heads/v0.17') ||
startsWith(github.ref, 'refs/tags/v0.17')
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./dist/*.whl