MATLAB: check values in idxbx[_0,_e]
and idxbu
(#1390)
#1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Full Build Linux | |
on: | |
push: | |
branches-ignore: | |
- 'doc*' | |
- 'wip*' | |
pull_request: | |
branches: | |
- '*' | |
env: | |
BUILD_TYPE: Release | |
ACADOS_PYTHON: ON | |
ACADOS_OCTAVE: ON | |
ACADOS_WITH_OSQP: ON | |
ACADOS_WITH_QPOASES: ON | |
ACADOS_WITH_DAQP: ON | |
ACADOS_WITH_QPDUNES: OFF | |
ACADOS_ON_CI: ON | |
jobs: | |
core_build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Create Build Environment | |
working-directory: ${{runner.workspace}} | |
run: cmake -E make_directory ${{runner.workspace}}/acados/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=$ACADOS_PYTHON -DACADOS_OCTAVE=OFF -DACADOS_WITH_OPENMP=ON -DACADOS_NUM_THREADS=1 | |
- name: Build & Install | |
working-directory: ${{runner.workspace}}/acados/build | |
shell: bash | |
run: | | |
cmake --build . --config $BUILD_TYPE | |
make install -j4 | |
- name: Store shared libs (/lib) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lib | |
if-no-files-found: error | |
path: ${{runner.workspace}}/acados/lib/ | |
compression-level: 0 | |
overwrite: true | |
- name: Store build scripts (/build) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
if-no-files-found: error | |
path: | | |
${{runner.workspace}}/acados/build/ | |
!${{runner.workspace}}/**/*.dir | |
compression-level: 0 | |
overwrite: true | |
# exclude object files in .dir directories | |
- name: Store include directory (/include) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: include | |
if-no-files-found: error | |
path: ${{runner.workspace}}/acados/include/ | |
compression-level: 0 | |
overwrite: true | |
python_interface: | |
needs: core_build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ${{runner.workspace}}/acados | |
- name: Export Paths | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}} | |
- name: Install Python interface | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_python.sh'' | |
- name: Install Tera | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_tera.sh | |
- name: Run CMake python tests (ctest) | |
working-directory: ${{runner.workspace}}/acados/build | |
shell: bash | |
run: | | |
source ${{runner.workspace}}/acados/acadosenv/bin/activate | |
ctest -C $BUILD_TYPE --output-on-failure -j 4 --parallel 4; | |
python_interface_new_casadi: | |
needs: core_build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ${{runner.workspace}}/acados | |
- name: Export Paths | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}} | |
- name: Install Python interface | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_python.sh'' | |
- name: Install Tera | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_tera.sh | |
- name: Install simde | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_simde.sh'' | |
- name: Install new CasADi Python | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_new_casadi_python.sh'' | |
- name: Run Python tests that need new CasADi | |
working-directory: ${{runner.workspace}}/acados/build | |
shell: bash | |
run: | | |
source ${{runner.workspace}}/acados/acadosenv/bin/activate | |
cd ${{runner.workspace}}/acados/examples/acados_python/p_global_example | |
python example_p_global.py | |
- name: Run more Python tests | |
working-directory: ${{runner.workspace}}/acados/build | |
shell: bash | |
run: | | |
source ${{runner.workspace}}/acados/acadosenv/bin/activate | |
cd ${{runner.workspace}}/acados/examples/acados_python/tests | |
python test_rti_sqp_residuals.py | |
- name: Python sensitivity examples | |
working-directory: ${{runner.workspace}}/acados/build | |
shell: bash | |
run: | | |
source ${{runner.workspace}}/acados/acadosenv/bin/activate | |
cd ${{runner.workspace}}/acados/examples/acados_python/pendulum_on_cart/solution_sensitivities | |
python value_gradient_example.py | |
python policy_gradient_example.py | |
python test_solution_sens_and_exact_hess.py | |
python forw_vs_adj_param_sens.py | |
cd ${{runner.workspace}}/acados/examples/acados_python/solution_sensitivities_convex_example | |
python value_gradient_example_linear.py | |
python batch_adjoint_solution_sensitivity_example.py | |
- name: Python Furuta pendulum timeout test | |
working-directory: ${{runner.workspace}}/acados/build | |
shell: bash | |
run: | | |
source ${{runner.workspace}}/acados/acadosenv/bin/activate | |
cd ${{runner.workspace}}/acados/examples/acados_python/furuta_pendulum | |
python main_closed_loop.py | |
MATLAB_test: | |
needs: core_build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ${{runner.workspace}}/acados | |
- name: Install Casadi MATLAB | |
working-directory: ${{runner.workspace}}/acados/external | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/install_casadi_matlab.sh | |
- name: Export Paths | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}} | |
- name: Install MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
if: always() | |
with: | |
release: R2021a | |
cache: true | |
# just needed for blasfeo_target.h | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=OFF | |
- name: Configure MATLAB workspace | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/examples/acados_matlab_octave/test | |
run: | | |
cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test | |
source env.sh | |
- name: Run Matlab tests | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: | | |
cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; run_matlab_tests | |
MATLAB_examples_new_casadi: | |
needs: core_build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ${{runner.workspace}}/acados | |
- name: Install Casadi MATLAB | |
working-directory: ${{runner.workspace}}/acados/external | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/install_new_casadi_matlab.sh | |
- name: Install simde | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_simde.sh'' | |
- name: Export Paths | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}} | |
- name: Install MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
if: always() | |
with: | |
release: R2021a | |
products: Simulink Simulink_Test | |
cache: true | |
# just needed for blasfeo_target.h | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=OFF | |
- name: Configure MATLAB workspace | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/examples/acados_matlab_octave/test | |
run: | | |
cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test | |
source env.sh | |
- name: Run Matlab tests | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: | | |
cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; run_matlab_examples_new_casadi | |
- name: Run Simulink MOCP test | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/mocp_transition_example; main_mocp_simulink | |
# run selected matlab examples | |
MATLAB_examples: | |
needs: core_build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ${{runner.workspace}}/acados | |
- name: Install Casadi MATLAB | |
working-directory: ${{runner.workspace}}/acados/external | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/install_casadi_matlab.sh | |
- name: Export Paths | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}} | |
- name: Install MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
if: always() | |
with: | |
release: R2021a | |
products: Simulink Simulink_Test | |
cache: true | |
# just needed for blasfeo_target.h | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=OFF | |
- name: Configure MATLAB workspace | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/examples/acados_matlab_octave/test | |
run: | | |
cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test | |
source env.sh | |
- name: Run Matlab examples | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: | | |
cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; test_all_examples; | |
simulink_test: | |
needs: core_build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ${{runner.workspace}}/acados | |
- name: Install Casadi MATLAB | |
working-directory: ${{runner.workspace}}/acados/external | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/install_casadi_matlab.sh | |
- name: Export Paths | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}} | |
- name: Install MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
if: always() | |
with: | |
release: R2021a | |
products: Simulink Simulink_Test | |
cache: true | |
# just needed for blasfeo_target.h | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=OFF | |
- name: Run Simulink closed-loop test | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; simulink_test | |
- name: Run Simulink initialization test | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; simulink_init_test | |
- name: Run Simulink QP test | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; simulink_qp_test | |
- name: Run Simulink slack test | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; simulink_slack_test | |
- name: Run Simulink parameter test | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; simulink_param_test | |
- name: Run Simulink sparse parameter test | |
uses: matlab-actions/run-command@v2 | |
if: always() | |
with: | |
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; simulink_sparse_param_test | |
octave_test: | |
needs: core_build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ${{runner.workspace}}/acados | |
- name: Prepare Octave | |
working-directory: ${{runner.workspace}}/acados/external | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install liboctave-dev -y --fix-missing | |
octave --version | |
${{runner.workspace}}/acados/.github/linux/install_casadi_octave.sh | |
- name: Install Tera | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: ${{runner.workspace}}/acados/.github/linux/install_tera.sh'' | |
- name: Export Paths | |
working-directory: ${{runner.workspace}}/acados | |
shell: bash | |
run: | | |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}} | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/acados/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=$ACADOS_OCTAVE | |
- name: Run CMake Octave tests (ctest) | |
working-directory: ${{runner.workspace}}/acados/build | |
shell: bash | |
run: ctest -C $BUILD_TYPE --output-on-failure -j 4 --parallel 4; |