Skip to content

conda-forge: Migrate from jpeg to libjpeg-turbo #4527

conda-forge: Migrate from jpeg to libjpeg-turbo

conda-forge: Migrate from jpeg to libjpeg-turbo #4527

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-latest, 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@v2
with:
miniforge-variant: Mambaforge
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]
if: contains(matrix.os, 'macos')
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/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
mamba install ace asio assimp boost eigen freetype gazebo glew glfw glm graphviz gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json pcl vtk opencv portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr cmake compilers make ninja pkg-config tomlplusplus libzlib ffmpeg
# Python
mamba install python numpy swig pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython gst-plugins-good gst-plugins-bad
# 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
mamba install bash-completion expat-cos7-x86_64 freeglut libdc1394 libi2c libselinux-cos7-x86_64 libxau-cos7-x86_64 libxcb-cos7-x86_64 libxdamage-cos7-x86_64 libxext-cos7-x86_64 libxfixes-cos7-x86_64 libxxf86vm-cos7-x86_64 mesa-libgl-cos7-x86_64 mesa-libgl-devel-cos7-x86_64 libxshmfence-cos7-x86_64 libxshmfence-devel-cos7-x86_64
# Ignition Gazebo
mamba install libignition-gazebo6
# 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
mamba install -c conda-forge -c robotology esdcan freeglut
- name: Print used environment [Conda]
shell: bash -l {0}
run: |
mamba 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 build
cd build
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 build
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF .
- name: Configure Extra [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: cmake -S . -B build/ -DROBOTOLOGY_USES_IGNITION:BOOL=ON
# 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: |
cd build
cmake --build . --config ${{ matrix.build_type }}
docker-build:
name: '[docker:Tags:${{ matrix.project_tags }}@${{ matrix.docker_image }}@${{ matrix.build_type }}]'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
build_type: [Debug]
cmake_generator:
- "Ninja"
docker_image:
- "ubuntu:focal"
- "ubuntu:jammy"
- "debian:buster-backports"
- "debian:bullseye"
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/[email protected]
- 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: Upgrade apt packages Debian Testing [Debian Testing]
if: matrix.docker_image == 'debian:testing'
run: |
# The Debian testing docker image is generated only
# once a month, so to actually test with the latest
# packages we need to manually upgrade the packages
apt-get -y upgrade
- name: Dependencies [Docker]
run: |
chmod +x ./.ci/install_debian.sh
bash ./.ci/install_debian.sh
- name: Install CMake 3.16 [Docker/Debian Buster]
if: matrix.docker_image == 'debian:buster-backports'
run: |
apt-get -y -t buster-backports install 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 profiles that are not supported in docker for now [Docker debian-testing and debian-buster]
if: (matrix.docker_image == 'debian:testing' || matrix.docker_image == 'debian:buster-backports')
run: |
cd build
cmake -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=OFF -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF .
- name: Disable profiles that are not supported in Debian Buster [Docker debian:buster-backports]
if: (matrix.docker_image == 'debian:buster-backports')
run: |
cd build
cmake -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=OFF -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=OFF .
- name: Disable MuJoCo for other distros released before 2022 [Docker ubuntu:focal and debian:bullseye]
if: (matrix.docker_image == 'ubuntu:focal' || matrix.docker_image == 'debian:bullseye')
run: |
cd build
cmake -DROBOTOLOGY_USES_MUJOCO: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-20.04, windows-2019]
project_tags: [Default, Unstable, LatestReleases]
include:
- os: ubuntu-20.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 }} ..
- 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 Ubuntu 20.04 and vcpkg
if: contains(matrix.os, '20.04') || contains(matrix.os, 'windows')
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd build
cmake -DROBOTOLOGY_USES_MUJOCO: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
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
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/[email protected]
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/[email protected]
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