Skip to content
Closed
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
75 changes: 75 additions & 0 deletions .github/workflows/macos-linux-pixi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI - OSX/Linux via Pixi

on:
push:
paths-ignore:
- 'doc/**'
- '.gitignore'
- '*.md'
- 'CHANGELOG.md'
pull_request:
paths-ignore:
- 'doc/'
- '.gitignore'
- '*.md'
- 'CHANGELOG.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
simple-mpc-pixi:
name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }}
runs-on: ${{ matrix.os }}
env:
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
environment: [all]
build_type: [Release, Debug]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/cache@v4
with:
path: .ccache
key: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ github.sha }}
restore-keys: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}-

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.39.2
cache: true
environments: ${{ matrix.environment }}

- name: Build simple-mpc
shell: bash -l {0}
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
SIMPLE_MPC_BUILD_TYPE: ${{ matrix.build_type }}
run: |
pixi run -e ${{ matrix.environment }} test

check:
if: always()
name: check-macos-linux-pixi

needs:
- simple-mpc-pixi

runs-on: ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
4 changes: 2 additions & 2 deletions dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ function(get_ndcurves)
if(NOT ndcurves_FOUND)
FetchContent_Declare(
ndcurves
GIT_REPOSITORY "https://github.com/loco-3d/ndcurves"
GIT_REPOSITORY "https://github.com/ManifoldFR/ndcurves"
GIT_PROGRESS True
GIT_TAG devel
GIT_TAG topic/cmake-disable-tests
SYSTEM
EXCLUDE_FROM_ALL
)
Expand Down
25 changes: 25 additions & 0 deletions include/simple-mpc/math-util.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <Eigen/Core>

namespace simple_mpc
{
namespace math
{

/// @note Backport from <pinocchio/math/matrix.hpp> in topic/simulation branch.
template<typename Matrix>
void make_symmetric(const Eigen::MatrixBase<Matrix> & mat, const int mode = Eigen::Upper)
{
if (mode == Eigen::Upper)
{
mat.const_cast_derived().template triangularView<Eigen::StrictlyLower>() =
mat.transpose().template triangularView<Eigen::StrictlyLower>();
}
else if (mode == Eigen::Lower)
{
mat.const_cast_derived().template triangularView<Eigen::StrictlyUpper>() =
mat.transpose().template triangularView<Eigen::StrictlyUpper>();
}
}

} // namespace math
} // namespace simple_mpc
Loading
Loading