Skip to content
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

Add a task to easily release a new EigenPy version #515

Merged
merged 6 commits into from
Nov 6, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*~
*build*
*build*/
# pixi environments
.pixi
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ EigenPy — Versatile and efficient Python bindings between Numpy and Eigen

The installation of **EigenPy** on your computer is made easy for Linux/BSD, Mac OS X, and Windows environments.

### The Conda approach
### Conda

You simply need this simple line:
```bash
Expand All @@ -41,6 +41,7 @@ conda install eigenpy -c conda-forge
You can easily install **EigenPy** from binaries.

#### Add robotpkg apt repository

1. Add robotpkg as source repository to apt:
```
sudo sh -c "echo 'deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg' >> /etc/apt/sources.list.d/robotpkg.list"
Expand All @@ -55,6 +56,7 @@ sudo apt-get update
```

#### Install EigenPy

4. The installation of **EigenPy** and its dependencies is made through the line:

```bash
Expand All @@ -75,26 +77,9 @@ and then install **EigenPy** for Python 3.x with:
brew install eigenpy
```

## Contributing

Standard matrix decomposion routines of Eigen such as the SVD and QR decompositions can be readily added to **EigenPy** following the example of the Cholesky decomposition that is already implemented. Feel free to open a PR if you wrap them for your use case.

## Build/install from source with Pixi

To build **EigenPy** from source the easiest way is to use [Pixi](https://pixi.sh/latest/#installation).

[Pixi](https://pixi.sh/latest/) is a cross-platform package management tool for developers that
will install all required dependencies in `.pixi` directory.
It's used by our CI agent so you have the guarantee to get the right dependencies.

Run the following command to install dependencies, configure, build and test the project:

```bash
pixi run test
```
## Build

The project will be built in the `build` directory.
You can run `pixi shell` and build the project with `cmake` and `ninja` manually.
Build instruction can be found [here](./development/build.md)

## Credits

Expand Down
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 89 files
+0 −240 .cmake-format.py
+1 −0 .docs/cmake.py
+1 −4 .docs/examples/minimal-with-packages.cmake
+2 −0 .gersemirc
+3 −0 .git-blame-ignore-revs
+11 −20 .pre-commit-config.yaml
+107 −97 CMakeLists.txt
+7 −3 _unittests/catkin/CMakeLists.txt
+7 −3 _unittests/cpp/CMakeLists.txt
+8 −4 _unittests/test_pkg-config.cmake
+6 −2 apple.cmake
+69 −45 base.cmake
+113 −63 boost.cmake
+56 −42 compiler.cmake
+30 −68 coverage.cmake
+24 −11 cpack.cmake
+4 −2 createshexe.cmake
+71 −38 cxx-standard.cmake
+2 −1 cxx11.cmake
+322 −159 cython/cython.cmake
+34 −18 debian.cmake
+21 −15 dist.cmake
+92 −68 distcheck.cmake
+125 −74 doxygen.cmake
+12 −6 eigen.cmake
+11 −8 find-external/Accelerate/FindAccelerate.cmake
+13 −10 find-external/CDD/FindCDD.cmake
+59 −37 find-external/CHOLMOD/FindCHOLMOD.cmake
+12 −13 find-external/CLP/FindCLP.cmake
+19 −13 find-external/CoinUtils/FindCoinUtils.cmake
+18 −8 find-external/CppAD/Findcppad.cmake
+21 −10 find-external/CppAD/Findcppadcg.cmake
+15 −14 find-external/GMP/FindGMP.cmake
+61 −0 find-external/Ipopt/FindIpopt.cmake
+55 −27 find-external/Julia/FindJulia.cmake
+51 −26 find-external/MPFR/FindMPFR.cmake
+384 −263 find-external/OpenMP/FindOpenMP.cmake
+44 −27 find-external/OpenRTM/FindOpenRTM.cmake
+64 −34 find-external/Qhull/FindQhull.cmake
+15 −9 find-external/Simde/FindSimde.cmake
+9 −7 find-external/TinyXML/FindTinyXML.cmake
+30 −14 find-external/TinyXML/FindTinyXML2.cmake
+51 −26 find-external/assimp/Findassimp.cmake
+21 −16 find-external/glpk/Findglpk.cmake
+24 −12 find-external/qpOASES/FindqpOASES.cmake
+31 −14 geometric-tools.cmake
+15 −13 gtest.cmake
+51 −21 header.cmake
+2 −6 hpp.cmake
+16 −10 ide.cmake
+54 −33 idl.cmake
+28 −15 idlrtc.cmake
+8 −4 image/visp.cmake
+2 −1 install-data.cmake
+14 −7 julia.cmake
+30 −19 kineo.cmake
+2 −1 lapack.cmake
+69 −34 logging.cmake
+11 −6 man.cmake
+8 −5 metapodfromurdf.cmake
+23 −8 modernize-links.cmake
+43 −21 msvc-specific.cmake
+5 −3 openhrp.cmake
+23 −10 openhrpcontroller.cmake
+9 −6 openrtm.cmake
+133 −71 package-config.cmake
+360 −254 pkg-config.cmake
+10 −7 portability.cmake
+7 −2 post-project.cmake
+8 −3 pthread.cmake
+18 −11 python-helpers.cmake
+157 −93 python.cmake
+59 −31 qhull.cmake
+28 −30 release.cmake
+6 −2 relpath.cmake
+35 −17 ros.cmake
+54 −0 ros2.cmake
+12 −3 sdformat.cmake
+8 −3 shared-library.cmake
+44 −23 sphinx.cmake
+38 −22 stubs.cmake
+21 −10 swig.cmake
+69 −43 test.cmake
+124 −0 tracy.cmake
+33 −0 tracy.hh.cmake
+30 −20 uninstall.cmake
+17 −8 version-script.cmake
+43 −37 version.cmake
+14 −17 xacro.cmake
17 changes: 17 additions & 0 deletions development/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Build and install from source with Pixi

To build **EigenPy** from source the easiest way is to use [Pixi](https://pixi.sh/latest/#installation).

[Pixi](https://pixi.sh/latest/) is a cross-platform package management tool for developers that
will install all required dependencies in `.pixi` directory.
It's used by our CI agent so you have the guarantee to get the right dependencies.

Run the following command to install dependencies, configure, build and test the project:

```bash
pixi run test
```

The project will be built in the `build` directory.
You can run `pixi shell` and build the project with `cmake` and `ninja` manually.

7 changes: 7 additions & 0 deletions development/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Contributing

Standard matrix decomposion routines of Eigen such as the SVD and QR decompositions
can be readily added to **EigenPy** following the example of the Cholesky decomposition
that is already implemented.
Feel free to open a PR if you wrap them for your use case.

34 changes: 34 additions & 0 deletions development/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Release with Pixi

To create a release with Pixi run the following commands on the **devel** branch:

```bash
EIGENPY_VERSION=X.Y.Z pixi run release_new_version
git push origin
git push origin vX.Y.Z
git push origin devel:master
```

Where `X.Y.Z` is the new version.
Be careful to follow the [Semantic Versioning](https://semver.org/spec/v2.0.0.html) rules.

You will find the following assets:
- `./build_new_version/eigenpy-X.Y.Z.tar.gz`
- `./build_new_version/eigenpy-X.Y.Z.tar.gz.sig`

Then, create a new release on [GitHub](https://github.com/stack-of-tasks/eigenpy/releases/new) with:

* Tag: vX.Y.Z
* Title: EigenPy X.Y.Z
* Body:
```
## What's Changed

