-
Notifications
You must be signed in to change notification settings - Fork 9
82 lines (72 loc) · 2.22 KB
/
buildtest_wheels.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
name: Build and Test wheels
on: workflow_dispatch
jobs:
build_sdist:
runs-on: [self-hosted, Windows]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Build sdist
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox
python -m nox --sessions build_sdist
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.tar.gz
build_wheels:
name: Build wheels on Python ${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
runs-on: ${{ matrix.os }}
needs: build_sdist
strategy:
matrix:
include:
- os: windows-latest
python: 39
platform_id: win_amd64
- os: windows-latest
python: 310
platform_id: win_amd64
- os: windows-latest
python: 311
platform_id: win_amd64
- os: macos-latest
python: 39
platform_id: macosx_x86_64
- os: macos-latest
python: 310
platform_id: macosx_x86_64
- os: macos-latest
python: 311
platform_id: macosx_x86_64
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.15.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_ARCHS: all
CIBW_BUILD_VERBOSITY: 1
CIBW_TEST_COMMAND: "pytest {project}/tests"
- name: Test wheels
continue-on-error: true
run: |
python -m pip install --upgrade pip
python -m pip install pipx
python -m pip install nox
python -m nox --sessions test_wheel
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl