From 5607bb54914746b9ad11e229b16d0be836bd2123 Mon Sep 17 00:00:00 2001 From: Lorenzo Rapetti Date: Tue, 24 Oct 2023 11:03:10 +0200 Subject: [PATCH 1/3] Switch CI from miniconda to micromamba --- .github/workflows/ci.yml | 17 ++--------------- ci_env.yml | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 ci_env.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fefa759..3bd2db7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,14 +36,10 @@ jobs: # Clone the repository in $GITHUB_WORKSPACE - uses: actions/checkout@master - - uses: conda-incubator/setup-miniconda@v2 + - uses: mamba-org/setup-micromamba@v1 if: contains(matrix.os, 'windows') with: - mamba-version: "*" - channels: conda-forge,defaults - channel-priority: true - activate-environment: wearables - python-version: 3.8 + environment-file: ci_env.yml # Print the environment variables to simplify development and debugging - name: Environment Variables @@ -142,15 +138,6 @@ jobs: -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps .. cmake --build . --config ${{matrix.build_type}} --target install - - name: Dependencies (using conda) [Windows] - if: steps.cache-source-deps.outputs.cache-hit != 'true' && contains(matrix.os, 'windows') - shell: bash -l {0} - run: | - # Compilation related dependencies - mamba install cmake compilers make ninja pkg-config - # Actual dependencies - mamba install -c robotology yarp idyntree matio-cpp robometry - # =================== # CMAKE-BASED PROJECT # =================== diff --git a/ci_env.yml b/ci_env.yml new file mode 100644 index 0000000..c769552 --- /dev/null +++ b/ci_env.yml @@ -0,0 +1,14 @@ +name: wearables +channels: + - conda-forge + - robotology +dependencies: + - cmake + - compilers + - make + - ninja + - pkg-config + - yarp + - idyntree + - matio-cpp + - robometry From c96ba308dcd3327b78c4b9ecbd41619f846909bc Mon Sep 17 00:00:00 2001 From: Lorenzo Rapetti Date: Tue, 24 Oct 2023 11:22:15 +0200 Subject: [PATCH 2/3] Switch MacOS CI to mamba --- .github/workflows/ci.yml | 24 ++++++------------------ ci_env.yml | 1 + 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bd2db7..d2c9332 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@master - uses: mamba-org/setup-micromamba@v1 - if: contains(matrix.os, 'windows') + if: matrix.os == 'windows-latest' || matrix.os == 'macOS-latest' with: environment-file: ci_env.yml @@ -58,11 +58,6 @@ jobs: # DEPENDENCIES # ============ - - name: Dependencies [macOS] - if: matrix.os == 'macOS-latest' - run: | - brew install ccache eigen ace tinyxml gsl boost libmatio pybind11 - - name: Dependencies [Ubuntu] if: matrix.os == 'ubuntu-latest' run: | @@ -71,18 +66,9 @@ jobs: libboost-thread-dev liborocos-kdl-dev libeigen3-dev swig qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev libqt5charts5-dev \ libxml2-dev liburdfdom-dev libtinyxml-dev liburdfdom-dev liboctave-dev python3-dev python3-pybind11 valgrind libassimp-dev libmatio-dev - - name: Cache Source-based dependencies [Ubuntu/macOS] - if: steps.cache-source-deps.outputs.cache-hit != 'true' && (contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macOS')) - id: cache-source-deps - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/install/deps - # Including ${{ runner.temp }} is a workaround for https://github.com/robotology/whole-body-estimators/issues/60 - key: source-deps-${{runner.os}}-${{runner.temp}}-vcpkg-robotology-${{env.vcpkg_robotology_TAG}}-ycm-${{env.YCM_TAG}}-yarp-${{env.YARP_TAG}}-iDynTree-${{env.iDynTree_TAG}}-matioCpp-${{env.matioCpp_TAG}}-robometry-${{env.robometry_TAG}} - - - name: Source-based Dependencies [Ubuntu/macOS] - if: steps.cache-source-deps.outputs.cache-hit != 'true' && (matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest') + - name: Source-based Dependencies [Ubuntu] + if: steps.cache-source-deps.outputs.cache-hit != 'true' && (matrix.os == 'ubuntu-latest') shell: bash run: | # YCM @@ -151,15 +137,17 @@ jobs: cd build cmake -G"Visual Studio 17 2022" -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \ -DCMAKE_BUILD_TPYE=${{matrix.build_type}} \ + -DWEARABLES_COMPILE_PYTHON_BINDINGS=ON \ -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install .. - name: Configure [Ubuntu/macOS] if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' - shell: bash + shell: bash -l {0} run: | mkdir -p build cd build cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \ + -DCMAKE_BUILD_TPYE=${{matrix.build_type}} \ -DWEARABLES_COMPILE_PYTHON_BINDINGS=ON \ -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install .. diff --git a/ci_env.yml b/ci_env.yml index c769552..5c93de3 100644 --- a/ci_env.yml +++ b/ci_env.yml @@ -8,6 +8,7 @@ dependencies: - make - ninja - pkg-config + - pybind11 - yarp - idyntree - matio-cpp From aa42f52a76b108e3f4bd907c2073bfa76f129189 Mon Sep 17 00:00:00 2001 From: Lorenzo Rapetti Date: Tue, 24 Oct 2023 11:47:13 +0200 Subject: [PATCH 3/3] Remove deprecated fixies in CI --- .github/workflows/ci.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2c9332..5059f28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,14 +13,11 @@ on: - cron: '0 2 * * *' env: - vcpkg_robotology_TAG: v0.10.1 YCM_TAG: v0.15.3 YARP_TAG: v3.8.1 iDynTree_TAG: v9.1.0 matioCpp_TAG: v0.2.2 robometry_TAG: v1.2.1 - # Overwrite the VCPKG_INSTALLATION_ROOT env variable defined by Github Actions to point to our vcpkg - VCPKG_INSTALLATION_ROOT: C:\robotology\vcpkg jobs: build: @@ -43,17 +40,11 @@ jobs: # Print the environment variables to simplify development and debugging - name: Environment Variables - # Use bash in order to have same basic commands in all OSs + if: matrix.os == 'ubuntu-latest' + # Use bash in order to have same basic commands in all OSs shell: bash run: env - # Remove apt repos on Ubuntu 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: matrix.os == 'ubuntu-latest' - run: | - for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done - # ============ # DEPENDENCIES # ============ @@ -156,7 +147,4 @@ jobs: shell: bash run: | cd build - # Attempt of fix for using YARP idl generators (that link ACE) in Windows - # See https://github.com/robotology/idyntree/issues/569 - export PATH=$PATH:${GITHUB_WORKSPACE}/install/bin:${VCPKG_INSTALLATION_ROOT}/install/x64-windows/bin:${VCPKG_INSTALLATION_ROOT}/installed/x64-windows/debug/bin cmake --build . --config ${{matrix.build_type}}