Skip to content

Commit

Permalink
Merge pull request #55 from robotology/feat/addCondaCi
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogene authored Dec 27, 2022
2 parents 75ad555 + 4983d5c commit cf1700e
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
build_type: [Release, Debug]
os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@master
Expand Down Expand Up @@ -56,13 +56,6 @@ jobs:
sudo apt install git build-essential clang valgrind cmake \
libboost-all-dev qtbase5-dev qtdeclarative5-dev \
qtmultimedia5-dev libqt5opengl5-dev libqcustomplot-dev
- name: Dependencies [macOS]
if: matrix.os == 'macOS-latest'
run: |
brew update
brew upgrade
brew install cmake qt boost
- name: Dependencies [Windows]
if: matrix.os == 'windows-latest'
Expand All @@ -76,8 +69,8 @@ jobs:
7z x vcpkg-robotology.zip -oC:/
rm vcpkg-robotology.zip
- name: Source-based Dependencies [Ubuntu/macOS]
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
- name: Source-based Dependencies [Ubuntu]
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
# YCM
Expand All @@ -102,8 +95,8 @@ jobs:
# CMAKE-BASED PROJECT
# ===================

- name: Configure [Ubuntu/macOS]
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
- name: Configure [Ubuntu]
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
mkdir -p build
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/conda-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Continuous Integration with conda dependencies

on:
push:
pull_request:
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:
build:
name: '[${{ matrix.os }}@${{ matrix.build_type }}@conda]'
runs-on: ${{ matrix.os }}
strategy:
matrix:
build_type: [Release]
os: [ubuntu-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
mamba-version: "*"
channels: conda-forge,robotology
channel-priority: true

- name: Dependencies
shell: bash -l {0}
run: |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
conda config --remove channels defaults
# Compilation related dependencies
mamba install cmake compilers make ninja pkg-config
# Actual dependencies
mamba install mesa mesalib qt boost-cpp ycm-cmake-modules
- name: Configure [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
mkdir -p build
cd build
cmake -GNinja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
# - name: Configure [Windows]
# if: contains(matrix.os, 'windows')
# shell: bash -l {0}
# run: |
# mkdir -p build
# cd build
# cmake -G"Visual Studio 16 2019" \
# -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..

- name: Build and install
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }} --target install

0 comments on commit cf1700e

Please sign in to comment.