forked from mitsuba-renderer/mitsuba3
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.7 KB
/
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
name: Build Python wheels
on:
workflow_dispatch:
inputs:
upload:
description: 'Upload wheels to PyPI? (0: no, 1: yes)'
required: true
default: '0'
jobs:
build_wheels:
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
python: [cp38, cp39, cp310, cp311, cp312, cp313]
fail-fast: false
name: >
${{ matrix.python }} wheel for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: Wandalen/[email protected]
with:
action: actions/checkout@v3
with: |
submodules: recursive
attempt_limit: 3
attempt_delay: 2000
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Prepare compiler environment for Windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.20.0
- name: Build wheels
env:
CIBW_BUILD: ${{ matrix.python }}-*
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
upload_pypi:
name: Upload wheels to PyPI
runs-on: ubuntu-latest
if: ${{ github.event.inputs.upload == '1'}}
needs: [build_wheels]
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}