Skip to content

Add yarp-ros repo with Unstable branches and compile again against YARP master in Unstable branches #5358

Add yarp-ros repo with Unstable branches and compile again against YARP master in Unstable branches

Add yarp-ros repo with Unstable branches and compile again against YARP master in Unstable branches #5358

Workflow file for this run

name: CI Workflow
on:
workflow_dispatch:
push:
branches:
- master
- 'releases/**'
tags:
- v*
pull_request:
release:
types: [published]
schedule:
# * is a special character in YAML so you have to quote this string
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'
jobs:
conda-build:
name: '[conda:Tags:${{ matrix.project_tags }}@${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Release]
os: [ubuntu-latest, macos-12, macos-14, windows-2019, windows-2022]
project_tags:
- Default
- Unstable
include:
- project_tags: Default
project_tags_cmake_options: ""
- project_tags: Unstable
project_tags_cmake_options: "-DROBOTOLOGY_PROJECT_TAGS=Unstable"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Miniforge3
miniforge-version: latest
- name: Install files to enable compilation of mex files [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020b_mexa64.zip
unzip msdk_R2020b_mexa64.zip
rm msdk_R2020b_mexa64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020b_mexa64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexa64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/macOS Intel]
if: matrix.os == 'macos-12'
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexmaci64.zip
unzip msdk_R2020a_mexmaci64.zip
rm msdk_R2020a_mexmaci64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexmaci64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexmaci64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/macOS Apple Silicon]
if: matrix.os == 'macos-14'
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2023b_mexmaca64.zip
unzip msdk_R2023b_mexmaca64.zip
rm msdk_R2023b_mexmaca64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2023b_mexmaca64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexmaca64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/Windows]
if: contains(matrix.os, 'windows')
shell: bash
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexw64.zip
unzip msdk_R2020a_mexw64.zip
rm msdk_R2020a_mexw64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexw64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexw64" >> $GITHUB_ENV
- name: Dependencies [Conda]
shell: bash -l {0}
run: |
# Dependencies
conda install ace asio assimp boost cli11 eigen freetype gazebo gz-sim8 glew glfw glm graphviz gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json qhull "pcl>=1.11.1" vtk "libopencv>=4.10.0" opencv portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr cmake compilers make ninja pkg-config tomlplusplus libzlib "ffmpeg==6.*" onnxruntime-cpp "qt6-main>=6.7.2"
# Python
conda install python numpy swig pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython gst-plugins-good gst-plugins-bad pyqtwebengine qtpy pyyaml
# Additional dependencies useful only on Linux
- name: Dependencies [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
# Additional dependencies only useful on Linux
# See https://github.com/robotology/robotology-superbuild/issues/477
conda install bash-completion freeglut libdc1394 libi2c libselinux-cos7-x86_64 xorg-libxau libxcb xorg-libxdamage xorg-libxext xorg-libxfixes xorg-libxxf86vm xorg-libxrandr mesa-libgl-cos7-x86_64 mesa-libgl-devel-cos7-x86_64 libxshmfence-cos7-x86_64 libxshmfence-devel-cos7-x86_64
# Additional dependencies useful only on Windows
- name: Dependencies [Conda/Windows]
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
# Additional dependencies only useful on Windows
conda install -c conda-forge -c robotology esdcan freeglut
# Setting QT_HOST_PATH as a workaround for https://github.com/conda-forge/qt-main-feedstock/issues/273
- name: Set QT_HOST_PATH on osx-arm64
if: contains(matrix.os, 'macos-14')
shell: bash -l {0}
run: |
echo "QT_HOST_PATH=${CONDA_PREFIX}" >> $GITHUB_ENV
- name: Print used environment [Conda]
shell: bash -l {0}
run: |
conda list
env
- name: Set CMake generator [Conda/Linux and macOs]
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
shell: bash -l {0}
run: |
echo "GHA_CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
- name: Set CMake generator [Conda/Windows 2022]
if: contains(matrix.os, 'windows-2022')
shell: bash -l {0}
run: |
echo "GHA_CMAKE_GENERATOR=Visual Studio 17 2022" >> $GITHUB_ENV
- name: Set CMake generator [Conda/Windows 2019]
if: contains(matrix.os, 'windows-2019')
shell: bash -l {0}
run: |
echo "GHA_CMAKE_GENERATOR=Visual Studio 16 2019" >> $GITHUB_ENV
- name: Configure [Conda]
shell: bash -l {0}
run: |
set
mkdir -p b
cd b
cmake -G"${GHA_CMAKE_GENERATOR}" -C ${GITHUB_WORKSPACE}/.ci/initial-cache.gh.cmake -DYCM_EP_ADDITIONAL_CMAKE_ARGS:STRING="-DMatlab_ROOT_DIR:PATH=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION}" -DROBOTOLOGY_USES_MATLAB:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
# Disable options not tested on Conda for now
cmake -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF .
- name: Disable options not suppored on Visual Studio 2019 [Conda/Windows 2019]
if: contains(matrix.os, 'windows-2019')
shell: bash -l {0}
run: |
cd b
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF .
# For some reason, the Strawberry perl's pkg-config is found
# instead of the conda's one, so let's delete the /c/Strawberry directory
- name: Debug pkg-config problem
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
rm -rf /c/Strawberry
- name: Build [Conda]
shell: bash -l {0}
run: |
# Using b instead of build as a temporary workaround to https://github.com/robotology/robotology-superbuild/issues/1542#issuecomment-1827682957
# Go back to build once https://github.com/robotology/yarp/pull/3057 is merged and released
cd b
# Make sure that (on Windows) YARP's dll are in the path in case some repos use a code generator
# in their build that uses YARP's dll
# https://github.com/robotology/robotology-superbuild/pull/1547#issuecomment-2278151057
source ./install/share/robotology-superbuild/setup.sh
cmake --build . --config ${{ matrix.build_type }}
# Skip on Apple Silicon https://github.com/robotology/robotology-superbuild/issues/1625
- name: Check python metadata of installed python packages are coherent [Conda]
if: matrix.os != 'macos-14'
shell: bash -l {0}
run: |
source ./b/install/share/robotology-superbuild/setup.sh
pip check
docker-build:
name: '[docker:Tags:${{ matrix.project_tags }}@${{ matrix.docker_image }}@${{ matrix.build_type }}]'
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build_type: [Debug]
cmake_generator:
- "Ninja"
docker_image:
- "ubuntu:20.04"
- "ubuntu:22.04"
- "ubuntu:24.04"
project_tags:
- Default
- Unstable
include:
- project_tags: Default
project_tags_cmake_options: ""
- project_tags: Unstable
project_tags_cmake_options: "-DROBOTOLOGY_PROJECT_TAGS=Unstable"
container:
image: ${{ matrix.docker_image }}
volumes:
- /usr/local:/host_usr_local
steps:
- uses: actions/checkout@v3.6.0
- name: Free disk space in host machine
run: |
rm -rf /host_usr_local/graalvm/
rm -rf /host_usr_local/.ghcup/
rm -rf /host_usr_local/share/powershell
rm -rf /host_usr_local/share/chromium
rm -rf /host_usr_local/lib/android
rm -rf /host_usr_local/lib/node_modules
- name: Dependencies [Docker]
run: |
chmod +x ./.ci/install_debian.sh
bash ./.ci/install_debian.sh
- name: Install recent CMake [Docker/Ubuntu Focal]
if: matrix.docker_image == 'ubuntu:20.04'
run: |
apt-get -y update
apt-get install -y ca-certificates software-properties-common gpg wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
apt-get install -y cmake
- name: Configure [Docker]
run: |
mkdir -p build
cd build
cmake -C ${GITHUB_WORKSPACE}/.ci/initial-cache.gh.cmake -G"${{ matrix.cmake_generator }}" -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
- name: Disable MuJoCo and gz-sim for distros released before 2022 [Docker ubuntu:20.04]
if: (matrix.docker_image == 'ubuntu:20.04')
run: |
cd build
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_USES_GZ:BOOL=OFF .
- name: Disable Gazebo Classic support for distro without Gazebo Classic binaries [Docker ubuntu:24.04]
if: (matrix.docker_image == 'ubuntu:24.04')
run: |
cd build
cmake -DROBOTOLOGY_USES_GAZEBO:BOOL=OFF .
- name: Build [Docker]
run: |
cd build
cmake --build . --config ${{ matrix.build_type }}
normal-build:
name: '[Tags:${{ matrix.project_tags }}@${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Release]
os: [ubuntu-22.04, windows-2019]
project_tags: [Default, Unstable, LatestReleases]
include:
- os: ubuntu-22.04
build_type: Release
cmake_generator: "Ninja"
- os: macos-latest
build_type: Release
cmake_generator: "Ninja"
- project_tags: Default
project_tags_cmake_options: ""
- project_tags: Unstable
project_tags_cmake_options: "-DROBOTOLOGY_PROJECT_TAGS=Unstable"
- project_tags: LatestReleases
project_tags_cmake_options: "-DROBOTOLOGY_PROJECT_TAGS=Custom -DROBOTOLOGY_PROJECT_TAGS_CUSTOM_FILE=${GITHUB_WORKSPACE}/releases/latest.releases.yaml"
steps:
- uses: actions/checkout@master
- name: Install files to enable compilation of mex files [Linux]
if: contains(matrix.os, 'ubuntu')
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020b_mexa64.zip
unzip msdk_R2020b_mexa64.zip
rm msdk_R2020b_mexa64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020b_mexa64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexa64" >> $GITHUB_ENV
- name: Move robotology-superbuild in C under Windows
if: contains(matrix.os, 'windows')
shell: bash
run: |
ls /d/
cp -r ${GITHUB_WORKSPACE} /c/
- name: Define ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
if: contains(matrix.os, 'windows')
shell: bash
run: |
echo "ROBOTOLOGY_SUPERBUILD_SOURCE_DIR=/c/robotology-superbuild" >> $GITHUB_ENV
- name: Define ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
echo "ROBOTOLOGY_SUPERBUILD_SOURCE_DIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
- name: Check free space
shell: bash
run: |
df -h
# Print environment variables to simplify development and debugging
- name: Environment Variables
shell: bash
run: env
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
# symlinks disabled are the default setting on Windows, but unfortunatly GitHub Actions enabled them
# See:
# * https://github.com/robotology/robotology-superbuild/issues/429
# * https://github.com/actions/virtual-environments/pull/1186
- name: Disable Git symlinks on Windows
if: contains(matrix.os, 'windows')
run: git config --global core.symlinks false
# ============
# DEPENDENCIES
# ============
# Waiting a github action that installs dependencies in a
# multiplatform setup (likely using TS or JS), we install
# packages with os-specific steps.
- name: Dependencies [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
cd $ROBOTOLOGY_SUPERBUILD_SOURCE_DIR
chmod +x ./.ci/install_debian.sh
sudo bash ./.ci/install_debian.sh
- name: Dependencies [Windows]
if: contains(matrix.os, 'windows')
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
# To avoid spending a huge time compiling vcpkg dependencies, we download an archive that comes precompiled with all the ports that we need
choco install -y wget unzip
# To avoid problems with non-relocatable packages, we unzip the archive exactly in the same directory
# that has been used to create the pre-compiled archive
cd C:/
wget https://github.com/robotology/robotology-superbuild-dependencies-vcpkg/releases/latest/download/vcpkg-robotology-with-gazebo.zip
unzip vcpkg-robotology-with-gazebo.zip -d C:/
rm vcpkg-robotology-with-gazebo.zip
# ===================
# CMAKE-BASED PROJECT
# ===================
- name: Configure [Ubuntu]
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
mkdir -p build
cd build
cmake -C ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/.ci/initial-cache.gh.cmake -G"${{ matrix.cmake_generator }}" -DYCM_EP_ADDITIONAL_CMAKE_ARGS:STRING="-DMatlab_ROOT_DIR:PATH=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION}" -DROBOTOLOGY_USES_MATLAB:BOOL=ON -DYCM_BOOTSTRAP_VERBOSE=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
# Workaround for https://github.com/robotology/robotology-superbuild/issues/1680
- name: Define CMAKE_CONFIGURATION_TYPES
if: contains(matrix.os, 'windows')
shell: bash
run: |
echo "CMAKE_CONFIGURATION_TYPES=Debug;Release" >> $GITHUB_ENV
- name: Configure [Windows]
if: contains(matrix.os, 'windows')
shell: bash
run: |
# Workaround for https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7721
mv C:/robotology/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe C:/robotology/vcpkg/installed/x64-windows/tools/pkgconf/pkgconfback.exe
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
# Make sure that Gazebo packages can be found by CMake
source /c/robotology/scripts/setup-deps.sh
mkdir -p build
cd build
# ROBOTOLOGY_ENABLE_TELEOPERATION is OFF as it is unsupported on vcpkg
cmake -C ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/.ci/initial-cache.gh.cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/robotology/vcpkg/scripts/buildsystems/vcpkg.cmake -DROBOTOLOGY_USES_MATLAB:BOOL=OFF -DYCM_BOOTSTRAP_VERBOSE=ON -DYCM_EP_INSTALL_DIR=C:/robotology/robotology -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=Debug ${{ matrix.project_tags_cmake_options }} ..
cmake -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=OFF .
- name: Disable options unsupported on vcpkg
if: contains(matrix.os, 'windows')
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd build
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_USES_GZ:BOOL=OFF .
- name: Build [Ubuntu]
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
cd build
cmake --build . --config ${{ matrix.build_type }}
# Just for release jobs we also compile Windows in Release, to ensure that Release libraries are included in the installer
- name: Build (Release) [Windows]
if: github.event_name == 'release' && matrix.project_tags == 'Default' && contains(matrix.os, 'windows')
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd build
# Make sure that vcpkg's ace .dll are on the PATH
source /c/robotology/scripts/setup-deps.sh
# Make sure that YARP's dll are in the path in case some repos use a code generator
# in their build that uses YARP's dll
# https://github.com/robotology/robotology-superbuild/pull/1547#issuecomment-2278151057
source /c/robotology/robotology/share/robotology-superbuild/setup.sh
cmake --build . --config Release
# Cleanup build directories to avoid to fill the disk
rm -rf ./robotology
- name: Build (Debug) [Windows]
if: contains(matrix.os, 'windows')
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd build
# Make sure that vcpkg's ace .dll are on the PATH
source /c/robotology/scripts/setup-deps.sh
# Make sure that YARP's dll are in the path in case some repos use a code generator
# in their build that uses YARP's dll
# https://github.com/robotology/robotology-superbuild/pull/1547#issuecomment-2278151057
source /c/robotology/robotology/share/robotology-superbuild/setup.sh
cmake --build . --config Debug
# Cleanup build directories to avoid to fill the disk
rm -rf ./robotology
# Just for release builds we generate the installer
- name: Generate installer [Windows]
if: github.event_name == 'release' && matrix.project_tags == 'Default' && matrix.os == 'windows-2019'
shell: bash
run: |
# Download QtIFW
cd /c
certutil.exe -urlcache -split -f https://github.com/robotology-dependencies/qtifw-binaries/releases/download/v3.1.1/QtIFW-3.1.1.zip QtIFW-3.1.1.zip
7z.exe x QtIFW-3.1.1.zip
export PATH=$PATH:/c/QtIFW-3.1.1/bin
# As we need a lot of space, we build the installer in the C:\ drive
# that has more space of the D:\ drive in GitHub Actions
mkdir /c/build-installer-full
cd /c/build-installer-full
cmake -A x64 -DRI_BUILD_FULL_INSTALLER:BOOL=ON ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/packaging/windows
cmake --build . --config Release --target PACKAGE
# Move installer in installer directory with a fixed name
mv *.exe /c/robotology-full-installer-win64.exe
# Cleanup and build dependencies installer
cd /c
rm -rf /c/build-installer-full
mkdir /c/build-installer-dependencies
cd /c/build-installer-dependencies
cmake -A x64 -DRI_BUILD_FULL_INSTALLER:BOOL=OFF ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/packaging/windows
cmake --build . --config Release --target PACKAGE
# Move installer in installer directory with a fixed name
mv *.exe /c/robotology-dependencies-installer-win64.exe
- name: Upload Full Installer [Windows]
if: github.event_name == 'release' && matrix.project_tags == 'Default' && matrix.os == 'windows-2019'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: C:/robotology-full-installer-win64.exe
asset_name: robotology-full-installer-win64.exe
asset_content_type: application/octet-stream
- name: Upload Dependencies installer [Windows]
if: github.event_name == 'release' && matrix.project_tags == 'Default' && matrix.os == 'windows-2019'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: C:/robotology-dependencies-installer-win64.exe
asset_name: robotology-dependencies-installer-win64.exe
asset_content_type: application/octet-stream