Skip to content

ci/linux: fix linux wheel compatibility #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release on PyPI [Linux]

on:
pull_request:
release:
types:
- published

jobs:
build-wheel:
name: "Build ubuntu wheels"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: python -m pip install -U pip
- run: python -m pip install cibuildwheel
- run: touch setup.py
- run: python -m cibuildwheel --output-dir wh
env:
CIBW_BUILD: cp37-*manylinux*_x86_64 cp38-*manylinux*_x86_64 cp39-*manylinux*_x86_64 cp310-*manylinux*_x86_64 cp311-*manylinux*_x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_REPAIR_WHEEL_COMMAND: ""

- uses: actions/upload-artifact@v3
with:
path: wh

release:
needs: "build-wheel"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/download-artifact@v3

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: |
github.repository == 'Simple-Robotics/proxsuite' &&
(github.event_name == 'release' && github.event.action == 'published')
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release on GitHub & PyPI
name: Release on PyPI [Windows, Mac]

on:
pull_request:
Expand All @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, self-hosted-arm64, windows-2019, windows-latest]
os: [macos-latest, self-hosted-arm64, windows-2019, windows-latest]
include:
- os: windows-2019
toolset: ClangCl
Expand All @@ -23,10 +23,6 @@ jobs:
- os: self-hosted-arm64
python-version: 3.7
steps:
- name: Set docker for linux
if: contains(matrix.os, 'ubuntu')
uses: docker://quay.io/pypa/manylinux_2_24_x86_64

- uses: actions/checkout@v2
with:
submodules: recursive
Expand All @@ -39,7 +35,7 @@ jobs:
git submodule update

- name: Setup conda
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
Expand All @@ -49,23 +45,23 @@ jobs:
activate-environment: proxsuite

- name: Install dependencies [Conda]
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
conda config --remove channels defaults
mamba install doxygen graphviz eigen simde cmake compilers

- name: Print environment [Conda]
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
conda info
mamba list
env

- name: Build wheel
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
if: contains(matrix.os, 'macos')
shell: bash -l {0}
run: |
pip wheel . -w dist
Expand Down
3 changes: 3 additions & 0 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
if(UNIX)
set(PYTHON_COMPONENTS Development.Module)
endif()
include(../../cmake-module/python.cmake)

findpython(REQUIRED Development.Module)
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ homepage = "https://github.com/Simple-Robotics/proxsuite"
repository = "https://github.com/Simple-Robotics/proxsuite.git"

[build-system]
requires = ["cmeel[build]"]
requires = [
"cmeel[build]",
"cmeel-eigen",
"cmeel-simde",
]
build-backend = "cmeel.build"
configure-args = ["-DBUILD_TESTING:BOOL=OFF","-DBUILD_PYTHON_INTERFACE:BOOL=ON","-DBUILD_WITH_VECTORIZATION_SUPPORT:BOOL=ON","-DINSTALL_DOCUMENTATION:BOOL=OFF"]