Skip to content

Commit

Permalink
Migrate CI to setup-micromamba (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Aug 18, 2023
1 parent e0aba43 commit a30a6fc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 25 deletions.
46 changes: 21 additions & 25 deletions .github/workflows/conda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,40 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
- uses: mamba-org/setup-micromamba@v1
with:
mamba-version: "*"
channels: conda-forge,robotology
channel-priority: true
environment-file: ci_env.yml

- name: Dependencies
shell: bash -l {0}
run: |
# Compilation related dependencies
mamba install cmake compilers ninja pkg-config
# Actual dependencies
mamba install eigen blockfactory idyntree osqp-eigen qpoases yarp
- name: Configure VS Toolchain (Windows)
if: contains(matrix.os, 'windows')
uses: ilammy/[email protected]

- name: Configure [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
- name: Setup compilation env variables (Windows)
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
mkdir -p build
cd build
cmake -GNinja -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
- name: Configure [Windows]
if: contains(matrix.os, 'windows')
bash_vc_install=${VCToolsInstallDir//\\//}
compiler_path=${bash_vc_install}bin/Hostx64/x64/cl.exe
echo "CC=${compiler_path}" >> $GITHUB_ENV
echo "CXX=${compiler_path}" >> $GITHUB_ENV
- name: Configure
shell: bash -l {0}
run: |
mkdir -p build
cd build
cmake -G"Visual Studio 16 2019" -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install -DBUILD_TESTING:BOOL=ON ..
- name: Build
- name: Build
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }}
cmake --build . --config ${{ matrix.build_type }}
- name: Test
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
ctest --output-on-failure -C ${{ matrix.build_type }}
ctest --repeat until-pass:5 --output-on-failure -C ${{ matrix.build_type }} .
16 changes: 16 additions & 0 deletions ci_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: wbtoolboxdev
channels:
- conda-forge
- robotology
dependencies:
- cmake
- compilers
- make
- ninja
- pkg-config
- eigen
- blockfactory
- idyntree
- osqp-eigen
- qpoases
- yarp

0 comments on commit a30a6fc

Please sign in to comment.