diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index adce9a5..f04e699 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -5,7 +5,7 @@ jobs: - job: linux pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-latest strategy: matrix: linux_64_: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 522eabc..71a0686 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -10,9 +10,10 @@ export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh -endgroup "Start Docker" +( endgroup "Start Docker" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null -startgroup "Configuring conda" export PYTHONUNBUFFERED=1 export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" @@ -36,34 +37,38 @@ source run_conda_forge_build_setup # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" -endgroup "Configuring conda" + +( endgroup "Configuring conda" ) 2> /dev/null if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then - startgroup "Running conda debug" if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" fi conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" - endgroup "Running conda debug" + # Drop into an interactive shell /bin/bash else - startgroup "Running conda $BUILD_CMD" conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" - endgroup "Running conda build" - startgroup "Validating outputs" + ( startgroup "Validating outputs" ) 2> /dev/null + validate_recipe_outputs "${FEEDSTOCK_NAME}" - endgroup "Validating outputs" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" - endgroup "Uploading packages" fi + + ( endgroup "Uploading packages" ) 2> /dev/null fi +( startgroup "Final checks" ) 2> /dev/null + touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index a53ef3f..57bc95c 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -13,18 +13,23 @@ function startgroup { travis ) echo "$1" echo -en 'travis_fold:start:'"${1// /}"'\\r';; + github_actions ) + echo "::group::$1";; * ) echo "$1";; esac -} +} 2> /dev/null function endgroup { # End a foldable group of log lines # Pass a single argument, quoted + case ${CI:-} in azure ) echo "##[endgroup]";; travis ) echo -en 'travis_fold:end:'"${1// /}"'\\r';; + github_actions ) + echo "::endgroup::";; esac -} +} 2> /dev/null diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 16d6c15..244ccd1 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -7,7 +7,7 @@ source .scripts/logging_utils.sh -startgroup "Configure Docker" +( startgroup "Configure Docker" ) 2> /dev/null set -xeo pipefail @@ -52,11 +52,11 @@ if [ -z "${DOCKER_IMAGE}" ]; then echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Trying to parse with coreutils" DOCKER_IMAGE=$(cat .ci_support/${CONFIG}.yaml | grep '^docker_image:$' -A 1 | tail -n 1 | cut -b 3-) if [ "${DOCKER_IMAGE}" = "" ]; then - echo "No docker_image entry found in ${CONFIG}. Falling back to condaforge/linux-anvil-comp7" - DOCKER_IMAGE="condaforge/linux-anvil-comp7" + echo "No docker_image entry found in ${CONFIG}. Falling back to quay.io/condaforge/linux-anvil-comp7" + DOCKER_IMAGE="quay.io/condaforge/linux-anvil-comp7" fi else - DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 quay.io/condaforge/linux-anvil-comp7 )" fi fi @@ -69,9 +69,11 @@ DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" if [ -z "${CI}" ]; then DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi -endgroup "Configure Docker" -startgroup "Start Docker" +( endgroup "Configure Docker" ) 2> /dev/null + +( startgroup "Start Docker" ) 2> /dev/null + export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ @@ -94,4 +96,7 @@ docker run ${DOCKER_RUN_ARGS} \ /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh # verify that the end of the script was reached -test -f "$DONE_CANARY" \ No newline at end of file +test -f "$DONE_CANARY" + +# This closes the last group opened in `build_steps.sh` +( endgroup "Final checks" ) 2> /dev/null \ No newline at end of file diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 614ca84..96d0278 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -2,19 +2,24 @@ source .scripts/logging_utils.sh -set -x +set -xe + +MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} + +( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null -startgroup "Installing a fresh version of Miniforge" MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -bash $MINIFORGE_FILE -b -endgroup "Installing a fresh version of Miniforge" +bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} + +( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null + +( startgroup "Configuring conda" ) 2> /dev/null -startgroup "Configuring conda" BUILD_CMD=build -source ${HOME}/miniforge3/etc/profile.d/conda.sh +source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." @@ -24,32 +29,41 @@ conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip ${G echo -e "\n\nSetting up the condarc and mangling the compiler." setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml -mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml -echo -e "\n\nMangling homebrew in the CI to avoid conflicts." -/usr/bin/sudo mangle_homebrew -/usr/bin/sudo -k +if [[ "${CI:-}" != "" ]]; then + mangle_compiler ./ ./recipe .ci_support/${CONFIG}.yaml +fi + +if [[ "${CI:-}" != "" ]]; then + echo -e "\n\nMangling homebrew in the CI to avoid conflicts." + /usr/bin/sudo mangle_homebrew + /usr/bin/sudo -k +else + echo -e "\n\nNot mangling homebrew as we are not running in CI" +fi echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup -endgroup "Configuring conda" -set -e +( endgroup "Configuring conda" ) 2> /dev/null + -startgroup "Running conda $BUILD_CMD" echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml conda $BUILD_CMD ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} -endgroup "Running conda build" -startgroup "Validating outputs" +( startgroup "Validating outputs" ) 2> /dev/null + validate_recipe_outputs "${FEEDSTOCK_NAME}" -endgroup "Validating outputs" + +( endgroup "Validating outputs" ) 2> /dev/null + +( startgroup "Uploading packages" ) 2> /dev/null if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - startgroup "Uploading packages" upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml - endgroup "Uploading packages" -fi \ No newline at end of file +fi + +( endgroup "Uploading packages" ) 2> /dev/null \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6a7591a..ecb962d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ matrix: - env: CONFIG=linux_ppc64le_ UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=quay.io/condaforge/linux-anvil-ppc64le os: linux arch: ppc64le + dist: focal script: - export CI=travis diff --git a/README.md b/README.md index 580d349..896699f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -About libignition-physics3 +About libignition-physics4 ========================== Home: https://github.com/ignitionrobotics/ign-physics @@ -90,27 +90,28 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | -| [![Conda Recipe](https://img.shields.io/badge/recipe-libignition--physics3-green.svg)](https://anaconda.org/conda-forge/libignition-physics3) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libignition-physics3.svg)](https://anaconda.org/conda-forge/libignition-physics3) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libignition-physics3.svg)](https://anaconda.org/conda-forge/libignition-physics3) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libignition-physics3.svg)](https://anaconda.org/conda-forge/libignition-physics3) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-libignition--physics4-green.svg)](https://anaconda.org/conda-forge/libignition-physics4) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libignition-physics4.svg)](https://anaconda.org/conda-forge/libignition-physics4) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libignition-physics4.svg)](https://anaconda.org/conda-forge/libignition-physics4) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libignition-physics4.svg)](https://anaconda.org/conda-forge/libignition-physics4) | -Installing libignition-physics3 +Installing libignition-physics4 =============================== -Installing `libignition-physics3` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: +Installing `libignition-physics4` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: ``` conda config --add channels conda-forge +conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `libignition-physics3` can be installed with: +Once the `conda-forge` channel has been enabled, `libignition-physics4` can be installed with: ``` -conda install libignition-physics3 +conda install libignition-physics4 ``` -It is possible to list all of the versions of `libignition-physics3` available on your platform with: +It is possible to list all of the versions of `libignition-physics4` available on your platform with: ``` -conda search libignition-physics3 --channel conda-forge +conda search libignition-physics4 --channel conda-forge ``` @@ -152,17 +153,17 @@ Terminology produce the finished article (built conda distributions) -Updating libignition-physics3-feedstock +Updating libignition-physics4-feedstock ======================================= -If you would like to improve the libignition-physics3 recipe or build a new +If you would like to improve the libignition-physics4 recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the `conda-forge` channel, whereupon the built conda packages will be available for everybody to install and use from the `conda-forge` channel. -Note that all branches in the conda-forge/libignition-physics3-feedstock are +Note that all branches in the conda-forge/libignition-physics4-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions. diff --git a/build-locally.py b/build-locally.py index 3453cfe..00eeb34 100755 --- a/build-locally.py +++ b/build-locally.py @@ -7,6 +7,7 @@ import glob import subprocess from argparse import ArgumentParser +import platform def setup_environment(ns): @@ -16,6 +17,10 @@ def setup_environment(ns): os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" if ns.output_id: os.environ["BUILD_OUTPUT_ID"] = ns.output_id + if "MINIFORGE_HOME" not in os.environ: + os.environ["MINIFORGE_HOME"] = os.path.join( + os.path.dirname(__file__), "miniforge3" + ) def run_docker_build(ns): @@ -23,6 +28,11 @@ def run_docker_build(ns): subprocess.check_call([script]) +def run_osx_build(ns): + script = ".scripts/run_osx_build.sh" + subprocess.check_call([script]) + + def verify_config(ns): valid_configs = { os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") @@ -46,10 +56,16 @@ def verify_config(ns): else: raise ValueError("config " + ns.config + " is not valid") # Remove the following, as implemented - if not ns.config.startswith("linux"): + if ns.config.startswith("win"): raise ValueError( - f"only Linux configs currently supported, got {ns.config}" + f"only Linux/macOS configs currently supported, got {ns.config}" ) + elif ns.config.startswith("osx") and platform.system() == "Darwin": + if "OSX_SDK_DIR" not in os.environ: + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=/opt'" + "to download the SDK automatically to '/opt/MacOSX.sdk'" + ) def main(args=None): @@ -68,7 +84,12 @@ def main(args=None): verify_config(ns) setup_environment(ns) - run_docker_build(ns) + if ns.config.startswith("linux") or ( + ns.config.startswith("osx") and platform.system() == "Linux" + ): + run_docker_build(ns) + elif ns.config.startswith("osx"): + run_osx_build(ns) if __name__ == "__main__": diff --git a/conda-forge.yml b/conda-forge.yml index 2cc975e..4d27745 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,6 +1,9 @@ -azure: - settings_win: - pool: - vmImage: windows-2019 conda_forge_output_validation: true provider: {linux_aarch64: default, linux_ppc64le: default} +bot: + abi_migration_branches: + - "v3" +azure: + settings_win: + pool: + vmImage: windows-2019 diff --git a/recipe/148.patch b/recipe/148.patch deleted file mode 100644 index 13b3dfb..0000000 --- a/recipe/148.patch +++ /dev/null @@ -1,152 +0,0 @@ -From 5c97660320a8a365c82d62279b76b8f5682c5258 Mon Sep 17 00:00:00 2001 -From: Steve Peters -Date: Wed, 7 Oct 2020 12:25:25 -0700 -Subject: [PATCH 1/2] dartsim-plugin windows build fixes - -* Build dartsim and test plugins with /permissive- with MSVC - due to https://github.com/dartsim/dart/issues/753 - -* Disable C4250 compiler warnings. - -* Create unversioned dartsim plugin by copy rather than - symlink, since symlinks require extra permissions on - Windows. This copies the TPE approach. - -Signed-off-by: Steve Peters ---- - dartsim/CMakeLists.txt | 16 ++++++++++++---- - test/plugins/CMakeLists.txt | 6 ++++++ - tpe/plugin/CMakeLists.txt | 2 +- - 3 files changed, 19 insertions(+), 5 deletions(-) - -diff --git a/dartsim/CMakeLists.txt b/dartsim/CMakeLists.txt -index 22bad22a..ca8a11cf 100644 ---- a/dartsim/CMakeLists.txt -+++ b/dartsim/CMakeLists.txt -@@ -7,6 +7,10 @@ ign_add_component(dartsim INTERFACE - - target_link_libraries(${features} INTERFACE ${DART_LIBRARIES}) - target_include_directories(${features} SYSTEM INTERFACE ${DART_INCLUDE_DIRS}) -+if (MSVC) -+ # needed by DART, see https://github.com/dartsim/dart/issues/753 -+ target_compile_options(${features} INTERFACE "/permissive-") -+endif() - - install( - DIRECTORY include/ -@@ -42,11 +46,15 @@ install(TARGETS ${dartsim_plugin} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_ - set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${dartsim_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX}) - if (WIN32) -- # create_symlink requires cmake 3.13 on windows -- cmake_minimum_required(VERSION 3.13 FATAL_ERROR) -+ # disable MSVC inherit via dominance warning -+ target_compile_options(${dartsim_plugin} PUBLIC "/wd4250") -+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy -+ ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned} -+ ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${unversioned})") -+else() -+ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) -+ INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}) - endif() --EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) --INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}) - - # Testing - ign_build_tests( -diff --git a/test/plugins/CMakeLists.txt b/test/plugins/CMakeLists.txt -index fa1a58a6..2358746d 100644 ---- a/test/plugins/CMakeLists.txt -+++ b/test/plugins/CMakeLists.txt -@@ -24,4 +24,10 @@ if (DART_FOUND) - target_link_libraries(MockDoublePendulum PUBLIC ${DART_LIBRARIES}) - target_compile_definitions(MockDoublePendulum PRIVATE - "IGNITION_PHYSICS_RESOURCE_DIR=\"${IGNITION_PHYSICS_RESOURCE_DIR}\"") -+ if (MSVC) -+ # needed by DART, see https://github.com/dartsim/dart/issues/753 -+ target_compile_options(MockDoublePendulum PUBLIC "/permissive-") -+ # disable MSVC inherit via dominance warning -+ target_compile_options(MockDoublePendulum PUBLIC "/wd4250") -+ endif() - endif() -diff --git a/tpe/plugin/CMakeLists.txt b/tpe/plugin/CMakeLists.txt -index 9aebeb84..b4bdf790 100644 ---- a/tpe/plugin/CMakeLists.txt -+++ b/tpe/plugin/CMakeLists.txt -@@ -43,7 +43,7 @@ if (WIN32) - # disable MSVC inherit via dominance warning - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250") - INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy -- ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned} -+ ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned} - ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${unversioned})") - else() - EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned}) - -From 7482167d1d21d549a08ec0ab0ef1dc0a13dd9508 Mon Sep 17 00:00:00 2001 -From: Steve Peters -Date: Thu, 15 Oct 2020 16:52:46 -0700 -Subject: [PATCH 2/2] check_test_ran.py: windows compatibility - -Signed-off-by: Steve Peters ---- - tools/check_test_ran.py | 32 -------------------------------- - 1 file changed, 32 deletions(-) - -diff --git a/tools/check_test_ran.py b/tools/check_test_ran.py -index a6d87e6c..48169343 100755 ---- a/tools/check_test_ran.py -+++ b/tools/check_test_ran.py -@@ -44,7 +44,6 @@ - - import os - import sys --import subprocess - - def usage(): - print("""Usage: -@@ -53,29 +52,6 @@ def usage(): - print(sys.argv) - sys.exit(getattr(os, 'EX_USAGE', 1)) - --def run_grep(filename, arg): -- process = subprocess.Popen(['grep', arg, filename], stdout=subprocess.PIPE) -- stdout, stderr = process.communicate() -- return stdout, stderr -- --def run_xsltproc(stylesheet, document): -- try: -- process = subprocess.Popen(['xsltproc', stylesheet, document], stdout=subprocess.PIPE) -- stdout, stderr = process.communicate() -- # Overwrite same document -- open(document, 'w').write(stdout) -- except OSError as err: -- test_name = os.path.basename(document) -- f = open(document, 'w') -- d = {'test': test_name, 'test_file': document, 'test_no_xml': test_name.replace('.xml', '')} -- f.write(""" -- -- -- -- --"""%d) -- sys.exit(getattr(os, 'EX_USAGE', 1)) -- - def check_main(): - if len(sys.argv) < 2: - usage() -@@ -98,14 +74,6 @@ def check_main(): - - - """%d) -- sys.exit(getattr(os, 'EX_USAGE', 1)) -- -- # Checking if test is a QTest file -- stdout, stderr = run_grep(test_file, "QtVersion") -- if (stdout): -- print("Detect QTest xml file. Converting to JUNIT ...") -- stylesheet = os.path.dirname(os.path.abspath(__file__)) + "/qtest_to_junit.xslt" -- run_xsltproc(stylesheet, test_file) - - if __name__ == '__main__': - check_main() diff --git a/recipe/249.patch b/recipe/249.patch new file mode 100644 index 0000000..427cd8b --- /dev/null +++ b/recipe/249.patch @@ -0,0 +1,50 @@ +From 13ba0fd7f38441cb25fbb93bf91534410cc80277 Mon Sep 17 00:00:00 2001 +From: Steve Peters +Date: Thu, 22 Apr 2021 15:59:08 -0700 +Subject: [PATCH] Use [gs]etPrimarySlipCompliance with dart 6.10.0 + +These APIs are used in the upstream release of dartsim 6.10.0 +but are missing from our fork. We should add them to the fork and +build more debs before merging this. + +Signed-off-by: Steve Peters +--- + dartsim/src/SDFFeatures.cc | 2 +- + dartsim/src/ShapeFeatures.cc | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/dartsim/src/SDFFeatures.cc b/dartsim/src/SDFFeatures.cc +index 8baff95a..3dc16fc4 100644 +--- a/dartsim/src/SDFFeatures.cc ++++ b/dartsim/src/SDFFeatures.cc +@@ -818,7 +818,7 @@ Identity SDFFeatures::ConstructSdfCollision( + } + if (odeFriction->HasElement("slip1")) + { +- aspect->setSlipCompliance(odeFriction->Get("slip1")); ++ aspect->setPrimarySlipCompliance(odeFriction->Get("slip1")); + } + if (odeFriction->HasElement("slip2")) + { +diff --git a/dartsim/src/ShapeFeatures.cc b/dartsim/src/ShapeFeatures.cc +index c5126414..4cec3feb 100644 +--- a/dartsim/src/ShapeFeatures.cc ++++ b/dartsim/src/ShapeFeatures.cc +@@ -469,7 +469,7 @@ double ShapeFeatures::GetShapeFrictionPyramidPrimarySlipCompliance( + << std::endl; + return 0.0; + } +- return aspect->getSlipCompliance(); ++ return aspect->getPrimarySlipCompliance(); + } + + ///////////////////////////////////////////////// +@@ -505,7 +505,7 @@ bool ShapeFeatures::SetShapeFrictionPyramidPrimarySlipCompliance( + << std::endl; + return false; + } +- aspect->setSlipCompliance(_value); ++ aspect->setPrimarySlipCompliance(_value); + return true; + } + diff --git a/recipe/bld.bat b/recipe/bld.bat index 2424437..a452cc5 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -22,5 +22,5 @@ cmake --build . --config Release --target install if errorlevel 1 exit 1 :: Test -ctest --output-on-failure -C Release -E "check_" +ctest --output-on-failure -C Release -E "check_|INTEGRATION_ExamplesBuild_TEST|UNIT_Collisions_TEST|UNIT_EntityManagement_TEST" if errorlevel 1 exit 1 diff --git a/recipe/build.sh b/recipe/build.sh index 11e7c82..a0a6823 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -15,7 +15,8 @@ fi cmake .. \ -G "Ninja" \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX \ + -DCMAKE_PREFIX_PATH=$PREFIX \ + -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True \ -DCMAKE_CXX_STANDARD=17 \ @@ -27,5 +28,6 @@ cmake --build . --config Release --target install ${NUM_PARALLEL} if [ ${target_platform} != "linux-ppc64le" ]; then # Remove test that fail on arm64: https://github.com/ignitionrobotics/ign-physics/issues/70 # Remove test that fail on macOS: https://github.com/conda-forge/libignition-physics-feedstock/issues/13 - ctest --output-on-failure -C Release -E "INTEGRATION_FrameSemantics2d|INTEGRATION_JointTypes2f|UNIT_Collisions_TEST|UNIT_EntityManagement_TEST|UNIT_JointFeatures_TEST|UNIT_LinkFeatures_TEST|UNIT_SDFFeatures_TEST|UNIT_SimulationFeatures_TEST" + # Remove test INTEGRATION_ExamplesBuild_TEST that fails on multiple platforms: https://github.com/conda-forge/libignition-physics-feedstock/pull/14 + ctest --output-on-failure -C Release -E "INTEGRATION_FrameSemantics2d|INTEGRATION_JointTypes2f|UNIT_Collisions_TEST|UNIT_EntityManagement_TEST|UNIT_JointFeatures_TEST|UNIT_LinkFeatures_TEST|UNIT_SDFFeatures_TEST|UNIT_SimulationFeatures_TEST|INTEGRATION_ExamplesBuild_TEST|UNIT_WorldFeatures_TEST|UNIT_ShapeFeatures_TEST" fi diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index ed324e6..750fdb1 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -2,7 +2,6 @@ MACOSX_SDK_VERSION: # [osx and x86_64] - 10.13 # [osx and x86_64] MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] - 10.13 # [osx and x86_64] - c_compiler: # [win] - vs2019 # [win] cxx_compiler: # [win] diff --git a/recipe/disable_fake_install.patch b/recipe/disable_fake_install.patch new file mode 100644 index 0000000..2d9aa4b --- /dev/null +++ b/recipe/disable_fake_install.patch @@ -0,0 +1,60 @@ +--- a/test/CMakeLists.txt 2021-06-14 08:29:09.563903942 +1000 ++++ b/test/CMakeLists.txt 2021-06-14 08:27:09.987901000 +1000 +@@ -26,23 +26,23 @@ + #============================================================================ + # Do a fake install of ign-physics in order to test the examples. + #============================================================================ +-set(FAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/fake/install") ++# set(FAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/fake/install") + +-file(MAKE_DIRECTORY ${FAKE_INSTALL_PREFIX}) ++# file(MAKE_DIRECTORY ${FAKE_INSTALL_PREFIX}) + +-include(ExternalProject) +-ExternalProject_Add( +- FAKE_INSTALL ++# include(ExternalProject) ++# ExternalProject_Add( ++# FAKE_INSTALL + +- SOURCE_DIR "${CMAKE_SOURCE_DIR}" +- EXCLUDE_FROM_ALL 1 +- LOG_CONFIGURE 1 +- LOG_BUILD 1 +- LOG_INSTALL 1 +- CMAKE_ARGS +- "-DBUILD_TESTING=OFF" +- "-DCMAKE_INSTALL_PREFIX=${FAKE_INSTALL_PREFIX}" +-) ++# SOURCE_DIR "${CMAKE_SOURCE_DIR}" ++# EXCLUDE_FROM_ALL 1 ++# LOG_CONFIGURE 1 ++# LOG_BUILD 1 ++# LOG_INSTALL 1 ++# CMAKE_ARGS ++# "-DBUILD_TESTING=OFF" ++# "-DCMAKE_INSTALL_PREFIX=${FAKE_INSTALL_PREFIX}" ++# ) + + add_subdirectory(benchmark) + +--- a/test/integration/CMakeLists.txt 2021-06-14 08:32:06.839908269 +1000 ++++ b/test/integration/CMakeLists.txt 2021-06-14 08:32:31.523908871 +1000 +@@ -38,10 +38,10 @@ + endforeach() + endif() + +-if(TARGET INTEGRATION_ExamplesBuild_TEST) +- add_dependencies(INTEGRATION_ExamplesBuild_TEST FAKE_INSTALL) +- set(_env_vars) +- list(APPEND _env_vars "CMAKE_PREFIX_PATH=${FAKE_INSTALL_PREFIX}:$ENV{CMAKE_PREFIX_PATH}") +- set_tests_properties(INTEGRATION_ExamplesBuild_TEST PROPERTIES +- ENVIRONMENT "${_env_vars}") +-endif() ++# if(TARGET INTEGRATION_ExamplesBuild_TEST) ++# add_dependencies(INTEGRATION_ExamplesBuild_TEST FAKE_INSTALL) ++# set(_env_vars) ++# list(APPEND _env_vars "CMAKE_PREFIX_PATH=${FAKE_INSTALL_PREFIX}:$ENV{CMAKE_PREFIX_PATH}") ++# set_tests_properties(INTEGRATION_ExamplesBuild_TEST PROPERTIES ++# ENVIRONMENT "${_env_vars}") ++# endif() diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 57a7e4d..6a596b3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set base_name = "libignition-physics" %} -{% set version = "3.1.0" %} +{% set version = "4.0.0" %} {% set major_version = version.split('.')[0] %} {% set name = base_name + major_version %} @@ -9,21 +9,22 @@ package: source: - url: https://github.com/ignitionrobotics/ign-physics/archive/ignition-physics{{ major_version }}_{{ version }}.tar.gz - sha256: b8e5460d2808e20237b2ee0a6a6b7613b56412f5f6e2a5e153e48e8faae8ab77 + sha256: b7128f5666a2a7ff60bfb03de7f1d08c194bddf3c8e52c6e3e3d05e6b4421494 patches: - vs2017_support.patch - - 148.patch + - disable_fake_install.patch + - 249.patch build: - number: 4 + number: 0 + skip: false run_exports: - {{ pin_subpackage(name, max_pin='x') }} requirements: build: - - {{ compiler('cxx') }} + - {{ compiler('cxx') }} - {{ compiler('c') }} - - clang # [win] - cmake - ninja - pkg-config @@ -31,14 +32,14 @@ requirements: - libignition-cmake2 - libignition-plugin1 - libignition-math6 - - libignition-common3 - - libsdformat10 + - libignition-common4 + - libignition-utils1 + - libsdformat11 - eigen - dartsim - libode run: - - libignition-math6 - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] test: