diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5134f86500f..fdefc652cb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,72 @@ env: VCPKG_INSTALLATION_ROOT: C:\robotology\vcpkg jobs: - build: + build-with-conda-dependencies: + name: '[conda:${{ matrix.os }}]' + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + build_type: [Release] + os: [ubuntu-20.04, macos-10.15, windows-2019] + + steps: + - uses: actions/checkout@v2 + + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + + - name: Dependencies [Conda] + shell: bash -l {0} + run: | + # Install mamba (https://github.com/mamba-org/mamba) as first step + conda install -c conda-forge mamba + # Compilation related dependencies + mamba install -c conda-forge cmake compilers make ninja pkg-config + # Actual dependencies + mamba install -c conda-forge eigen libxml2 assimp ipopt qt + + # 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 -c conda-forge expat-cos6-x86_64 freeglut libselinux-cos6-x86_64 libxau-cos6-x86_64 libxcb-cos6-x86_64 libxdamage-cos6-x86_64 libxext-cos6-x86_64 libxfixes-cos6-x86_64 libxxf86vm-cos6-x86_64 mesalib mesa-libgl-cos6-x86_64 + + - name: Configure [Conda/Linux&macOS] + if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') + shell: bash -l {0} + run: | + mkdir build + cd build + cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_Qt5:BOOL=ON -DIDYNTREE_USES_ASSIMP:BOOL=ON -DIDYNTREE_USES_IPOPT:BOOL=ON .. + + - name: Configure [Conda/Windows] + if: contains(matrix.os, 'windows') + shell: bash -l {0} + run: | + mkdir build + cd build + cmake -G"Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_Qt5:BOOL=ON -DIDYNTREE_USES_ASSIMP:BOOL=ON -DIDYNTREE_USES_IPOPT:BOOL=ON .. + + - name: Build [Conda] + shell: bash -l {0} + run: | + cd build + cmake --build . --config ${{ matrix.build_type }} + + - name: Test [Conda] + # Test disabled on Windows due to https://github.com/robotology/idyntree/issues/787 + if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') + shell: bash -l {0} + run: | + cd build + ctest --output-on-failure -C ${{ matrix.build_type }} . + + build-with-system-dependencies: name: '[${{ matrix.os }}@${{ matrix.build_type }}]' runs-on: ${{ matrix.os }} strategy: