-
Notifications
You must be signed in to change notification settings - Fork 5
73 lines (60 loc) · 1.65 KB
/
build-ci.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
name: Build
on:
push:
branches:
- trial/actions
pull_request:
branches:
- trial/actions
types: [opened, reopened, synchronize]
jobs:
install_and_test:
name: Install project and test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: " 3.13.0-alpha.3"
- name: "Install project on ${{ matrix.os }}"
run: |
pip install .
- name: Run tests on ${{ matrix.os }}
run: |
python tests/test_audioop.py
build_wheels:
if: github.event_name == 'push'
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: [install_and_test]
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.18.0
env:
CIBW_BUILD: "cp313-*"
CIBW_PRERELEASE_PYTHONS: true
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
upload_pypi:
if: github.event_name == 'push' && github.ref_type == 'tag'
name: Publish built wheels to Pypi
runs-on: ubuntu-latest
environment: release
needs: [install_and_test, build_wheels]
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
name: Publish to PyPI