Skip to content

Commit 9d1ce8c

Browse files
authored
Merge pull request #196 from fabinsch/ci-linux-wheels
ci/linux: fix linux wheel compatibility
2 parents f65287c + 850b525 commit 9d1ce8c

File tree

4 files changed

+65
-11
lines changed

4 files changed

+65
-11
lines changed

.github/workflows/release-linux.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release on PyPI [Linux]
2+
3+
on:
4+
pull_request:
5+
release:
6+
types:
7+
- published
8+
9+
jobs:
10+
build-wheel:
11+
name: "Build ubuntu wheels"
12+
runs-on: "ubuntu-latest"
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: 'true'
18+
- uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.10"
21+
- run: python -m pip install -U pip
22+
- run: python -m pip install cibuildwheel
23+
- run: touch setup.py
24+
- run: python -m cibuildwheel --output-dir wh
25+
env:
26+
CIBW_BUILD: cp37-*manylinux*_x86_64 cp38-*manylinux*_x86_64 cp39-*manylinux*_x86_64 cp310-*manylinux*_x86_64 cp311-*manylinux*_x86_64
27+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
28+
CIBW_REPAIR_WHEEL_COMMAND: ""
29+
30+
- uses: actions/upload-artifact@v3
31+
with:
32+
path: wh
33+
34+
release:
35+
needs: "build-wheel"
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v3
39+
- uses: actions/setup-python@v4
40+
with:
41+
python-version: "3.10"
42+
- uses: actions/download-artifact@v3
43+
44+
- name: Publish package to PyPI
45+
uses: pypa/gh-action-pypi-publish@release/v1
46+
if: |
47+
github.repository == 'Simple-Robotics/proxsuite' &&
48+
(github.event_name == 'release' && github.event.action == 'published')
49+
with:
50+
user: __token__
51+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/release.yml renamed to .github/workflows/release-osx-win.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release on GitHub & PyPI
1+
name: Release on PyPI [Windows, Mac]
22

33
on:
44
pull_request:
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
16-
os: [ubuntu-latest, macos-latest, self-hosted-arm64, windows-2019, windows-latest]
16+
os: [macos-latest, self-hosted-arm64, windows-2019, windows-latest]
1717
include:
1818
- os: windows-2019
1919
toolset: ClangCl
@@ -23,10 +23,6 @@ jobs:
2323
- os: self-hosted-arm64
2424
python-version: 3.7
2525
steps:
26-
- name: Set docker for linux
27-
if: contains(matrix.os, 'ubuntu')
28-
uses: docker://quay.io/pypa/manylinux_2_24_x86_64
29-
3026
- uses: actions/checkout@v2
3127
with:
3228
submodules: recursive
@@ -39,7 +35,7 @@ jobs:
3935
git submodule update
4036
4137
- name: Setup conda
42-
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
38+
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
4339
uses: conda-incubator/setup-miniconda@v2
4440
with:
4541
miniforge-variant: Mambaforge
@@ -49,23 +45,23 @@ jobs:
4945
activate-environment: proxsuite
5046

5147
- name: Install dependencies [Conda]
52-
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
48+
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
5349
shell: bash -l {0}
5450
run: |
5551
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
5652
conda config --remove channels defaults
5753
mamba install doxygen graphviz eigen simde cmake compilers
5854
5955
- name: Print environment [Conda]
60-
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
56+
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
6157
shell: bash -l {0}
6258
run: |
6359
conda info
6460
mamba list
6561
env
6662
6763
- name: Build wheel
68-
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
64+
if: contains(matrix.os, 'macos')
6965
shell: bash -l {0}
7066
run: |
7167
pip wheel . -w dist

bindings/python/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
if(UNIX)
2+
set(PYTHON_COMPONENTS Development.Module)
3+
endif()
14
include(../../cmake-module/python.cmake)
25

36
findpython(REQUIRED Development.Module)

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ homepage = "https://github.com/Simple-Robotics/proxsuite"
1212
repository = "https://github.com/Simple-Robotics/proxsuite.git"
1313

1414
[build-system]
15-
requires = ["cmeel[build]"]
15+
requires = [
16+
"cmeel[build]",
17+
"cmeel-eigen",
18+
"cmeel-simde",
19+
]
1620
build-backend = "cmeel.build"
1721
configure-args = ["-DBUILD_TESTING:BOOL=OFF","-DBUILD_PYTHON_INTERFACE:BOOL=ON","-DBUILD_WITH_VECTORIZATION_SUPPORT:BOOL=ON","-DINSTALL_DOCUMENTATION:BOOL=OFF"]

0 commit comments

Comments
 (0)