-
Notifications
You must be signed in to change notification settings - Fork 299
76 lines (67 loc) · 2.3 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
name: Python build one single wheel
on:
workflow_call:
inputs:
python-version:
required: true
type: string
os:
required: true
type: string
arch:
required: true
type: string
jobs:
build:
#name: py${{ inputs.python-version }}-${{ inputs.os }}-${{ inputs.arch }}
runs-on: ${{ inputs.os }}-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9.x
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install requests packaging
- name: Figure out the TestPyPi/PyPi Version
shell: bash
run: |
if [[ "$GITHUB_REF" == *"refs/tags"* ]]; then
python dev/extract_version.py --pypi --replace-setup-py
else
python dev/extract_version.py --replace-setup-py
fi;
- name: Set up QEMU
if: ${{ runner.os == 'Linux' }}
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build and test wheels
uses: pypa/cibuildwheel@v2.17.0
env:
MACOSX_DEPLOYMENT_TARGET: 10.9
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
CIBW_BEFORE_BUILD: >
pip install setuptools wheel Cython requests jinja2 pyyaml
CIBW_ENVIRONMENT_LINUX: COOLPROP_CMAKE=default,NATIVE
CIBW_BUILD: cp${{ inputs.python-version }}-*
CIBW_ARCHS_MACOS: ${{ inputs.arch }} # x86_64 arm64 # universal2 is redundant
CIBW_ARCHS_WINDOWS: ${{ inputs.arch }} # AMD64 x86 # ARM64 creates problems with msgpack-c
CIBW_ARCHS_LINUX: ${{ inputs.arch }} # i686 x86_64 aarch64 ppc64le s390x
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
CIBW_SKIP: "pp*"
CIBW_TEST_SKIP: "*-macosx_arm64 *-win_arm64"
with:
package-dir: ./wrappers/Python/
output-dir: Python
- name: Store artifacts
uses: actions/upload-artifact@v3
with:
name: Python
path: Python