-
Notifications
You must be signed in to change notification settings - Fork 42
101 lines (86 loc) · 3.15 KB
/
python-cibuildwheel.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
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
94
95
96
97
98
99
100
101
name: Python cibuildwheel
on:
push:
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
arch: [ 'x86_64' ]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.arch }}-python
- name: Build wheels on x86_64
if: matrix.arch == 'x86_64'
uses: pypa/[email protected]
env:
CIBW_BUILD: 'cp311-*'
CIBW_ARCHS_LINUX: auto64
CIBW_ARCHS_MACOS: x86_64
CIBW_SKIP: "*-musllinux_*"
# (many)linux build environment
CIBW_MANYLINUX_X86_64_IMAGE: 'keyvidev/manylinux-builder-x86_64'
CIBW_MANYLINUX_AARCH64_IMAGE: 'keyvidev/manylinux-builder-aarch64'
# macos build environment
CIBW_BEFORE_ALL_MACOS: >
brew update &&
brew install zlib snappy boost &&
brew install ccache
# ccache
CIBW_ENVIRONMENT: PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH
CIBW_ENVIRONMENT_LINUX: CCACHE_DIR=/host/$GITHUB_WORKSPACE/.ccache
CIBW_ENVIRONMENT_PASS_LINUX: GITHUB_WORKSPACE
# python dependencies
CIBW_BEFORE_BUILD: pip install -r python/requirements.txt
# testing
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
python -m pytest {package}/tests &&
python -m pytest {package}/integration-tests
with:
package-dir: python
- name: Build wheels on arm64
if: matrix.arch == 'arm64'
uses: pypa/[email protected]
env:
CIBW_BUILD: 'cp311-*'
CIBW_ARCHS_LINUX: aarch64
CIBW_ARCHS_MACOS: arm64
CIBW_SKIP: "*-musllinux_*"
# (many)linux build environment
CIBW_MANYLINUX_X86_64_IMAGE: 'keyvidev/manylinux-builder-x86_64'
CIBW_MANYLINUX_AARCH64_IMAGE: 'keyvidev/manylinux-builder-aarch64'
# macos build environment
CIBW_BEFORE_ALL_MACOS: >
brew update &&
brew install zlib snappy boost &&
brew install ccache
# ccache
CIBW_ENVIRONMENT: PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH
CIBW_ENVIRONMENT_LINUX: CCACHE_DIR=/host/$GITHUB_WORKSPACE/.ccache
CIBW_ENVIRONMENT_PASS_LINUX: GITHUB_WORKSPACE
# python dependencies
CIBW_BEFORE_BUILD: pip install -r python/requirements.txt
# testing
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: >
python -m pytest {package}/tests &&
python -m pytest {package}/integration-tests
with:
package-dir: python
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl