-
Notifications
You must be signed in to change notification settings - Fork 216
69 lines (59 loc) · 2.04 KB
/
wheels-workflow.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
name: Build Wheels
on:
release:
types: [published]
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019, macos-11]
python: [38, 39, 310, 311, 312]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set platform
id: platform
shell: bash
run: |
if [ ${{ runner.os }} = 'Linux' ]; then
echo "build_platform=manylinux" >> $GITHUB_OUTPUT
elif [ ${{ runner.os }} = 'macOS' ]; then
echo "build_platform=macosx" >> $GITHUB_OUTPUT
elif [ ${{ runner.os }} = 'Windows' ]; then
echo "build_platform=win_amd64" >> $GITHUB_OUTPUT
fi
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: auto64
CIBW_BUILD: cp${{ matrix.python }}-${{ steps.platform.outputs.build_platform }}*
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.13
CIBW_TEST_COMMAND: pytest --strict-markers -m 'not slow' -k 'not test_fit_and_predict_linear_regression' {project}/tests
CIBW_TEST_COMMAND_WINDOWS: pytest --strict-markers -m "not slow" -k "not test_fit_and_predict_linear_regression" {project}\\tests
CIBW_TEST_REQUIRES: pytest
# Skip trying to test arm64 builds on Intel Macs
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_universal2:arm64"
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
path: dist/*.tar.gz