-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (80 loc) · 2.28 KB
/
package.yaml
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
name: Packaging
on:
release:
types: [published]
workflow_dispatch:
env:
PROJECT: buvar
jobs:
package_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install setuptools
- name: Build source distribution
run: |
python setup.py sdist
ls -la ./dist
- name: archive artifacts
uses: actions/upload-artifact@v4
with:
name: buvar-${{ github.ref }}
path: |
./dist/${PROJECT}*.tar.gz
package_wheels:
strategy:
fail-fast: false
matrix:
platform:
- manylinux2014_x86_64
version:
- cp312-cp312
- cp311-cp311
- cp310-cp310
- cp39-cp39
- cp38-cp38
# - cp37-cp37m
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64:latest
steps:
# XXX FIXME see checkout@v4 not working with container
# https://github.com/actions/checkout/issues/1487
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build wheels
run: |
export PATH="/opt/python/${{ matrix.version }}/bin:${PATH}"
pip wheel -w ./wheelhouse cython pip
pip install -U cython pip -f ./wheelhouse
python setup.py bdist_wheel -d wheels
auditwheel repair ./wheels/${PROJECT}*${{ matrix.version }}*.whl \
--plat ${{ matrix.platform }} -w ./dist
pip install ./dist/${PROJECT}*${{ matrix.version }}*.whl
pip install "${PROJECT}[tests]" -f ./dist -f ./wheelhouse
pytest tests
- name: archive artifacts
uses: actions/upload-artifact@v4
with:
name: buvar-${{ matrix.version }}-${{ matrix.platform }}
path: |
./dist/${PROJECT}*${{ matrix.version }}*.whl
upload:
needs:
- package_sdist
- package_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: buvar-${{ github.ref }}
- name: Upload to pypi.org
run: |
pip install twine
ls -la ./dist/${PROJECT}*