Skip to content

Commit

Permalink
Merge pull request #216 from pariterre/master
Browse files Browse the repository at this point in the history
RBDL 3.1.0?
  • Loading branch information
pariterre authored Jul 19, 2021
2 parents 4116dbb + 906765c commit c7b7280
Show file tree
Hide file tree
Showing 275 changed files with 12,578 additions and 8,574 deletions.
179 changes: 179 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
#---------------------------------#
# environment configuration #
#---------------------------------#

# Build worker image (VM template)
image:
- Ubuntu2004
- Visual Studio 2019
- macos

# set clone depth
clone_depth: 5 # clone entire repository history if not defined

# There is no building process
build: off

# scripts that run after cloning repository
install:
- sh: if [[ $CI_LINUX == true ]]; then sudo apt install lcov -y; fi
- sh: if [[ $CI_LINUX == true ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 1000 --slave /usr/bin/g++ g++ /usr/bin/g++-9; fi
- sh: if [[ $CI_LINUX == true ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; else curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -L -o miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; fi
- sh: hash -r
- sh: source activate
- cmd: SET MINICONDA_PATH="C:\\Miniconda38-x64"
- cmd: SET PATH=%MINICONDA_PATH%;%MINICONDA_PATH%"\\Scripts";%PATH%
- cmd: conda init cmd.exe
- conda config --set always_yes yes --set changeps1 no
- conda config --set auto_update_conda no
- conda update -q conda
- conda create -n biorbd
- conda activate biorbd

# Set environment variables
- sh: BIORBD_FOLDER=`pwd`
- sh: BIORBD_CASADI_BUILD_FOLDER=$BIORBD_FOLDER/build_casadi
- sh: BIORBD_EIGEN_BUILD_FOLDER=$BIORBD_FOLDER/build_eigen
- sh: BIORBD_COVERAGE_BUILD_FOLDER=$BIORBD_FOLDER/build_coverage
- sh: CONDA_ENV_PATH=$HOME/miniconda/envs
- sh: if [[ $CI_LINUX == true ]]; then export CC=/usr/bin/gcc; fi
- sh: if [[ $CI_LINUX == true ]]; then export CXX=/usr/bin/g++; fi
- cmd: SET BIORBD_FOLDER=%cd%
- cmd: SET BIORBD_CASADI_BUILD_FOLDER=%BIORBD_FOLDER%\\build_casadi
- cmd: SET BIORBD_EIGEN_BUILD_FOLDER=%BIORBD_FOLDER%\\build_eigen
- cmd: SET CONDA_ENV_PATH=%MINICONDA_PATH%\\envs

# Setup the conda environment
- conda install git rbdl tinyxml ipopt numpy pytest swig pkgconfig cmake -c conda-forge
- sh: if [[ $CI_LINUX == true ]]; then conda install xorg-libx11 xorg-libxtst -cconda-forge; fi
- cmd: conda install ninja -cconda-forge
- conda list


test_script:
############################################################################
# Test the Casadi backend
############################################################################
- sh: cd $BIORBD_FOLDER
- cmd: cd %BIORBD_FOLDER%

# LINUX and MAC
- sh: mkdir -p $BIORBD_CASADI_BUILD_FOLDER
- sh: cd $BIORBD_CASADI_BUILD_FOLDER
- sh: cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH/biorbd/ -DMATH_LIBRARY_BACKEND="Casadi" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DMODULE_ACTUATORS=ON -DMODULE_KALMAN=OFF -DMODULE_MUSCLES=ON -DBINDER_PYTHON3=ON ..
- sh: make install

# WINDOWS
- cmd: mkdir %BIORBD_CASADI_BUILD_FOLDER%
- cmd: cd %BIORBD_CASADI_BUILD_FOLDER%
- cmd: cmake -GNinja -DCMAKE_INSTALL_PREFIX=%CONDA_ENV_PATH%/biorbd/ -DMATH_LIBRARY_BACKEND="Casadi" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DMODULE_ACTUATORS=ON -DMODULE_KALMAN=OFF -DMODULE_MUSCLES=ON -DBINDER_PYTHON3=ON ..
- cmd: cmake --build . --config Release --target install

# Run the tests
- cd test
- sh: ./biorbd_casadi_tests
- cmd: biorbd_casadi_tests.exe
- cd ..

# Test for the python binder
- cd test/binding/Python3
- pytest .
- cd ../../..


############################################################################
# Test the Eigen3 backend
############################################################################
- sh: cd $BIORBD_FOLDER
- cmd: cd %BIORBD_FOLDER%

# LINUX and MAC
- sh: mkdir -p $BIORBD_EIGEN_BUILD_FOLDER
- sh: cd $BIORBD_EIGEN_BUILD_FOLDER
- sh: cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH/biorbd/ -DMATH_LIBRARY_BACKEND="Eigen3" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DMODULE_ACTUATORS=ON -DMODULE_KALMAN=ON -DMODULE_MUSCLES=ON -DBUILD_EXAMPLE=ON -DBINDER_C=ON -DBINDER_PYTHON3=ON ..
- sh: make install

# WINDOWS
- cmd: mkdir %BIORBD_EIGEN_BUILD_FOLDER%
- cmd: cd %BIORBD_EIGEN_BUILD_FOLDER%
- cmd: cmake -GNinja -DCMAKE_INSTALL_PREFIX=%CONDA_ENV_PATH%\\biorbd -DMATH_LIBRARY_BACKEND="Eigen3" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DMODULE_ACTUATORS=ON -DMODULE_KALMAN=ON -DMODULE_MUSCLES=ON -DBUILD_EXAMPLE=ON -DBINDER_C=ON -DBINDER_PYTHON3=ON ..
- cmd: cmake --build . --config Release --target install

# Run the tests
- cd test
- sh: ./biorbd_eigen_tests
- cmd: biorbd_eigen_tests.exe
- cd ..

# Test the c binder
- cd test/binding/c
- sh: ./biorbd_eigen_tests_binding_c
- cmd: biorbd_eigen_tests_binding_c.exe
- cd ../../..

# Test for the python binder
- cd test/binding/Python3
- pytest .
- cd ../../..


############################################################################
# Code coverage (on Linux)
############################################################################
- sh: if [[ $CI_LINUX == true ]]; then cd $BIORBD_FOLDER; mkdir $BIORBD_COVERAGE_BUILD_FOLDER; cd $BIORBD_COVERAGE_BUILD_FOLDER; fi
- sh: if [[ $CI_LINUX == true ]]; then cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH/biorbd/ -DCMAKE_BUILD_TYPE=Coverage -DBUILD_TESTS=ON -DBUILD_EXAMPLE=OFF -DMODULE_ACTUATORS=ON -DMODULE_MUSCLES=ON -DMODULE_KALMAN=ON ..; fi
- sh: if [[ $CI_LINUX == true ]]; then cp -r test/models/ .; fi
- sh: if [[ $CI_LINUX == true ]]; then make biorbd_eigen_coverage; fi
- sh: if [[ $CI_LINUX == true ]]; then cd $BIORBD_EIGEN_BUILD_FOLDER; fi


############################################################################
# Test installation (cpp_casadi_installed folder)
############################################################################
- sh: cd $BIORBD_FOLDER/examples/cpp_casadi_installed
- cmd: cd %BIORBD_FOLDER%\\examples\\cpp_casadi_installed
- mkdir build
- cd build

# LINUX and Mac
- sh: cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH/biorbd/ -DCMAKE_BUILD_TYPE=Release ..
- sh: make
- sh: ./forwardDynamicsExample

# WINDOWS
- cmd: cmake -GNinja -DCMAKE_INSTALL_PREFIX=%CONDA_ENV_PATH%\\biorbd -DCMAKE_BUILD_TYPE=Release ..
- cmd: cmake --build . --config Release
- cmd: forwardDynamicsExample.exe

- sh: cd $BIORBD_FOLDER
- cmd: cd %BIORBD_FOLDER%


############################################################################
# Test installation (cpp_eigen_installed folder)
############################################################################
- sh: cd $BIORBD_FOLDER/examples/cpp_eigen_installed
- cmd: cd %BIORBD_FOLDER%\\examples\\cpp_eigen_installed
- mkdir build
- cd build

# LINUX and Mac
- sh: cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH/biorbd/ -DCMAKE_BUILD_TYPE=Release ..
- sh: make
- sh: ./forwardDynamicsExample

# WINDOWS
- cmd: cmake -GNinja -DCMAKE_INSTALL_PREFIX=%CONDA_ENV_PATH%\\biorbd -DCMAKE_BUILD_TYPE=Release ..
- cmd: cmake --build . --config Release
- cmd: forwardDynamicsExample.exe

- sh: cd $BIORBD_FOLDER
- cmd: cd %BIORBD_FOLDER%


on_success:
# Uploading report to CodeCov
- sh: if [[ $CI_LINUX == true ]]; then cd $BIORBD_COVERAGE_BUILD_FOLDER; fi
- sh: if [[ $CI_LINUX == true ]]; then lcov --directory . --capture --output-file coverage.info; lcov --remove coverage.info '/usr/*' --output-file coverage.info; lcov --list coverage.info; bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"; fi
- sh: if [[ $CI_LINUX == true ]]; then cd $BIORBD_FOLDER; fi

182 changes: 0 additions & 182 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit c7b7280

Please sign in to comment.