Skip to content

Commit

Permalink
Merge branch 'stack-of-tasks-devel' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamsingh91 committed Mar 31, 2024
2 parents 2bdb5f8 + 468debe commit 1c2ee92
Show file tree
Hide file tree
Showing 97 changed files with 2,461 additions and 391 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "devel"
schedule:
interval: "weekly"
14 changes: 14 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI - Check-changelog
on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- devel
jobs:
check-changelog:
name: Check changelog action
runs-on: ubuntu-latest
steps:
- uses: tarides/changelog-check-action@v2
with:
changelog: CHANGELOG.md
17 changes: 17 additions & 0 deletions .github/workflows/conda/environment_macos_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pinocchio
channels:
- conda-forge
dependencies:
- eigen=3.4.0
- hpp-fcl
- numpy
- boost
- eigenpy
- urdfdom
- python
- cmake
- ccache
- pkg-config
- ninja
- llvm-openmp
- cxx-compiler
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: pinocchio
channels:
- conda-forge
- nodefaults
dependencies:
- eigen=3.4.0
- hpp-fcl
Expand All @@ -10,4 +9,7 @@ dependencies:
- eigenpy
- urdfdom
- python
- mamba
- cmake
- ccache
- pkg-config
- ninja
109 changes: 83 additions & 26 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
name: CI - Linux via APT

on: [push,pull_request]
on:
push:
paths-ignore:
- 'doc/**'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'CITATION.*'
- 'COPYING.LESSER'
- 'colcon.pkg'
- '.pre-commit-config.yaml'
pull_request:
paths-ignore:
- 'doc/**'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'CITATION.*'
- 'COPYING.LESSER'
- 'colcon.pkg'
- '.pre-commit-config.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
Expand All @@ -12,7 +35,10 @@ jobs:
os: [ubuntu-22.04,ubuntu-20.04]

env:
CCACHE_DIR: /github/home/.ccache
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 5

steps:
- uses: actions/checkout@v4
Expand All @@ -21,11 +47,11 @@ jobs:
submodules: recursive

- name: Setup ccache
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ matrix.os }}
path: ${{ env.CCACHE_DIR }}
max-size: 5G
path: .ccache
key: ccache-linux-${{ matrix.os }}-${{ github.sha }}
restore-keys: ccache-linux-${{ matrix.os }}-

# extract branch name
- name: Get branch name (merge)
Expand All @@ -51,13 +77,26 @@ jobs:
run: |
sudo rm -rf /usr/local/share/boost/1.69.0
export PYTHON3_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))")
export APT_DEPENDENCIES="doxygen libboost-system-dev libboost-test-dev libboost-filesystem-dev libboost-program-options-dev libeigen3-dev liburdfdom-dev texlive-font-utils"
export APT_DEPENDENCIES=$APT_DEPENDENCIES" libboost-python-dev robotpkg-py"$PYTHON3_VERSION"-eigenpy python3-numpy"
export APT_DEPENDENCIES=$APT_DEPENDENCIES" robotpkg-py"$PYTHON3_VERSION"-hpp-fcl"
export APT_DEPENDENCIES="doxygen \
ccache \
curl \
cppcheck \
libomp-dev \
libomp5 \
libboost-system-dev \
libboost-test-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libeigen3-dev \
liburdfdom-dev \
texlive-font-utils \
libboost-python-dev \
robotpkg-py${PYTHON3_VERSION}-eigenpy \
python3-numpy \
robotpkg-py${PYTHON3_VERSION}-hpp-fcl"
echo $APT_DEPENDENCIES
sudo apt-get update -qq
sudo apt-get install -qq curl cppcheck ${APT_DEPENDENCIES}
sudo apt install libomp-dev libomp5
sudo apt-get install -qq ${APT_DEPENDENCIES}
- name: Free disk space
run: |
sudo apt clean
Expand All @@ -68,8 +107,12 @@ jobs:
git clone https://github.com/casadi/casadi.git -b 3.5.0 --depth 1
cd casadi
mkdir build && cd build
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_EXAMPLES=OFF
cmake .. \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_EXAMPLES=OFF
make -j2
sudo make install
cd ../..
rm -rf casadi
Expand All @@ -81,14 +124,20 @@ jobs:
export PYTHON3_DOT_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")
export PYTHONPATH=${PYTHONPATH}:/opt/openrobots/lib/python$PYTHON3_DOT_VERSION/site-packages
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openrobots/lib:/usr/local/lib:/usr/lib:/usr/lib/x86_64-linux-gnu
export MAKEFLAGS="-j1"
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=ON -DBUILD_WITH_CASADI_SUPPORT=ON -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON -DINSTALL_DOCUMENTATION=ON
make
make build_tests
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_WITH_COLLISION_SUPPORT=ON \
-DBUILD_ADVANCED_TESTING=ON \
-DBUILD_WITH_CASADI_SUPPORT=ON \
-DPYTHON_EXECUTABLE=$(which python3) \
-DBUILD_WITH_OPENMP_SUPPORT=ON \
-DINSTALL_DOCUMENTATION=ON
make -j2
make -j2 build_tests
export CTEST_OUTPUT_ON_FAILURE=1
make test
sudo make install
Expand All @@ -102,15 +151,19 @@ jobs:
mkdir build
cd build
export CMAKE_PREFIX_PATH=/usr/local
cmake -DPYTHON_EXECUTABLE=$(which python3) ..
make
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DPYTHON_EXECUTABLE=$(which python3)
make -j2
./run_rnea
./load_urdf
cd ../../pkgconfig
mkdir build
cd build
cmake -DPYTHON_EXECUTABLE=$(which python3) ..
make
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DPYTHON_EXECUTABLE=$(which python3)
make -j2
./run_rnea
cd ../../external
export PINOCCHIO_GIT_REPOSITORY="file://"$GITHUB_WORKSPACE
Expand All @@ -119,15 +172,19 @@ jobs:
git tag $PINOCCHIO_GIT_TAG
mkdir build
cd build
cmake -DPYTHON_EXECUTABLE=$(which python3) ..
make
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DPYTHON_EXECUTABLE=$(which python3)
make -j2
./run_rnea
./load_urdf
cd ../../pinocchio_header
mkdir build
cd build
cmake -DPYTHON_EXECUTABLE=$(which python3) ..
make
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DPYTHON_EXECUTABLE=$(which python3)
make -j2
./run_fk
Expand Down
99 changes: 73 additions & 26 deletions .github/workflows/macos-linux-conda.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,117 @@
name: CI - OSX/Linux via Conda

