-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (66 loc) · 1.75 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
name: Build Wheels
on:
push:
branches: main
jobs:
codegen:
name: Run Codegen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Ruff
run: |
python -m pip install cffi ruff
- name: Run Codegen
run: |
python codegen/fetch_wgpu_bins.py
bun codegen/generate.ts
- uses: actions/upload-artifact@v3
with:
name: codegen-${{ github.run_id }}-${{ github.run_number }}
path: ./xgpu/*.py
build_wheels:
name: Build wheels on ${{ matrix.os }}
needs: codegen
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Download binaries
run: |
python codegen/fetch_wgpu_bins.py
- uses: actions/download-artifact@v3
with:
name: codegen-${{ github.run_id }}-${{ github.run_number }}
path: xgpu/
- name: Build Wheels
run: |
python -m pip install cibuildwheel==2.16.2
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
upload:
name: Release To PyPi
needs: build_wheels
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]