-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (72 loc) · 2.06 KB
/
buildwheels.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
name: Build python wheels
on:
workflow_dispatch
jobs:
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Setup pip
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build sdist
run: python -m build --sdist
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-sdist
path: dist/
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: dist
env:
CIBW_BUILD: cp311-manylinux_x86_64
CIBW_SKIP: "*-win32 *-manylinux_i686"
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL: "yum install -y openblas-devel"
CIBW_CONFIG_SETTINGS: "cmake.define.ENABLE_PYTHON_EMBED=OFF"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
cd {package} &&
pytest python/test
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- build-sdist
- build-wheels
permissions:
id-token: write
# Dedicated environments with protections for publishing are strongly recommended.
environment:
name: pypi
url: https://pypi.org/project/pygenten/
steps:
- name: Retrieve source distribution
uses: actions/download-artifact@v4
with:
name: release-sdist
path: dist/
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true