Refactor CMake with JRL CMake Modules v2#437
Conversation
bd8de6d to
c36d61e
Compare
There was a problem hiding this comment.
This can be removed. Pixi CI replace the conda-ci.
There was a problem hiding this comment.
This should be removed. The Pixi CI will replace this workflow.
| "${PROJECT_NAME}-example-py-${EXAMPLE_NAME}" | ||
| "${EXAMPLE_FILE}" | ||
| "bindings/python" | ||
| function(proxsuite_add_python_example name) |
There was a problem hiding this comment.
This should be added as a test
930496b to
e4a6dd2
Compare
9920160 to
7ce7cbf
Compare
f85e65e to
e238efe
Compare
b2617af to
b0388c0
Compare
7f6f202 to
3d05dbd
Compare
28e0fd5 to
b09f8a3
Compare
remove custom functions as they format in a strange way when favour-inlining (the default) is used.
fixes the error on macos-15-intel: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcep │ │ t' is only available on macOS 10.13 or newer
using eigen5
…times with Eigen5
…uctible fixes issue with vs generators
jorisv
left a comment
There was a problem hiding this comment.
When running tests, following tests are failing on Linux with pixi:
33 - proxsuite-test-cpp.dense_maros_meszaros (SEGFAULT)
34 - proxsuite-test-cpp.vectorized.dense_maros_meszaros (SEGFAULT)
35 - proxsuite-test-cpp.sparse_maros_meszaros (SEGFAULT)
36 - proxsuite-test-cpp.vectorized.sparse_maros_meszaros (SEGFAULT)| key: ccache-${{ runner.os }}-${{ matrix.os }}-${{ github.sha }} | ||
| restore-keys: ccache-${{ runner.os }}-${{ matrix.os }}- |
There was a problem hiding this comment.
Replace the prefix ccache by an unique one.
Replace runner.os by matrix.build_type.
| name: CI - ${{ matrix.os }} - ${{ matrix.build_type }} (APT) | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false |
There was a problem hiding this comment.
Run on a docker image to ensure not using modified tools.
| key: ccache-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_std }}-${{ github.sha }} | ||
| restore-keys: ccache-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_std }}- |
There was a problem hiding this comment.
Add ${{ matrix.pixi_environment }} so we don't have cache issue if we add a new environment.
| environments: default | ||
|
|
||
| - name: Configure | ||
| run: pixi run -e default configure --fresh --log-level=DEBUG | ||
|
|
||
| - name: Build | ||
| run: pixi run -e default build --verbose --parallel 1 | ||
|
|
||
| - name: Install | ||
| run: pixi run -e default install | ||
|
|
||
| - name: Test Python import | ||
| run: pixi run -e default test-import-python | ||
|
|
||
| - name: Run C++ tests | ||
| if: ${{ !(startsWith(matrix.os, 'windows-') && matrix.build_type == 'Debug') }} | ||
| run: pixi run -e default test | ||
|
|
||
| - name: Run packaging tests | ||
| run: pixi run -e default test-packaging | ||
|
|
||
| - name: Uninstall | ||
| run: pixi run -e default uninstall |
There was a problem hiding this comment.
Replace default by ${{ matrix.pixi_environment }}
| key: ccache-${{ matrix.ROS_DISTRO }}-${{github.run_id}} | ||
| restore-keys: ccache-${{ matrix.ROS_DISTRO }}- |
There was a problem hiding this comment.
| key: ccache-${{ matrix.ROS_DISTRO }}-${{github.run_id}} | |
| restore-keys: ccache-${{ matrix.ROS_DISTRO }}- | |
| key: ccache-ci-ros-${{ matrix.ROS_DISTRO }}-${{github.run_id}} | |
| restore-keys: ccache-ci-ros-${{ matrix.ROS_DISTRO }}- |
|
|
||
| # cereal (Serialization) | ||
| # NOTE: We have to keep the FetchContent support because: | ||
| # - Cereal is not available via CMeel |
There was a problem hiding this comment.
It's fixed : https://pypi.org/project/cmeel-cereal/
| jrl_option(TEST_JULIA_INTERFACE "Run the julia examples as unittest" OFF) | ||
| jrl_option(BUILD_WITH_OPENMP_SUPPORT "Build the library with the OpenMP support" OFF) | ||
| jrl_option(LINK_PYTHON_INTERFACE_TO_OPENMP "Link OpenMP to the Python interface" ON CONDITION "BUILD_WITH_OPENMP_SUPPORT" FALLBACK OFF) | ||
| jrl_option(BUILD_WITH_SERIALIZATION "Build with serialization support" ON CONDITION "BUILD_PYTHON_INTERFACE" FALLBACK OFF) |
There was a problem hiding this comment.
What's the link between serialization and python interface ?
There was a problem hiding this comment.
Take a look at other pixi.toml file in other maestro project.
We create different feature per optional dependency (here: simde, openmp, cereal) to allow developers to choose on which one they want to know.
Try to mimic as much as possible the one in pinocchio to be standard.
| prek: | ||
| name: Prek CI | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 |
There was a problem hiding this comment.
Please, use pre-commit and pre-commit.ci to be standard with other projects.
| jrl_option(BUILD_MAROS_MESZAROS_TESTS "Build the Maros-Meszaros tests, needs matio library" OFF) | ||
| jrl_option(ENABLE_WARNINGS "Enable warnings during compilation" OFF) | ||
| jrl_option(ENABLE_WARNINGS_AS_ERRORS "Treat all warnings as errors" OFF) | ||
| jrl_option(BUILD_PYTHON_INTERFACE "Build the Python bindings" OFF) |
There was a problem hiding this comment.
This option is set to ON by default on jrl-v1
| ) | ||
| set_tests_properties( | ||
| proxsuite-example-python.${name} | ||
| PROPERTIES ENVIRONMENT "PYTHONPATH=$<TARGET_FILE_DIR:proxsuite_pywrap>/.." LABELS python |
There was a problem hiding this comment.
It's better to use ENVIRONMENT_MODIFICATION to avoid issue with some package manager or custom installation path:
ENVIRONMENT_MODIFICATION
"PYTHONPATH=path_list_prepend:$<TARGET_FILE_DIR:proxsuite_pywrap>/.."
| ) | ||
| set_tests_properties( | ||
| proxsuite-test-python.${name} | ||
| PROPERTIES ENVIRONMENT "PYTHONPATH=$<TARGET_FILE_DIR:proxsuite_pywrap>/.." LABELS python |
There was a problem hiding this comment.
It's better to use ENVIRONMENT_MODIFICATION to avoid issue with some package manager or custom installation path:
ENVIRONMENT_MODIFICATION
"PYTHONPATH=path_list_prepend:$<TARGET_FILE_DIR:proxsuite_pywrap>/.."
This PR is a full rewrite of the CMake files with the JRL CMake Modules v2.
c++17minimum requiredpixisupportfind_packagecomponents