From 3b6e271cab7af1f335640b7b38bdbab05f6aa132 Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot <36490558+regro-cf-autotick-bot@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:51:41 +0000 Subject: [PATCH 1/6] migration: OSXArm --- conda-forge.yml | 9 ++++++--- recipe/meta.yaml | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/conda-forge.yml b/conda-forge.yml index 993de48..abb5b1f 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,6 +1,9 @@ +build_platform: + osx_arm64: osx_64 +conda_build: + pkg_format: '2' +conda_forge_output_validation: true github: branch_name: main tooling_branch_name: main -conda_forge_output_validation: true -conda_build: - pkg_format: '2' +test: native_and_emulated diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a826214..3f0e471 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -25,6 +25,9 @@ outputs: - {{ pin_subpackage(namecxx, max_pin='x.x.x') }} requirements: build: + - python # [build_platform != target_platform] + - cross-python_{{ target_platform }} # [build_platform != target_platform] + - pybind11 # [build_platform != target_platform] - {{ compiler('c') }} - {{ compiler('cxx') }} - cmake From 82a0db45406139c7ad1128a71d30c5e9a0423e16 Mon Sep 17 00:00:00 2001 From: regro-cf-autotick-bot <36490558+regro-cf-autotick-bot@users.noreply.github.com> Date: Wed, 5 Jul 2023 08:52:02 +0000 Subject: [PATCH 2/6] MNT: Re-rendered with conda-build 3.25.0, conda-smithy 3.23.1, and conda-forge-pinning 2023.07.05.03.37.54 --- .azure-pipelines/azure-pipelines-osx.yml | 3 ++ .ci_support/osx_arm64_.yaml | 40 ++++++++++++++++++++++++ .scripts/build_steps.sh | 3 ++ .scripts/run_osx_build.sh | 4 +++ README.md | 7 +++++ 5 files changed, 57 insertions(+) create mode 100644 .ci_support/osx_arm64_.yaml diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 9e4e167..8032e96 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -11,6 +11,9 @@ jobs: osx_64_: CONFIG: osx_64_ UPLOAD_PACKAGES: 'True' + osx_arm64_: + CONFIG: osx_arm64_ + UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 steps: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml new file mode 100644 index 0000000..1394298 --- /dev/null +++ b/.ci_support/osx_arm64_.yaml @@ -0,0 +1,40 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +c_compiler: +- clang +c_compiler_version: +- '15' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '15' +fmt: +- '9' +libopencv: +- 4.7.0 +libosqp: +- 0.6.3 +macos_machine: +- arm64-apple-darwin20.0.0 +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +pybind11_abi: +- '4' +python: +- 3.10.* *_cpython +- 3.11.* *_cpython +- 3.8.* *_cpython +- 3.9.* *_cpython +spdlog: +- '1.11' +target_platform: +- osx-arm64 +zip_keys: +- - c_compiler_version + - cxx_compiler_version diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index bdf1740..7454806 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -53,6 +53,9 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi ( endgroup "Configuring conda" ) 2> /dev/null diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index f169576..bb00584 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -55,6 +55,10 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +fi + if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" diff --git a/README.md b/README.md index a7031cf..ddb0a2e 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,13 @@ Current build status variant + + osx_arm64 + + + variant + + win_64 From 460f38583f2386691bca41dade7d50ff64068957 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 6 Jul 2023 09:29:32 +0200 Subject: [PATCH 3/6] Update meta.yaml --- recipe/meta.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3f0e471..1171a5b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -25,9 +25,6 @@ outputs: - {{ pin_subpackage(namecxx, max_pin='x.x.x') }} requirements: build: - - python # [build_platform != target_platform] - - cross-python_{{ target_platform }} # [build_platform != target_platform] - - pybind11 # [build_platform != target_platform] - {{ compiler('c') }} - {{ compiler('cxx') }} - cmake @@ -39,6 +36,8 @@ outputs: - {{ cdt('libxdamage') }} # [linux] - {{ cdt('libxxf86vm') }} # [linux] - {{ cdt('libxext') }} # [linux] + # YARP idl tools are used in this recipe + - yarp-cxx # [build_platform != target_platform] host: - eigen - idyntree From 24196155a3115748fb501cadd54b05b0d0d81c0f Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 6 Jul 2023 09:33:14 +0200 Subject: [PATCH 4/6] Add cross-compilation related options for using yarpidl --- recipe/build_cxx.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/build_cxx.sh b/recipe/build_cxx.sh index 658f18f..d90661a 100755 --- a/recipe/build_cxx.sh +++ b/recipe/build_cxx.sh @@ -5,6 +5,10 @@ if [[ "${target_platform}" == osx-* ]]; then CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY" fi +if [[ "${CONDA_BUILD_CROSS_COMPILATION}" == "1" ]]; then + export CMAKE_ARGS="${CMAKE_ARGS} -DYARPIDL_thrift_LOCATION=$BUILD_PREFIX/bin/yarpidl_thrift -DYARPIDL_rosmsg_LOCATION=$BUILD_PREFIX/bin/yarpidl_rosmsg" +fi + rm -rf build mkdir -p build From 2444d462ffcfe3ac4925be515713cf1ebbdb1e2a Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 6 Jul 2023 21:52:05 +0200 Subject: [PATCH 5/6] Update build_cxx.sh --- recipe/build_cxx.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipe/build_cxx.sh b/recipe/build_cxx.sh index d90661a..f826acf 100755 --- a/recipe/build_cxx.sh +++ b/recipe/build_cxx.sh @@ -35,5 +35,7 @@ cat CMakeCache.txt cmake --build . --config Release cmake --build . --config Release --target install -# QPInverseKinematicsUnitTests excluded as a workaround for https://github.com/conda-forge/bipedal-locomotion-framework-feedstock/issues/29 -ctest --output-on-failure -E QPInverseKinematicsUnitTests -C Release +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR:-}" != "" ]]; then + # QPInverseKinematicsUnitTests excluded as a workaround for https://github.com/conda-forge/bipedal-locomotion-framework-feedstock/issues/29 + ctest --output-on-failure -E QPInverseKinematicsUnitTests -C Release +fi From b5c02d9e756df1545a342cd3abf11fafeaea46fe Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Thu, 6 Jul 2023 21:52:36 +0200 Subject: [PATCH 6/6] Update build_py.sh --- recipe/build_py.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/recipe/build_py.sh b/recipe/build_py.sh index 2439526..592509f 100644 --- a/recipe/build_py.sh +++ b/recipe/build_py.sh @@ -22,7 +22,9 @@ cmake ${CMAKE_ARGS} -GNinja .. \ ninja -v cmake --build . --config Release --target install -# Tests are not installed, so we run them during the build -# We run them directly via pytest so we detect if we are not compiling some required components -cd .. -pytest -v -k "not (test_load_from_file or test_fixed_foot_detector)" +if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR:-}" != "" ]]; then + # Tests are not installed, so we run them during the build + # We run them directly via pytest so we detect if we are not compiling some required components + cd .. + pytest -v -k "not (test_load_from_file or test_fixed_foot_detector)" +fi