From 05591e70bc2770c93a5957e76dd8dc3ed99a29f5 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:21:28 +0200 Subject: [PATCH 01/24] Create regenerate-matlab-bindings.yml.yml --- .../regenerate-matlab-bindings.yml.yml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/regenerate-matlab-bindings.yml.yml diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml.yml new file mode 100644 index 0000000..a783e81 --- /dev/null +++ b/.github/workflows/regenerate-matlab-bindings.yml.yml @@ -0,0 +1,79 @@ +name: Regenerate MATLAB bindings +# This action regenerates the MATLAB bindings for CasADi +# Inspired from: +# * https://github.com/robotology/yarp-matlab-bindings/blob/master/.github/workflows/regenerate-matlab-bindings.yml +# * https://github.com/robotology/idyntree/blob/master/.github/workflows/regenerate-matlab-bindings.yml + +on: + workflow_dispatch: + pull_request: + +jobs: + regenerate-matlab-bindings: + name: "Regenerate MATLAB bindings" + runs-on: [ubuntu-20.04] + container: + # Use Ubuntu Bionic as the https://github.com/casadi/casadi/wiki/matlab suggest to use GCC 7 + image: ubuntu:bionic + steps: + - uses: actions/checkout@v2 + + # From https://github.com/casadi/casadi/wiki/matlab + - name: Install SWIG for that supports MATLAB required by CasADi + run: | + sudo apt-get remove swig swig4.0 + cd .. + git clone https://github.com/jaeandersson/swig + cd swig + git checkout matlab-customdoc + sh autogen.sh + ./configure --with-matlab + make + sudo make install + + - name: Verify which SWIG and gcc is found + run: | + which swig + swig --help + which gcc + gcc --version + + + - name: Configure and compile CasADi + run: | + # Install CasADi dependencies + sudo apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends + # Clone casadi from a given tag + git clone https://github.com/dic-iit/casadi.git + cd casadi + git checkout 3.5.5.3 + # Compile casadi and generate MATLAB bindings + mkdir build + cd build + ccmake -DWITH_IPOPT:BOOL=ON -DWITH_OCTAVE:BOOL=ON -DWITH_EXAMPLES:BOOL=OFF -DINCLUDE_PREFIX:PATH=include -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_PREFIX:PATH=lib/cmake/casadi -DLIB_PREFIX:PATH=lib -DBIN_PREFIX:PATH=bin .. + make install + echo "Print content of build directory:" + ls -R + + - 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 + branch: regenerate-matlab-bindings + delete-branch: true + title: 'update matlab bindings' + body: | + This is a PR that regenerated the MATLAB/Octave CasADi bindings. + + For more info, check the documentation of this repo. + + - name: Check outputs + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" From 2cdb74777df44e841158142388cb7535ce0662eb Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:24:56 +0200 Subject: [PATCH 02/24] Update regenerate-matlab-bindings.yml.yml --- .github/workflows/regenerate-matlab-bindings.yml.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml.yml index a783e81..95098d5 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml.yml @@ -21,7 +21,7 @@ jobs: # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi run: | - sudo apt-get remove swig swig4.0 + apt-get remove swig swig4.0 cd .. git clone https://github.com/jaeandersson/swig cd swig @@ -42,7 +42,7 @@ jobs: - name: Configure and compile CasADi run: | # Install CasADi dependencies - sudo apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends + apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # Clone casadi from a given tag git clone https://github.com/dic-iit/casadi.git cd casadi From 34e69da2d865134c1e33a47684844f81736534b5 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:25:17 +0200 Subject: [PATCH 03/24] Update regenerate-matlab-bindings.yml.yml --- .github/workflows/regenerate-matlab-bindings.yml.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml.yml index 95098d5..762602b 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml.yml @@ -29,7 +29,7 @@ jobs: sh autogen.sh ./configure --with-matlab make - sudo make install + make install - name: Verify which SWIG and gcc is found run: | From 902b399d9d56c7b7945ca55e2bd3989ff2c55e5f Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:25:55 +0200 Subject: [PATCH 04/24] Update regenerate-matlab-bindings.yml.yml --- .github/workflows/regenerate-matlab-bindings.yml.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml.yml index 762602b..51aeec9 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml.yml @@ -21,7 +21,6 @@ jobs: # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi run: | - apt-get remove swig swig4.0 cd .. git clone https://github.com/jaeandersson/swig cd swig From 594f7aa8b39c0c151945817829bbc0c94be16fb0 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:28:44 +0200 Subject: [PATCH 05/24] Update regenerate-matlab-bindings.yml.yml --- .github/workflows/regenerate-matlab-bindings.yml.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml.yml index 51aeec9..a5c68c2 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml.yml @@ -18,6 +18,11 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install dependencies via apt + run: | + # Install CasADi dependencies + apt-get install build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends + # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi run: | @@ -40,8 +45,6 @@ jobs: - name: Configure and compile CasADi run: | - # Install CasADi dependencies - apt-get install gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # Clone casadi from a given tag git clone https://github.com/dic-iit/casadi.git cd casadi From ea999b3bbc770a32bcea87eff489d016ec98df29 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:30:26 +0200 Subject: [PATCH 06/24] Update regenerate-matlab-bindings.yml.yml --- .github/workflows/regenerate-matlab-bindings.yml.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml.yml index a5c68c2..528dd03 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml.yml @@ -21,6 +21,8 @@ jobs: - name: Install dependencies via apt run: | # Install CasADi dependencies + apt-get update + apt-get upgrade apt-get install build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/casadi/casadi/wiki/matlab From c8d8b632b4ec84a7793f48d95e9d221a8b46a65e Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:31:24 +0200 Subject: [PATCH 07/24] Update regenerate-matlab-bindings.yml.yml --- .github/workflows/regenerate-matlab-bindings.yml.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml.yml index 528dd03..53d7f01 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml.yml @@ -21,8 +21,8 @@ jobs: - name: Install dependencies via apt run: | # Install CasADi dependencies - apt-get update - apt-get upgrade + apt-get update -y + apt-get upgrade -y apt-get install build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/casadi/casadi/wiki/matlab From adcfc5443fbaf83199d5669ed03f01aa2b612804 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:31:48 +0200 Subject: [PATCH 08/24] Rename regenerate-matlab-bindings.yml.yml to regenerate-matlab-bindings.yml --- ...ate-matlab-bindings.yml.yml => regenerate-matlab-bindings.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{regenerate-matlab-bindings.yml.yml => regenerate-matlab-bindings.yml} (100%) diff --git a/.github/workflows/regenerate-matlab-bindings.yml.yml b/.github/workflows/regenerate-matlab-bindings.yml similarity index 100% rename from .github/workflows/regenerate-matlab-bindings.yml.yml rename to .github/workflows/regenerate-matlab-bindings.yml From f55fbad1a01b683f00ce1468eb641fc4bcbd2366 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:32:42 +0200 Subject: [PATCH 09/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 53d7f01..5aae445 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -23,7 +23,7 @@ jobs: # Install CasADi dependencies apt-get update -y apt-get upgrade -y - apt-get install build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends + apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi From 4952c52558535237a60d3f70016ec391a487b152 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:36:31 +0200 Subject: [PATCH 10/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 5aae445..acf7b7c 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -23,8 +23,12 @@ jobs: # Install CasADi dependencies apt-get update -y apt-get upgrade -y + # From https://github.com/casadi/casadi/wiki/InstallationLinux apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends - + # From https://github.com/swig/swig/wiki/Getting-Started + apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends + + # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi run: | From aea018ebc7bc3e1355ca642d7882441ca02d19e2 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 16:41:33 +0200 Subject: [PATCH 11/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index acf7b7c..5f3b804 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -58,7 +58,7 @@ jobs: # Compile casadi and generate MATLAB bindings mkdir build cd build - ccmake -DWITH_IPOPT:BOOL=ON -DWITH_OCTAVE:BOOL=ON -DWITH_EXAMPLES:BOOL=OFF -DINCLUDE_PREFIX:PATH=include -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_PREFIX:PATH=lib/cmake/casadi -DLIB_PREFIX:PATH=lib -DBIN_PREFIX:PATH=bin .. + cmake -DWITH_IPOPT:BOOL=ON -DWITH_OCTAVE:BOOL=ON -DWITH_EXAMPLES:BOOL=OFF -DINCLUDE_PREFIX:PATH=include -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_PREFIX:PATH=lib/cmake/casadi -DLIB_PREFIX:PATH=lib -DBIN_PREFIX:PATH=bin .. make install echo "Print content of build directory:" ls -R From 7bf6eeeb6056ec91ac75919918716c279370539f Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 17:30:10 +0200 Subject: [PATCH 12/24] Update regenerate-matlab-bindings.yml --- .../workflows/regenerate-matlab-bindings.yml | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 5f3b804..708b0ce 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -51,6 +51,8 @@ jobs: - name: Configure and compile CasADi run: | + # Remove autogenerate files to ensure that removed files are actually removed + git rm -r autogenerated # Clone casadi from a given tag git clone https://github.com/dic-iit/casadi.git cd casadi @@ -60,9 +62,21 @@ jobs: cd build cmake -DWITH_IPOPT:BOOL=ON -DWITH_OCTAVE:BOOL=ON -DWITH_EXAMPLES:BOOL=OFF -DINCLUDE_PREFIX:PATH=include -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_PREFIX:PATH=lib/cmake/casadi -DLIB_PREFIX:PATH=lib -DBIN_PREFIX:PATH=bin .. make install - echo "Print content of build directory:" - ls -R - + # Copy the MATLAB files from the install directory + cd ${GITHUB_WORKSPACE} + mkdir -p autogenerated/matlab + cp ./casadi/build/install/matlab/*.m ./autogenerated/matlab + mkdir -p autogenerated/matlab/+casadi + cp ./casadi/build/install/matlab/+casadi/*.m ./autogenerated/matlab/+casadi + mkdir -p autogenerated/matlab/octave-extra/ + cp ./casadi/build/install/matlab/octave-extra/*.m ./autogenerated/matlab/octave-extra + # Copy the mex C++ file from the build directory + mkdir -p autogenerated/cxx + cp ./casadi/build/swig/*.cxx ./autogenerated/cxx + cp ./casadi/build/swig/*.h ./autogenerated/cxx + # Remove casadi directory + rm -rf casadi + - name: Check local changes due to bindings generation run: | git status From ffaf4c8289872b12e42be63d7477cafed45f42d1 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 18:17:03 +0200 Subject: [PATCH 13/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 708b0ce..a9bc980 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -18,6 +18,10 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Check status of repo + run: | + git status + - name: Install dependencies via apt run: | # Install CasADi dependencies From 0bd586a8744f227c2e12bed7dfd35d1145f6f772 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 18:30:39 +0200 Subject: [PATCH 14/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index a9bc980..611fe46 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -18,10 +18,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Check status of repo - run: | - git status - - name: Install dependencies via apt run: | # Install CasADi dependencies @@ -31,8 +27,14 @@ jobs: apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/swig/swig/wiki/Getting-Started apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends + + - name: Check status of repo + run: | + pwd + cd ${GITHUB_WORKSPACE} + pwd + git status - # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi run: | From c374d7b5c2eedf93c5e5559b59ec97f85fc49536 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 18:33:32 +0200 Subject: [PATCH 15/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 611fe46..b789d8c 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -16,8 +16,6 @@ jobs: # Use Ubuntu Bionic as the https://github.com/casadi/casadi/wiki/matlab suggest to use GCC 7 image: ubuntu:bionic steps: - - uses: actions/checkout@v2 - - name: Install dependencies via apt run: | # Install CasADi dependencies @@ -27,7 +25,8 @@ jobs: apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/swig/swig/wiki/Getting-Started apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends - + - uses: actions/checkout@v2 + - name: Check status of repo run: | pwd From 52e4e096584eaf9da9dd44be1c838903e3207c54 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 18:38:44 +0200 Subject: [PATCH 16/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index b789d8c..f208015 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -25,7 +25,8 @@ jobs: apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/swig/swig/wiki/Getting-Started apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends - - uses: actions/checkout@v2 + # Use master as a workaround for https://github.com/actions/checkout/issues/363 + - uses: actions/checkout@master - name: Check status of repo run: | From adeb7e9de1cf6e5253ac74913e965bf7fa44e2b9 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 18:42:01 +0200 Subject: [PATCH 17/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index f208015..444a4ea 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -16,6 +16,9 @@ jobs: # Use Ubuntu Bionic as the https://github.com/casadi/casadi/wiki/matlab suggest to use GCC 7 image: ubuntu:bionic steps: + # Use master as a workaround for https://github.com/actions/checkout/issues/363 + - uses: actions/checkout@master + - name: Install dependencies via apt run: | # Install CasADi dependencies @@ -25,8 +28,6 @@ jobs: apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/swig/swig/wiki/Getting-Started apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends - # Use master as a workaround for https://github.com/actions/checkout/issues/363 - - uses: actions/checkout@master - name: Check status of repo run: | From 952c5566a3e059fbd615b20b272e16e0a7b8cbc5 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 18:44:43 +0200 Subject: [PATCH 18/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 444a4ea..4c9514a 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -11,10 +11,8 @@ on: jobs: regenerate-matlab-bindings: name: "Regenerate MATLAB bindings" - runs-on: [ubuntu-20.04] - container: # Use Ubuntu Bionic as the https://github.com/casadi/casadi/wiki/matlab suggest to use GCC 7 - image: ubuntu:bionic + runs-on: [ubuntu-18.04] steps: # Use master as a workaround for https://github.com/actions/checkout/issues/363 - uses: actions/checkout@master From d72b6ee063588b5f9666bb9314d38b6d862337d8 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 18:46:03 +0200 Subject: [PATCH 19/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 4c9514a..c5887df 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -20,12 +20,12 @@ jobs: - name: Install dependencies via apt run: | # Install CasADi dependencies - apt-get update -y - apt-get upgrade -y + sudo apt-get update -y + sudo apt-get upgrade -y # From https://github.com/casadi/casadi/wiki/InstallationLinux - apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends + sudo apt-get install -y build-essential gcc g++ gfortran git cmake liblapack-dev pkg-config coinor-libipopt-dev liboctave-dev --install-recommends # From https://github.com/swig/swig/wiki/Getting-Started - apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends + sudo apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends - name: Check status of repo run: | @@ -44,7 +44,7 @@ jobs: sh autogen.sh ./configure --with-matlab make - make install + sudo make install - name: Verify which SWIG and gcc is found run: | From 436e4d55482967202f6b860e46c36961788ed4da Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 19:41:34 +0200 Subject: [PATCH 20/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index c5887df..555603f 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -14,8 +14,7 @@ jobs: # Use Ubuntu Bionic as the https://github.com/casadi/casadi/wiki/matlab suggest to use GCC 7 runs-on: [ubuntu-18.04] steps: - # Use master as a workaround for https://github.com/actions/checkout/issues/363 - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Install dependencies via apt run: | @@ -27,13 +26,6 @@ jobs: # From https://github.com/swig/swig/wiki/Getting-Started sudo apt-get install -y libpcre3-dev autoconf automake libtool bison --install-recommends - - name: Check status of repo - run: | - pwd - cd ${GITHUB_WORKSPACE} - pwd - git status - # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi run: | @@ -57,7 +49,7 @@ jobs: - name: Configure and compile CasADi run: | # Remove autogenerate files to ensure that removed files are actually removed - git rm -r autogenerated + if [[ -d "autogenerated" ]] then git rm -r autogenerated fi # Clone casadi from a given tag git clone https://github.com/dic-iit/casadi.git cd casadi From c904a48c1d7529267a3df906bbfa95c2c99c5f91 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 19:54:38 +0200 Subject: [PATCH 21/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 555603f..6198e80 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -49,7 +49,8 @@ jobs: - name: Configure and compile CasADi run: | # Remove autogenerate files to ensure that removed files are actually removed - if [[ -d "autogenerated" ]] then git rm -r autogenerated fi + # ignore return status if the directory does not exist + git rm -r autogenerated || true # Clone casadi from a given tag git clone https://github.com/dic-iit/casadi.git cd casadi From af01eec46872a86a839b9712f2ed247a2587cd18 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 23:29:58 +0200 Subject: [PATCH 22/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 6198e80..d9a59c8 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -50,7 +50,7 @@ jobs: run: | # Remove autogenerate files to ensure that removed files are actually removed # ignore return status if the directory does not exist - git rm -r autogenerated || true + git rm -r autogenerated # Clone casadi from a given tag git clone https://github.com/dic-iit/casadi.git cd casadi From 2b06446a2f0dc5259d4698c22d212741ff2328a1 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 19 May 2021 23:30:51 +0200 Subject: [PATCH 23/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index d9a59c8..6198e80 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -50,7 +50,7 @@ jobs: run: | # Remove autogenerate files to ensure that removed files are actually removed # ignore return status if the directory does not exist - git rm -r autogenerated + git rm -r autogenerated || true # Clone casadi from a given tag git clone https://github.com/dic-iit/casadi.git cd casadi From 2b9530d1c2d90aeb3343ddc07b64204da81d1c21 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 20 May 2021 00:00:05 +0200 Subject: [PATCH 24/24] Update regenerate-matlab-bindings.yml --- .github/workflows/regenerate-matlab-bindings.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/regenerate-matlab-bindings.yml b/.github/workflows/regenerate-matlab-bindings.yml index 6198e80..e8a5b5c 100644 --- a/.github/workflows/regenerate-matlab-bindings.yml +++ b/.github/workflows/regenerate-matlab-bindings.yml @@ -29,6 +29,7 @@ jobs: # From https://github.com/casadi/casadi/wiki/matlab - name: Install SWIG for that supports MATLAB required by CasADi run: | + sudo apt-get remove swig swig3.0 cd .. git clone https://github.com/jaeandersson/swig cd swig