forked from mmschlk/shapiq
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (74 loc) · 2.2 KB
/
Copy pathbuild.yml
File metadata and controls
76 lines (74 loc) · 2.2 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
name: Build Wheels and SDist
on:
# pull_request:
workflow_call:
inputs:
ref:
description: 'Git ref to build (tag, branch, SHA). Defaults to current SHA.'
required: false
default: ''
type: string
push:
branches: [main]
workflow_dispatch:
jobs:
build-wheels:
name: Build wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
- os: macos-14 # Apple Silicon
cibw_archs_macos: arm64
- os: macos-15-intel # Intel x86_64
cibw_archs_macos: x86_64
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ inputs.ref || github.sha }}
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
enable-cache: true
# libomp is installed via `brew install libomp` inside build_wheels.sh and
# static-linked into the extension — see that script for the rationale.
- name: Build wheels
shell: bash -el {0}
run: bash build_tools/wheels/build_wheels.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CIBW_ARCHS_LINUX: "x86_64"
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_ARCHS_MACOS: ${{ matrix.cibw_archs_macos }}
UV_PYTHON: ""
- name: Check wheels were produced
shell: bash
run: ls wheelhouse/*.whl | wc -l
- uses: actions/upload-artifact@v7
# Only upload when called from publish workflow (has a ref input)
if: ${{ inputs.ref != '' }}
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ inputs.ref || github.sha }}
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
enable-cache: true
- run: uv build --sdist
- uses: actions/upload-artifact@v7
if: ${{ inputs.ref != '' }}
with:
name: sdist
path: dist/*.tar.gz