Skip to content

Regenerate MATLAB bindings #17

Regenerate MATLAB bindings

Regenerate MATLAB bindings #17

name: Regenerate MATLAB bindings
# This action regenerates the MATLAB bindings, for more details
# see doc/dev/faqs.md#how-to-add-wrap-a-new-class-or-function-with-swig
on:
workflow_dispatch:
jobs:
regenerate-matlab-bindings:
name: "Regenerate MATLAB bindings"
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- name: Install SWIG for that supports MATLAB
run: |
sudo apt-get remove swig swig4.0
cd ..
git clone https://github.com/robotology-dependencies/swig/
cd swig
git checkout matlab
sh autogen.sh
./configure --with-matlab
make
sudo make install
- name: Verify which SWIG is found
run: |
which swig
swig --help
- name: Configure and compile iDynTree
run: |
sudo apt-get update
sudo apt-get install \
git build-essential cmake libace-dev coinor-libipopt-dev libeigen3-dev \
libxml2-dev liboctave-dev python-dev python3-numpy valgrind libassimp-dev libirrlicht-dev libglfw3-dev
which swig
swig --help
# Remove autogenerate files to ensure that removed files are actually removed
git rm -r bindings/matlab/autogenerated
mkdir -p build
cd build
cmake -DIDYNTREE_USES_ASSIMP:BOOL=ON -DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON -DIDYNTREE_USES_OCTAVE:BOOL=ON -DIDYNTREE_GENERATE_MATLAB:BOOL=ON ..
cat CMakeCache.txt
make
# After bindings are generated, we modify the names of generic files to avoid conflicts with CasADi
cd ../bindings/matlab
./fix_generic_names_in_autogenerated_files.sh
- name: Check local changes due to bindings generation
run: |
git status
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: 'update matlab bindings'
committer: GitHub <[email protected]>
branch: regenerate-matlab-bindings
delete-branch: true
title: 'update matlab bindings'
body: |
This is a PR that regenerated the MATLAB/Octave iDynTree bindings.
Before merging, wait for the continuous integration outcome as it is possible that the automatic generation broke the Octave tests.
For more info, check the [developer FAQs documentation on MATLAB bindings](https://github.com/robotology/idyntree/blob/master/doc/dev/faqs.md#how-to-add-wrap-a-new-class-or-function-with-swig).
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"