-
Notifications
You must be signed in to change notification settings - Fork 6
132 lines (106 loc) · 3.42 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
125
126
127
128
129
130
131
132
name: Build Wheels
on: [push]
# release:
# types: [published]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
linux:
name: Manylinux Wheel Build
runs-on: ubuntu-latest
steps:
- name: Setup Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-python@v4
with:
python-version: 3.8
architecture: x64
- name: Build Manylinux Wheels
uses: PyO3/maturin-action@v1
with:
target: x86_64
manylinux: 2014
args: --release --features=openblas
docker-options: -e DYNAMIC_ARCH=1
before-script-linux: |
yum install -y cmake3 eigen3-devel llvm-toolset-7 openssl-devel
- name: Upload Wheel Artifacts
uses: actions/upload-artifact@v3
with:
name: linux-wheels
path: target/wheels
windows:
name: Windows Wheel Build
runs-on: windows-latest
steps:
- name: Setup Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install Python Dependencies
run: pip install -U setuptools wheel maturin
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install Other Dependencies (Windows)
run: >
cargo install cargo-vcpkg && vcpkg install
ceres:x64-windows-static-md
eigen3:x64-windows-static-md
openblas:x64-windows-static-md
glog:x64-windows-static-md
gflags:x64-windows-static-md
clapack:x64-windows-static-md
&& vcpkg integrate install
- name: Build Windows Wheels
run: maturin build --features="openblas,openblas-src/system" --release
- name: Upload Wheel Artifacts
uses: actions/upload-artifact@v3
with:
name: windows-wheels
path: target/wheels
macos:
name: macOS Wheel Build
runs-on: macOS-11
steps:
- name: Setup Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install Python Dependencies
run: pip install -U setuptools wheel maturin
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install Apple Intel Target
run: rustup target add x86_64-apple-darwin
- name: Install Apple Silicon Target
run: rustup target add aarch64-apple-darwin
- name: Install Other Dependencies (macOS)
run: brew install gcc ceres-solver eigen lapack
- name: Build macOS x86_64 Wheels
run: MACOSX_DEPLOYMENT_TARGET=10.9 maturin build --features="accelerate" --release --target x86_64-apple-darwin
- name: Build macOS aarch64 Wheels
run: maturin build --features="accelerate" --release --target aarch64-apple-darwin
- name: Upload Wheel Artifacts
uses: actions/upload-artifact@v3
with:
name: macos-wheels
path: target/wheels