on: [push,pull_request]
on:
push:
paths-ignore:
- 'doc/**'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'CITATION.*'
- 'COPYING.LESSER'
- 'colcon.pkg'
- '.pre-commit-config.yaml'
pull_request:
paths-ignore:
- 'doc/**'
- '.gitlab-ci.yml'
- '.gitignore'
- '*.md'
- 'CITATION.*'
- 'COPYING.LESSER'
- 'colcon.pkg'
- '.pre-commit-config.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pinocchio-conda:
name: Pinocchio on ${{ matrix.os }} in ${{ matrix.build_type }} mode with Conda
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} ${{ matrix.build_type }} with Conda
runs-on: ${{ matrix.os }}
env:
CCACHE_DIR: ${{ matrix.CCACHE_DIR }}
CCACHE_BASEDIR: "${GITHUB_WORKSPACE}"
CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache"
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 5
BUILD_ADVANCED_TESTING: ${{ matrix.BUILD_ADVANCED_TESTING }}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
build_type: [Release, Debug]
python-version: ["3.8", "3.12"]

include:
- os: ubuntu-latest
CCACHE_DIR: /home/runner/.ccache
BUILD_ADVANCED_TESTING: OFF
- os: macos-latest
CCACHE_DIR: /Users/runner/.ccache
BUILD_ADVANCED_TESTING: ON

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-conda-${{ matrix.os }}-${{ matrix.build_type }}
path: .ccache
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.python-version }}-

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: pinocchio
auto-update-conda: true
environment-file: .github/workflows/conda/conda-env.yml
python-version: 3.8
environment-file: .github/workflows/conda/environment_macos_linux.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: Install cmake and update conda
shell: bash -l {0}
run: |
conda activate pinocchio
conda install cmake ccache llvm-openmp compilers=1.4.2 -c conda-forge
conda list

- name: Build Pinocchio
shell: bash -l {0}
shell: bash -el {0}
run: |
conda activate pinocchio
conda list
echo $CONDA_PREFIX
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=${{ env.BUILD_ADVANCED_TESTING }} -DBUILD_WITH_CASADI_SUPPORT=OFF -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON -DINSTALL_DOCUMENTATION=ON -DOpenMP_ROOT=$CONDA_PREFIX
make
make build_tests
CTEST_OUTPUT_ON_FAILURE=1 make test
make install
cmake .. \
-G "Ninja" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_WITH_COLLISION_SUPPORT=ON \
-DBUILD_ADVANCED_TESTING=${{ env.BUILD_ADVANCED_TESTING }} \
-DBUILD_WITH_CASADI_SUPPORT=OFF \
-DPYTHON_EXECUTABLE=$(which python3) \
-DBUILD_WITH_OPENMP_SUPPORT=ON \
-DINSTALL_DOCUMENTATION=ON \
-DGENERATE_PYTHON_STUBS=ON \
-DOpenMP_ROOT=$CONDA_PREFIX
cmake --build . -j2
ctest --output-on-failure
cmake --install .
- name: Uninstall Pinocchio
shell: bash -l {0}
shell: bash -el {0}
run: |
cd build
make uninstall
cmake --build . --target uninstall
check:
if: always()
name: check-macos-linux-conda

needs:
- pinocchio-conda

runs-on: Ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
Loading

0 comments on commit 1c2ee92

Please sign in to comment.