Skip to content

Merge pull request #2 from ami-iit/dynamic-simulator #78

Merge pull request #2 from ami-iit/dynamic-simulator

Merge pull request #2 from ami-iit/dynamic-simulator #78

Workflow file for this run

name: MATLAB tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run-matlab-test:
name: Install dependencies and run MATLAB tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
matlab_version: [R2022a]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: ${{ matrix.matlab_version }}
- name: Install mystica
uses: matlab-actions/run-command@v1
with:
command: |
install()
# workaround for https://github.com/robotology/robotology-superbuild/issues/64 and https://github.com/ami-iit/mystica/issues/6
- name: Do not use MATLAB's stdc++ to avoid incompatibilities with other libraries
if: contains(matrix.os, 'ubuntu')
run:
echo "LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6" >> $GITHUB_ENV
- name: Run MATLAB tests
uses: matlab-actions/run-command@v1
with:
command: |
run(fullfile('deps','setup'))
model = mystica.model.getModel4BarLinkage();
stgs = mystica.stgs.getDefaultSettingsSimKinRel(model,'stgs_integrator_limitMaximumTime',1);
data = mystica.runSimKinRel('model',model,'stgs',stgs,'mBodyPosQuat_0',model.getMBodyPosQuatRestConfiguration,'nameControllerClass','mystica.controller.ExampleKinRel');