diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index a20f315..abcbeb9 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -25,6 +25,9 @@ jobs: - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 8032e96..f3ff063 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -20,6 +20,9 @@ jobs: # TODO: Fast finish on azure pipelines? - script: | export CI=azure + export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt) + export remote_url=$(Build.Repository.Uri) + export sha=$(Build.SourceVersion) export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 82c5318..d609fcd 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -42,6 +42,9 @@ jobs: PYTHONUNBUFFERED: 1 CONFIG: $(CONFIG) CI: azure + flow_run_id: azure_$(Build.BuildNumber).$(System.JobAttempt) + remote_url: $(Build.Repository.Uri) + sha: $(Build.SourceVersion) UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index bd08bca..17dc5dc 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -24,6 +24,8 @@ pin_run_as_build: python: min_pin: x.x max_pin: x.x +pugixml: +- '1.13' pybind11_abi: - '4' python: diff --git a/.ci_support/migrations/libopencv481.yaml b/.ci_support/migrations/libopencv481.yaml deleted file mode 100644 index c3ae24d..0000000 --- a/.ci_support/migrations/libopencv481.yaml +++ /dev/null @@ -1,7 +0,0 @@ -__migrator: - build_number: 1 - kind: version - migration_number: 1 -libopencv: -- 4.8.1 -migrator_ts: 1695868924.8858316 diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 990df76..51d694d 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '15' +- '16' channel_sources: - conda-forge channel_targets: @@ -11,7 +11,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '15' +- '16' fmt: - '10' libopencv: @@ -24,6 +24,8 @@ pin_run_as_build: python: min_pin: x.x max_pin: x.x +pugixml: +- '1.13' pybind11_abi: - '4' python: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 6c05207..01a6c32 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '15' +- '16' channel_sources: - conda-forge channel_targets: @@ -11,7 +11,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '15' +- '16' fmt: - '10' libopencv: @@ -24,6 +24,8 @@ pin_run_as_build: python: min_pin: x.x max_pin: x.x +pugixml: +- '1.13' pybind11_abi: - '4' python: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 41ac63a..6d8bd5d 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -16,6 +16,8 @@ pin_run_as_build: python: min_pin: x.x max_pin: x.x +pugixml: +- '1.13' pybind11_abi: - '4' python: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index c66b17b..a1fce15 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,13 +28,15 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup + pip mamba conda-build conda-forge-ci-setup=4 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -63,6 +65,12 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" fi +if [[ "${sha:-}" == "" ]]; then + pushd ${FEEDSTOCK_ROOT} + sha=$(git rev-parse HEAD) + popd +fi + if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" @@ -74,9 +82,10 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ + --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 9236239..b70ef01 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -91,6 +91,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index cd9a88f..46ab346 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -22,11 +22,13 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup=3 + pip mamba conda-build conda-forge-ci-setup=4 mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ - pip mamba conda-build boa conda-forge-ci-setup + pip mamba conda-build conda-forge-ci-setup=4 @@ -45,6 +47,10 @@ else echo -e "\n\nNot mangling homebrew as we are not running in CI" fi +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup @@ -75,9 +81,10 @@ else EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi - conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + conda build ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ + --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 07d3445..5b2b849 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -17,10 +17,14 @@ call :start_group "Configuring conda" :: Activate the base conda environment call activate base +:: Configure the solver +set "CONDA_SOLVER=libmamba" +if !errorlevel! neq 0 exit /b !errorlevel! +set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" :: Provision the necessary dependencies to build the recipe later echo Installing dependencies -mamba.exe install "python=3.10" pip mamba conda-build boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes +mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 -c conda-forge --strict-channel-priority --yes if !errorlevel! neq 0 exit /b !errorlevel! :: Set basic configuration @@ -41,11 +45,15 @@ if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" ) +if NOT [%flow_run_id%] == [] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" +) + call :end_group :: Build the recipe echo Building recipe -conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% if !errorlevel! neq 0 exit /b !errorlevel! :: Prepare some environment variables for the upload step diff --git a/recipe/757.patch b/recipe/757.patch new file mode 100644 index 0000000..49fb938 --- /dev/null +++ b/recipe/757.patch @@ -0,0 +1,22 @@ +From 485099e7374939eeed52e819550460b5cde3002c Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Fri, 10 Nov 2023 09:25:10 +0100 +Subject: [PATCH] Add missing include(FetchContent) in + bindings/python/RobotInterface/CMakeLists.txt + +--- + bindings/python/RobotInterface/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/bindings/python/RobotInterface/CMakeLists.txt b/bindings/python/RobotInterface/CMakeLists.txt +index aa33fc9e27..31512841b7 100644 +--- a/bindings/python/RobotInterface/CMakeLists.txt ++++ b/bindings/python/RobotInterface/CMakeLists.txt +@@ -27,6 +27,7 @@ if(TARGET BipedalLocomotion::RobotInterface + # https://github.com/pybind/pybind11/commit/74a767d42921001fc4569ecee3b8726383c42ad4 + # https://github.com/pybind/pybind11/pull/2864 + if (${pybind11_VERSION} VERSION_GREATER_EQUAL "2.7.0") ++ include(FetchContent) + FetchContent_Declare( + cvnp + GIT_REPOSITORY https://github.com/pthom/cvnp diff --git a/recipe/bld_cxx.bat b/recipe/bld_cxx.bat index 188e2ec..5042273 100644 --- a/recipe/bld_cxx.bat +++ b/recipe/bld_cxx.bat @@ -16,6 +16,7 @@ cmake -G "Ninja" ^ -DFRAMEWORK_USE_LieGroupControllers:BOOL=ON ^ -DFRAMEWORK_USE_UnicyclePlanner:BOOL=ON ^ -DFRAMEWORK_USE_tomlplusplus:BOOL=ON ^ + -DFRAMEWORK_USE_PCL:BOOL=ON ^ -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=OFF ^ %SRC_DIR% if errorlevel 1 exit 1 diff --git a/recipe/build_cxx.sh b/recipe/build_cxx.sh index f826acf..a7dcf0d 100755 --- a/recipe/build_cxx.sh +++ b/recipe/build_cxx.sh @@ -28,6 +28,7 @@ cmake ${CMAKE_ARGS} -GNinja .. \ -DFRAMEWORK_USE_LieGroupControllers:BOOL=ON \ -DFRAMEWORK_USE_UnicyclePlanner:BOOL=ON \ -DFRAMEWORK_USE_tomlplusplus:BOOL=ON \ + -DFRAMEWORK_USE_PCL:BOOL=ON \ -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=OFF cat CMakeCache.txt diff --git a/recipe/meta.yaml b/recipe/meta.yaml index efb1ef5..f59a881 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,9 +10,11 @@ package: source: url: https://github.com/ami-iit/bipedal-locomotion-framework/archive/refs/tags/v{{ version }}.tar.gz sha256: 129cc8f7f2d9baf144cb39d1b0927c46808387d38a4f5848a20f29507b98c9cf + patches: + - 757.patch build: - number: 1 + number: 2 outputs: - name: {{ namecxx }} @@ -55,8 +57,7 @@ outputs: - casadi - qhull - libopencv - # Workaround for https://github.com/conda-forge/bipedal-locomotion-framework-feedstock/pull/21#issuecomment-1460345952 - # - pcl >1.12 + - pcl >1.12 - liblie-group-controllers - libunicycle-footstep-planner - librealsense # [not win] @@ -118,6 +119,11 @@ outputs: - spdlog # Workaround for https://github.com/conda-forge/bipedal-locomotion-framework-feedstock/issues/37 - libmatio-cpp + # Workaround for https://github.com/conda-forge/bipedal-locomotion-framework-feedstock/pull/42#issuecomment-1804057782 + - casadi + - libboost + - pugixml + - pcl >1.12 - xorg-libxfixes # [linux] - icub-models # Requested just for tests - scipy # Requested just for tests