Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
asherikov committed Jan 23, 2025
1 parent f58efe0 commit c0538cc
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 109 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,6 @@ jobs:
source /opt/ros/noetic/setup.bash
make catkin_test_new ROS_DISTRO=noetic UBUNTU_DISTRO=focal
# empy compatibility issue
#prerelease:
# runs-on: ubuntu-20.04
# defaults:
# run:
# shell: bash
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - run: make ros_prerelease ROS_DISTRO=noetic UBUNTU_DISTRO=focal BRANCH=`git branch --show-current`
# env:
# CCACHE_DIR: ${GITHUB_WORKSPACE}/.ccache


jammy_scanbuild:
runs-on: ubuntu-22.04

Expand Down Expand Up @@ -128,3 +113,18 @@ jobs:
cmake -D VCPKG_INSTALL_OPTIONS="--x-feature=test" -D CMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -D QPMAD_BUILD_TESTS=ON -G "NMake Makefiles" .
nmake
- run: ctest --schedule-random --output-on-failure

jammy_ccws_static:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
repository: asherikov/ccws
- uses: actions/checkout@v4
with:
path: src/qpmad
- run: make bp_install_build BUILD_PROFILE=scan_build
- run: make bp_install_build BUILD_PROFILE=static_checks
- run: make BUILD_PROFILE=static_checks
- run: make dep_install PKG=qpmad
- run: make qpmad BUILD_PROFILE=scan_build
53 changes: 0 additions & 53 deletions .travis.yml.disable

This file was deleted.

1 change: 1 addition & 0 deletions cmake/cmakeut_compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function(cmakeut_compiler_flags STANDARD)
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-modernize-avoid-bind")
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-cppcoreguidelines-explicit-virtual-functions,-hicpp-use-override,-modernize-use-override")
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-bugprone-reserved-identifier,-bugprone-infinite-loop,-cert-dcl51-cpp,-cert-dcl37-c,-readability-identifier-naming")
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-misc-include-cleaner")
set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},-abseil-*")

