Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRomualdi committed Nov 25, 2020
1 parent 6bf5ccb commit d0056b0
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:
types: [published]
schedule:
# * is a special character in YAML so you have to quote this string
# Execute a "nightly" build at 2 AM UTC
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'


jobs:
conda-build:
conda-build:
name: '[conda:Tags:${{ matrix.project_tags }}@${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -26,7 +26,7 @@ jobs:
build_type: [Release]
# Windows is disabled due to the missing ipopt package
os: [ubuntu-latest, macos-latest]
cmake_generator:
cmake_generator:
- "Ninja"
project_tags:
- Default
Expand All @@ -47,16 +47,16 @@ jobs:
- name: Dependencies [Conda]
shell: bash -l {0}
run: |
# Install mamba (https://github.com/mamba-org/mamba) as first step
# Install mamba (https://github.com/mamba-org/mamba) as first step
conda install -c conda-forge mamba
# Compilation related dependencies
# Compilation related dependencies
mamba install -c conda-forge cmake compilers make ninja pkg-config
# Actual dependencies
mamba install -c conda-forge ace asio boost eigen gazebo glew glfw gsl ipopt libjpeg-turbo libmatio libode libxml2 opencv pkg-config portaudio qt sdl sdl2 sqlite tinyxml
# Additional dependencies useful only on Linux
- name: Dependencies [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
# Additional dependencies only useful on Linux
Expand All @@ -77,16 +77,16 @@ jobs:
cd build
cmake --build . --config ${{ matrix.build_type }}
docker-build:
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:
cmake_generator:
- "Ninja"
docker_image:
docker_image:
- "ubuntu:focal"
- "debian:buster-backports"
- "debian:sid"
Expand Down Expand Up @@ -130,8 +130,8 @@ jobs:
# Python is disabled as a workaround for https://github.com/robotology/robotology-superbuild/issues/494
cmake -G"${{ matrix.cmake_generator }}" -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -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-sid]
if: matrix.docker_image == 'debian:sid'
- name: Disable profiles that are not supported in docker for now [Docker debian-sid and debian-buster]
if: (matrix.docker_image == 'debian:sid' || matrix.docker_image == 'debian:buster-backports')
run: |
cd build
cmake -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=OFF .
Expand Down Expand Up @@ -181,8 +181,8 @@ jobs:
steps:
- uses: actions/checkout@master

- name: Check free space
shell: bash
- name: Check free space
shell: bash
run: |
df -h
Expand All @@ -191,29 +191,29 @@ jobs:
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
# 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:
# 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
# * 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: |
Expand All @@ -225,39 +225,39 @@ jobs:
run: |
cmake --version
brew cask install xquartz
# Update homebrew
# Update homebrew
# Workaround for https://github.com/actions/virtual-environments/issues/1811#issuecomment-718475660
brew unlink [email protected]
brew update
brew upgrade
# Core dependencies
# Core dependencies
brew install ace boost cmake eigen gsl ipopt jpeg libedit opencv pkg-config portaudio qt5 sqlite swig tinyxml
# ROBOTOLOGY_ENABLE_DYNAMICS dependencies
# ROBOTOLOGY_ENABLE_DYNAMICS dependencies
brew install libmatio
# ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS (qhull and cppad are installed with brew)
brew install cppad qhull
# ROBOTOLOGY_USES_GAZEBO dependencies
brew install osrf/simulation/gazebo11
# CI-specific dependencies
# CI-specific dependencies
brew install ninja
cmake --version
- name: Dependencies [Windows]
if: contains(matrix.os, 'windows')
run: |
# To avoid spending a huge time compiling vcpkg dependencies, we download an archive that comes precompiled with all the ports that we need
# 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/download/v0.5.0/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&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash
Expand All @@ -266,11 +266,11 @@ jobs:
cd build
cmake -G"${{ matrix.cmake_generator }}" -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=ON -DROBOTOLOGY_USES_PYTHON:BOOL=ON -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
- name: Disable macOS unsupported options
- name: Disable macOS unsupported options
if: contains(matrix.os, 'macos')
run: |
run: |
cd build
# Disable ROBOTOLOGY_USES_PYTHON in macOS
# Disable ROBOTOLOGY_USES_PYTHON in macOS
cmake -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF .
- name: Configure [Windows]
Expand All @@ -281,7 +281,7 @@ jobs:
source /c/robotology/scripts/setup-deps.sh
mkdir -p build
cd build
# ROBOTOLOGY_ENABLE_TELEOPERATION is OFF as a workaround for https://github.com/robotology/robotology-superbuild/issues/472
# ROBOTOLOGY_ENABLE_TELEOPERATION is OFF as a workaround for https://github.com/robotology/robotology-superbuild/issues/472
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/robotology/vcpkg/scripts/buildsystems/vcpkg.cmake -DYCM_EP_INSTALL_DIR=C:/robotology/robotology -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_USES_ESDCAN:BOOL=ON -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=OFF -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=OFF -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
Expand All @@ -291,7 +291,7 @@ jobs:
run: |
cd build
cmake --build . --config ${{ matrix.build_type }}
env:
env:
# This is necessary only on macOS/homebrew, but on Linux it should be ignored
Qt5_DIR: /usr/local/opt/qt5/lib/cmake/Qt5

Expand Down Expand Up @@ -328,15 +328,15 @@ jobs:
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
# 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 ${GITHUB_WORKSPACE}/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
# Cleanup and build dependencies installer
cd /c
rm -rf /c/build-installer-full
mkdir /c/build-installer-dependencies
Expand Down

0 comments on commit d0056b0

Please sign in to comment.