Skip to content

Update ExternalForceSet.h #145

Update ExternalForceSet.h

Update ExternalForceSet.h #145

name: Code coverage
on: [pull_request]
env:
BUILD_FOLDER: build
EXAMPLES_FOLDER: examples
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/biorbd_eigen
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
activate-environment: biorbd_eigen
environment-file: environment_eigen.yml
- name: Print mamba info
run: |
mamba info
mamba list
- name: Setup Linux dependencies
run: |
sudo apt update
sudo apt install libstdc++-11-dev
if: matrix.label == 'linux-64'
- name: Install extra common dependencies
run: |
mamba install cmake git pkgconfig codecov lcov -cconda-forge
mamba list
git submodule update --init --recursive
- name: Perform code coverage
run: |
BIORBD_FOLDER=`pwd`
CONDA_ENV_PATH=$CONDA/envs/biorbd_eigen
mkdir -p $BUILD_FOLDER
cd $BUILD_FOLDER
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH -DCMAKE_BUILD_TYPE=Coverage -DBUILD_TESTS=ON -DBUILD_EXAMPLE=OFF -DMODULE_ACTUATORS=ON -DMODULE_MUSCLES=ON -DMODULE_PASSIVE_TORQUES=ON -DMODULE_KALMAN=ON ..
cp -r test/models/ .
make biorbd_eigen_coverage -j${{ steps.cpu-cores.outputs.count }}
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"
cd $BIORBD_FOLDER