set(CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY},${CMAKEUT_CLANG_TIDY_EXTRA_IGNORES}")
Expand Down
14 changes: 7 additions & 7 deletions test/resolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class ResolveFixture
public:
ResolveFixture()
{
qpmad::MatrixIndex size = 20;
qpmad::MatrixIndex num_general_ctr = 1;
const qpmad::MatrixIndex size = 20;
const qpmad::MatrixIndex num_general_ctr = 1;

xH.initRandomHessian(size);
H_copy = xH.H;
Expand Down Expand Up @@ -107,7 +107,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(resolve_with_cholesky, t_Solver, TypeListResolv

// next iteration
this->H_copy = this->xH.H;
Eigen::VectorXd x_copy = this->xH.x;
const Eigen::VectorXd x_copy = this->xH.x;
this->param.hessian_type_ = this->solver.getHessianType();
BOOST_CHECK_EQUAL(this->param.hessian_type_, qpmad::SolverParameters::HESSIAN_CHOLESKY_FACTOR);

Expand All @@ -128,7 +128,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(resolve_with_inverted_cholesky, t_Solver, TypeL

// next iteration
this->H_copy = this->xH.H;
Eigen::VectorXd x_copy = this->xH.x;
const Eigen::VectorXd x_copy = this->xH.x;
this->param.hessian_type_ = this->solver.getHessianType();
BOOST_CHECK_EQUAL(this->param.hessian_type_, qpmad::SolverParameters::HESSIAN_INVERTED_CHOLESKY_FACTOR);

Expand Down Expand Up @@ -164,7 +164,7 @@ class ResolveUnconstrainedFixture
public:
ResolveUnconstrainedFixture()
{
qpmad::MatrixIndex size = 20;
const qpmad::MatrixIndex size = 20;

qpmad_utils::getRandomPositiveDefiniteMatrix(xH.H, size);
H_copy = xH.H;
Expand Down Expand Up @@ -214,7 +214,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(

// next iteration
this->H_copy = this->xH.H;
Eigen::VectorXd x_copy = this->xH.x;
const Eigen::VectorXd x_copy = this->xH.x;
this->param.hessian_type_ = this->solver.getHessianType();
BOOST_CHECK_EQUAL(this->param.hessian_type_, qpmad::SolverParameters::HESSIAN_CHOLESKY_FACTOR);

Expand All @@ -239,7 +239,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(

// next iteration
this->H_copy = this->xH.H;
Eigen::VectorXd x_copy = this->xH.x;
const Eigen::VectorXd x_copy = this->xH.x;
this->param.hessian_type_ = this->solver.getHessianType();
BOOST_CHECK_EQUAL(this->param.hessian_type_, qpmad::SolverParameters::HESSIAN_INVERTED_CHOLESKY_FACTOR);

Expand Down
20 changes: 10 additions & 10 deletions test/solver_geneq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralEqualities<20>,
SolverGeneralEqualitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 50;
qpmad::MatrixIndex num_ctr = 20;
const qpmad::MatrixIndex size = 50;
const qpmad::MatrixIndex num_ctr = 20;

this->initRandomHessian(size);
this->h.setRandom(size);
Expand All @@ -44,8 +44,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralEqualities<20>,
SolverGeneralEqualitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 50;
qpmad::MatrixIndex num_ctr = 20;
const qpmad::MatrixIndex size = 50;
const qpmad::MatrixIndex num_ctr = 20;

this->initRandomHessian(size);

Expand All @@ -63,8 +63,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralEqualities<50>,
SolverGeneralEqualitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 50;
qpmad::MatrixIndex num_ctr = 50;
const qpmad::MatrixIndex size = 50;
const qpmad::MatrixIndex num_ctr = 50;

this->initRandomHessian(size);
this->h.setRandom(size);
Expand All @@ -83,8 +83,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralEqualities<51>,
SolverGeneralEqualitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 50;
qpmad::MatrixIndex num_ctr = 51;
const qpmad::MatrixIndex size = 50;
const qpmad::MatrixIndex num_ctr = 51;

this->initRandomHessian(size);
this->h.setRandom(size);
Expand All @@ -106,8 +106,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralEqualities<51>,
SolverGeneralEqualitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 50;
qpmad::MatrixIndex num_ctr = 51;
const qpmad::MatrixIndex size = 50;
const qpmad::MatrixIndex num_ctr = 51;

this->initRandomHessian(size);
this->h.setRandom(size);
Expand Down
40 changes: 20 additions & 20 deletions test/solver_genineq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<1>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 1;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 1;

this->xH.initIdentityHessian(size);
this->h.setOnes(size);
Expand All @@ -51,8 +51,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<3>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 3;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 3;

this->xH.initIdentityHessian(size);

Expand All @@ -76,8 +76,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<3>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 3;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 3;

this->xH.initIdentityHessian(size);

Expand All @@ -101,8 +101,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<3>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 3;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 3;

this->xH.initIdentityHessian(size);

Expand All @@ -126,8 +126,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<3>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 3;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 3;

this->xH.initIdentityHessian(size);

Expand All @@ -151,8 +151,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<3>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 3;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 3;

this->xH.initIdentityHessian(size);
this->h.resize(size);
Expand Down Expand Up @@ -183,8 +183,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<3>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 3;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 3;

this->xH.initIdentityHessian(size);
this->h.resize(size);
Expand Down Expand Up @@ -215,8 +215,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities00<2>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
qpmad::MatrixIndex num_ctr = 2;
const qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex num_ctr = 2;

this->xH.initIdentityHessian(size);
this->h.resize(size);
Expand Down Expand Up @@ -247,8 +247,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities01<20>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 20;
qpmad::MatrixIndex num_ctr = size;
const qpmad::MatrixIndex size = 20;
const qpmad::MatrixIndex num_ctr = size;

this->xH.initIdentityHessian(size);
this->h.setOnes(size);
Expand All @@ -275,8 +275,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListGeneralInequalities01<21>,
SolverGeneralInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 20;
qpmad::MatrixIndex num_ctr = size + 1;
const qpmad::MatrixIndex size = 20;
const qpmad::MatrixIndex num_ctr = size + 1;

this->xH.initIdentityHessian(size);
this->h.setOnes(size);
Expand Down
8 changes: 4 additions & 4 deletions test/solver_simpleineq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListSolverSimpleInequalities00<2>,
SolverSimpleInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 2;
const qpmad::MatrixIndex size = 2;

this->xH.initIdentityHessian(size);
this->h.setOnes(size);
Expand All @@ -48,7 +48,7 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListSolverSimpleInequalities00<20>,
SolverSimpleInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 20;
const qpmad::MatrixIndex size = 20;

this->xH.initIdentityHessian(size);
this->h.setOnes(size);
Expand Down Expand Up @@ -76,8 +76,8 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(
TypeListSolverSimpleInequalities01,
SolverSimpleInequalitiesFixture<t_Solver>)
{
qpmad::MatrixIndex size = 20;
qpmad::MatrixIndex num_eq_ctr = 1;
const qpmad::MatrixIndex size = 20;
const qpmad::MatrixIndex num_eq_ctr = 1;

this->xH.initIdentityHessian(size);
this->h.setOnes(size);
Expand Down

0 comments on commit c0538cc

Please sign in to comment.