Skip to content

Commit

Permalink
Implement CI via Github Action (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioBergonti authored Jun 7, 2022
1 parent 5b3a24d commit 2a84569
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/matlab_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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('env_name','imorph')
# 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');
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<p align="left">
<a href="https://github.com/ami-iit/mystica/blob/master/LICENSE"><img src="https://img.shields.io/github/license/ami-iit/mystica" alt="Size" class="center"/></a>
<a href="https://github.com/ami-iit/mystica/actions/workflows/matlab_ci.yml"><img src="https://github.com/ami-iit/mystica/actions/workflows/matlab_ci.yml/badge.svg?branch=main" alt="CI"/></a>
</p>

**Multi bodY SimulaTor maxImal CoordinAtes**
Expand Down

0 comments on commit 2a84569

Please sign in to comment.