-
Notifications
You must be signed in to change notification settings - Fork 10
124 lines (101 loc) · 3.45 KB
/
build_wheels.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Build wheels
on: [push, pull_request]
# Cannot use cibuildwheels because the current images used by cibuildwheels do not support C++17.
jobs:
build_wheels_windows:
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.arch }} wheels
runs-on: ${{ matrix.os }}
env:
TEMP: C:\Temp
TMP: C:\Temp
strategy:
matrix:
os: [windows-2022]
arch: [x86, x64]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Check LongPathsEnabled
run: |
(Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- name: Install packages
run: |
pip install wheel
pip install setuptools
pip install build
- name: build
run: python -m build
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl
build_wheels_mac:
name: ${{ matrix.os }} ${{ matrix.python-version }} wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Trying to use cibuildwheels to build mac wheels fails because the version of XCode is not high enough.
# There is documentation here https://github.com/pypa/cibuildwheel/blob/main/docs/cpp_standards.md on how to
# set it but I could not get it to work while using the standard images provided by github actions does work.
os: [macos-latest, macos-13]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
env:
SYSTEM_VERSION_COMPAT: 0
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: |
pip install wheel
pip install setuptools
pip install build
- name: build
run: python -m build
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl
build_wheels_manylinux:
name: Build manylinux wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: |
pip install wheel
pip install setuptools
pip install build
pip install cibuildwheel
- name: build
run: cibuildwheel --platform linux
env:
CIBW_BUILD: cp3?-*
CIBW_ARCHS: x86_64 aarch64
CIBW_ENVIRONMENT: CXXFLAGS="-std=c++17"
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_BEFORE_BUILD: |
yum install -y gcc gcc-c++
- name: upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl