From 071d3d215d97d7d4404536a22a466e459b70d0bc Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 26 Oct 2021 16:54:04 +0200 Subject: [PATCH 1/3] Create 189.patch --- recipe/189.patch | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 recipe/189.patch diff --git a/recipe/189.patch b/recipe/189.patch new file mode 100644 index 0000000..e4c2c2a --- /dev/null +++ b/recipe/189.patch @@ -0,0 +1,34 @@ +From 938b50994488c53dbe8c1a8a032b9e202f79e317 Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Tue, 26 Oct 2021 16:35:39 +0200 +Subject: [PATCH] To not modify CMAKE_FIND_LIBRARY_PREFIXES and + CMAKE_FIND_LIBRARY_SUFFIXES on Windows + +`CMAKE_FIND_LIBRARY_PREFIXES` and `CMAKE_FIND_LIBRARY_SUFFIXES` are variables that are used by +CMake to change the behaviour of the `find_library` call. Changing them to `.lib;.dll` in the CMake config +file of every ignition project affect silently any downstream project that calls `find_package(ignition-)`, +even if transitevely, leading to subtle bugs. + +Signed-off-by: Silvio +--- + cmake/ignition-config.cmake.in | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/cmake/ignition-config.cmake.in b/cmake/ignition-config.cmake.in +index 7bd502f..7d4dc42 100644 +--- a/cmake/ignition-config.cmake.in ++++ b/cmake/ignition-config.cmake.in +@@ -133,12 +133,6 @@ else() + INTERFACE_LINK_LIBRARIES "${ign_all_components};@import_target_name@") + endif() + +-# On windows we produce .dll libraries with no prefix +-if(WIN32) +- set(CMAKE_FIND_LIBRARY_PREFIXES "") +- set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll") +-endif() +- + # Package variables. Note that @PKG_NAME@_LIBRARIES and @PKG_NAME@_CORE_LIBRARY + # contain imported targets, so @PKG_NAME@_INCLUDE_DIRS is never needed. + set(@PKG_NAME@_CORE_LIBRARY @simple_import_name@) + From d664cef4757de4f501d908a0d10d3dc28723a2b2 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 26 Oct 2021 16:54:29 +0200 Subject: [PATCH 2/3] Backport 189 patch --- recipe/meta.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c75e6f3..19b1b4c 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,9 +10,11 @@ package: source: - url: https://github.com/ignitionrobotics/ign-cmake/archive/ignition-cmake{{ major_version }}_{{ version }}.tar.gz sha256: 39f8cd4f0b1f5f4da625354cc75e15796131717e8861b848d06dec0f51039cea + patches: + - 189.patch build: - number: 0 + number: 1 run_exports: - {{ pin_subpackage(name, max_pin='x') }} From dc8bac48d9c05c3ea72df3eae458ac04a45a73d9 Mon Sep 17 00:00:00 2001 From: conda-forge-linter Date: Tue, 26 Oct 2021 14:58:23 +0000 Subject: [PATCH 3/3] MNT: Re-rendered with conda-build 3.21.4, conda-smithy 3.14.1, and conda-forge-pinning 2021.10.25.23.28.29 --- .azure-pipelines/azure-pipelines-linux.yml | 5 +++++ .azure-pipelines/azure-pipelines-osx.yml | 5 +++++ .azure-pipelines/azure-pipelines-win.yml | 6 +++--- .ci_support/linux_64_.yaml | 2 +- .ci_support/linux_ppc64le_.yaml | 2 +- .ci_support/osx_64_.yaml | 2 +- .ci_support/osx_arm64_.yaml | 2 +- .ci_support/win_64_.yaml | 2 +- .drone.yml | 1 + .scripts/build_steps.sh | 9 +++++---- .scripts/run_docker_build.sh | 7 +++++-- .scripts/run_osx_build.sh | 8 +++++--- .travis.yml | 3 ++- build-locally.py | 1 + 14 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index f04e699..8d62612 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -32,6 +32,11 @@ jobs: export CI=azure export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi .scripts/run_docker_build.sh displayName: Run docker build env: diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 39baad3..84d4f42 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -23,6 +23,11 @@ jobs: export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi ./.scripts/run_osx_build.sh displayName: Run OSX build env: diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 117b337..b6ce7ac 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -52,7 +52,7 @@ jobs: - task: CondaEnvironment@1 inputs: - packageSpecs: 'python=3.6 conda-build conda "conda-forge-ci-setup=3" pip' # Optional + packageSpecs: 'python=3.9 conda-build conda "conda-forge-ci-setup=3" pip boa' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment @@ -86,7 +86,7 @@ jobs: - script: | call activate base - conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables + conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables displayName: Build recipe env: PYTHONUNBUFFERED: 1 @@ -107,4 +107,4 @@ jobs: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file + condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 0f6e58e..c08c78a 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -5,7 +5,7 @@ c_compiler_version: cdt_name: - cos6 channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 5053317..e78c812 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -5,7 +5,7 @@ c_compiler_version: cdt_name: - cos7 channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 09baadb..17259e0 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -5,7 +5,7 @@ c_compiler: c_compiler_version: - '11' channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 297af8f..8483dc6 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -5,7 +5,7 @@ c_compiler: c_compiler_version: - '11' channel_sources: -- conda-forge/label/rust_dev,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index feb31b8..d1de257 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,7 +1,7 @@ c_compiler: - vs2017 channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: diff --git a/.drone.yml b/.drone.yml index af15091..f816045 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,6 +25,7 @@ steps: - export CI=drone - export GIT_BRANCH="$DRONE_BRANCH" - export FEEDSTOCK_NAME=$(basename ${DRONE_REPO_NAME}) + - export IS_PR_BUILD=$(if [[ "$${DRONE_PULL_REQUEST:-}" == "" ]]; then echo "False"; else echo "True"; fi) - sed -i '$ichown -R conda:conda "$FEEDSTOCK_ROOT"' /opt/docker/bin/entrypoint - /opt/docker/bin/entrypoint $FEEDSTOCK_ROOT/.scripts/build_steps.sh - echo "Done building" diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 99baf86..9008710 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -25,7 +25,8 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC -BUILD_CMD=build +GET_BOA=boa +BUILD_CMD=mambabuild conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge @@ -37,8 +38,8 @@ 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}" ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" +if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]] && [[ "${HOST_PLATFORM}" != linux-* ]] && [[ "${BUILD_WITH_CONDA_DEBUG:-0}" != 1 ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi @@ -66,7 +67,7 @@ else ( startgroup "Uploading packages" ) 2> /dev/null - if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" fi diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 244ccd1..0c6515f 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -75,12 +75,15 @@ fi ( startgroup "Start Docker" ) 2> /dev/null export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +export IS_PR_BUILD="${IS_PR_BUILD:-False}" +docker pull "${DOCKER_IMAGE}" docker run ${DOCKER_RUN_ARGS} \ -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z,delegated \ -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z,delegated \ -e CONFIG \ -e HOST_USER_ID \ -e UPLOAD_PACKAGES \ + -e IS_PR_BUILD \ -e GIT_BRANCH \ -e UPLOAD_ON_BRANCH \ -e CI \ @@ -91,9 +94,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e BINSTAR_TOKEN \ -e FEEDSTOCK_TOKEN \ -e STAGING_BINSTAR_TOKEN \ - $DOCKER_IMAGE \ + "${DOCKER_IMAGE}" \ bash \ - /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh + "/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh" # verify that the end of the script was reached test -f "$DONE_CANARY" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 708b1e1..3dca437 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -9,15 +9,17 @@ MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} ( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Miniforge3-MacOSX-x86_64.sh" +MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" +rm -rf ${MINIFORGE_HOME} bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} ( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null ( startgroup "Configuring conda" ) 2> /dev/null -BUILD_CMD=build +GET_BOA=boa +BUILD_CMD=mambabuild source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base @@ -66,7 +68,7 @@ validate_recipe_outputs "${FEEDSTOCK_NAME}" ( startgroup "Uploading packages" ) 2> /dev/null -if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then +if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml fi diff --git a/.travis.yml b/.travis.yml index ecb962d..fb73b82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ script: - export CI=travis - export GIT_BRANCH="$TRAVIS_BRANCH" - export FEEDSTOCK_NAME=$(basename ${TRAVIS_REPO_SLUG}) + - if [[ "${TRAVIS_PULL_REQUEST:-}" == "false" ]]; then export IS_PR_BUILD="False"; else export IS_PR_BUILD="True"; fi - - if [[ ${PLATFORM} =~ .*linux.* ]]; then ./.scripts/run_docker_build.sh; fi \ No newline at end of file + - if [[ ${PLATFORM} =~ .*linux.* ]]; then CONDA_FORGE_DOCKER_RUN_ARGS=--network=host ./.scripts/run_docker_build.sh; fi \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index 00eeb34..f3d4f62 100755 --- a/build-locally.py +++ b/build-locally.py @@ -13,6 +13,7 @@ def setup_environment(ns): os.environ["CONFIG"] = ns.config os.environ["UPLOAD_PACKAGES"] = "False" + os.environ["IS_PR_BUILD"] = "True" if ns.debug: os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" if ns.output_id: