-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (87 loc) · 2.39 KB
/
CI.yml
File metadata and controls
93 lines (87 loc) · 2.39 KB
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
93
name: build-wheels
on:
push:
branches: ['main', 'master']
tags: ['v*']
paths-ignore: ["**/**.md"]
pull_request:
workflow_dispatch:
jobs:
wheels:
strategy:
fail-fast: false
matrix:
include:
- label: linux-x86_64
os: ubuntu-latest
cibw_archs: "x86_64"
- label: linux-aarch64
os: ubuntu-22.04-arm
cibw_archs: "aarch64"
- label: windows
os: windows-latest
cibw_archs: "AMD64"
- label: macos
os: macos-14
cibw_archs: "arm64"
name: build-${{ matrix.label }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: pypa/cibuildwheel@v3.3.0
env:
CIBW_BEFORE_ALL_LINUX: |
if [ -f "/etc/alpine-release" ]; then
apk add --no-cache libsndfile-dev
else
yum install -y libsndfile-devel
fi
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_TEST_REQUIRES: "numpy pytest soundfile"
CIBW_TEST_COMMAND: "pytest {project}/tests"
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.label }}
path: wheelhouse/*.whl
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install build
- run: python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
bundle:
needs:
- wheels
- sdist
runs-on: ubuntu-latest
steps:
- name: Download wheel archives
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: artifacts
- name: Download sdist archive
uses: actions/download-artifact@v4
with:
name: sdist
path: artifacts
- name: Gather all distributions
run: |
mkdir -p all_dist
find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec cp {} all_dist/ \;
- uses: actions/upload-artifact@v4
with:
name: distribution-files
path: all_dist