Skip to content

Commit 8172ae3

Browse files
committed
add github workflow for test-pypi cross-OS wheel builds
1 parent 330179b commit 8172ae3

3 files changed

Lines changed: 47 additions & 6 deletions

File tree

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@ on:
77

88
jobs:
99
build_wheels:
10-
name: Build wheels on ${{ matrix.os }}
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
os: [ubuntu-latest, macos-latest]
10+
name: Build linux wheels
11+
runs-on: ubuntu-latest
1512

1613
steps:
1714
- uses: actions/checkout@v6
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and upload wheels to TestPyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*-test*" # only run on tags for experimental versions
7+
8+
jobs:
9+
build_wheels:
10+
name: Build macos wheels
11+
runs-on: macos-15
12+
13+
steps:
14+
- uses: actions/checkout@v6
15+
with:
16+
persist-credentials: false
17+
18+
# Used to host cibuildwheel
19+
- uses: actions/setup-python@v6
20+
21+
# install build depdencies
22+
- name: Install build tools
23+
run: python -m pip install setuptools wheel cibuildwheel build twine nanobind
24+
25+
- name: Download Eigen headers
26+
run: |
27+
mkdir -p deps
28+
mkdir -p deps/eigen3
29+
curl -L https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz \
30+
| tar xz -C deps/eigen3 --strip-components=1
31+
32+
- name: Build wheels
33+
run: python -m cibuildwheel --output-dir wheelhouse
34+
env:
35+
CIBW_BUILD: "cp311-*"
36+
37+
- name: Upload to TestPyPI
38+
run: |
39+
twine upload \
40+
--repository-url https://test.pypi.org/legacy/ \
41+
wheelhouse/* dist/*
42+
env:
43+
TWINE_USERNAME: __token__
44+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1111
set(CMAKE_CXX_EXTENSIONS OFF)
1212

1313
set(WARNING_FLAGS "")
14-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -g -march=x86-64 ${WARNING_FLAGS}")
14+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -g -march=native ${WARNING_FLAGS}")
1515

1616
find_package(Eigen3 QUIET NO_MODULE)
1717

0 commit comments

Comments
 (0)