CHANGELOG CONTENT

**Full Changelog**: https://github.com/stack-of-tasks/eigenpy/compare/vXX.YY.ZZ...vX.Y.Z
```

Where `XX.YY.ZZ` is the last release version.

Then upload `eigenpy-X.Y.Z.tar.gz` and `eigenpy-X.Y.Z.tar.gz.sig` and publish the release.
478 changes: 326 additions & 152 deletions pixi.lock

Large diffs are not rendered by default.

38 changes: 34 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ python = ">=3.9.0"
scipy = ">=1.10.0"

[activation]
scripts = ["build_scripts/pixi/activation.sh"]
scripts = ["development/scripts//pixi/activation.sh"]

[target.win-64.activation]
scripts = ["build_scripts/pixi/activation.bat"]
scripts = ["development/scripts//pixi/activation.bat"]

[tasks]
# We must avoid to set CMAKE_CXX_FLAGS because of WIN32
Expand Down Expand Up @@ -57,6 +57,30 @@ test = { cmd = "ctest --test-dir build --output-on-failure", depends_on = [
dependencies = { pre-commit = ">=3.6.2" }
tasks = { lint = { cmd = "pre-commit run --all" } }

# Increment the version number with EIGENPY_VERSION variable
[feature.new-version.dependencies]
tomlkit = ">=0.13.2"

[feature.new-version.tasks]
configure_new_version = { cmd = [
"CXXFLAGS=$EIGENPY_CXX_FLAGS",
"cmake",
"-G",
"Ninja",
"-B",
"build_new_version",
"-S",
".",
"-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX",
"-DCMAKE_BUILD_TYPE=$EIGENPY_BUILD_TYPE",
"-DGENERATE_PYTHON_STUBS=ON",
"-DBUILD_WITH_CHOLMOD_SUPPORT=ON",
"-DBUILD_WITH_ACCELERATE_SUPPORT=OFF",
] }
release_new_version = { cmd = "VERSION=$EIGENPY_VERSION cmake --build build_new_version --target release", depends-on = [
"configure_new_version",
] }

# Cholmod support
[feature.cholmod]
dependencies = { suitesparse = ">=5" }
Expand All @@ -78,14 +102,14 @@ python = "3.9.*"
# to avoid cxx-compiler to overwrite them.
[feature.clang-cl]
platforms = ["win-64"]
activation = { scripts = ["build_scripts/pixi/activation_clang_cl.bat"] }
activation = { scripts = ["development/scripts//pixi/activation_clang_cl.bat"] }

# Use clang on GNU/Linux.
# We must use scripts instead of env to setup CC and CXX
# to avoid cxx-compiler to overwrite them.
[feature.clang]
platforms = ["linux-64"]
activation = { scripts = ["build_scripts/pixi/activation_clang.sh"] }
activation = { scripts = ["development/scripts//pixi/activation_clang.sh"] }
dependencies = { clangxx = "*" }

[environments]
Expand All @@ -103,3 +127,9 @@ all-clang-cl = { features = [
"clang-cl",
"py312",
], solve-group = "py312" }
# Release a new software version
new-version = { features = [
"new-version",
"cholmod",
"py312",
], solve-group = "py312" }
Loading