-
Notifications
You must be signed in to change notification settings - Fork 46
86 lines (76 loc) · 3.08 KB
/
python-wheels-emulated.yml
File metadata and controls
86 lines (76 loc) · 3.08 KB
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
name: Python-manylinux-arch
on:
workflow_call:
inputs:
os:
description: 'Host OS'
required: false
type: string
default: '["ubuntu-latest"]'
arch:
description: 'Architecture target'
required: true
type: string
permissions: write-all
jobs:
build_wheels:
name: Build Python wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ${{ fromJSON(inputs.os) }}
env:
# Skip 32-bit windows wheels builds.
CIBW_SKIP: "*-win32* pp38-* pp39-* pp310-* pp311-*"
CIBW_ARCHS: ${{inputs.arch}}
CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/project/install/lib"
CIBW_BEFORE_ALL_LINUX: >
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DBUILD_TESTING=OFF &&
cmake --build build --config Release &&
cmake --install build --config Release &&
rm -rf docs extern source tests
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
CIBW_BEFORE_ALL_WINDOWS: >
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DBUILD_TESTING=OFF &&
cmake --build build --config Release &&
cmake --install build --config Release &&
rm -rf docs extern source tests
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path install/bin -w {dest_dir} {wheel}"
CIBW_ENVIRONMENT_MACOS: 'MACOSX_DEPLOYMENT_TARGET="10.15"'
CIBW_BEFORE_ALL_MACOS: >
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=OFF -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DBUILD_TESTING=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_INSTALL_NAME_DIR:PATH=$(pwd)/install/lib &&
cmake --build build --config Release &&
cmake --install build --config Release &&
rm -rf docs extern source tests
steps:
- uses: actions/checkout@v6
# Used to host cibuildwheel
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Create setup.py
run: |
mv wrappers/python/wheels.github/* ./
python set_version.py
python set_eigen_data.py
rm set_version.py set_eigen_data.py
cat pyproject.toml
shell: bash
- name: Create folders
run: |
mkdir -p ${{github.workspace}}/build
mkdir -p ${{github.workspace}}/install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
if: runner.os == 'Linux'
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
with:
output-dir: dist
- uses: actions/upload-artifact@v6
id: build_wheels
with:
name: python-wheels-${{runner.os}}_${{inputs.arch}}
path: ./dist/*