-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (43 loc) · 1.4 KB
/
test_build.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
name: Test Build
# NOTE: build logic is duplicated here and in publish.yml
# Run on the master branch commit push and PRs to master (note conditional below)
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_wheels:
# Only run if the commit message contains '[ci build]'
if: "contains(toJSON(github.event.commits.*.message), '[ci build]') || contains(toJSON(github.event.pull_request.title), '[ci build]')"
strategy:
fail-fast: false
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
name: Build wheels ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Package source distribution
if: runner.os == 'Linux'
run: |
python -m pip install build
python -m build --sdist
- name: Run cibuildwheel
uses: pypa/[email protected]
with:
config-file: ".github/workflows/cibuildwheel_config.toml"
# Upload binaries to the github artifact store
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: |
./wheelhouse/*.whl
./wheelhouse/*.tar.gz
overwrite: true