diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index adce9a5..974e878 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -5,13 +5,13 @@ jobs: - job: linux pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-latest strategy: matrix: linux_64_: CONFIG: linux_64_ UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 steps: @@ -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 1fd8ea1..88fd9c1 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -5,7 +5,7 @@ jobs: - job: win pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 strategy: matrix: win_64_: @@ -49,10 +49,9 @@ jobs: condition: contains(variables['CONFIG'], 'vs2008') displayName: Patch vs2008 (if needed) - - 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 pip boa conda-forge-ci-setup=3' # Optional installOptions: "-c conda-forge" updateConda: true displayName: Install conda-build and activate environment @@ -86,7 +85,7 @@ jobs: - script: | call activate base - conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml + conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables displayName: Build recipe env: PYTHONUNBUFFERED: 1 @@ -107,4 +106,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/README b/.ci_support/README index e4e2dce..a47316b 100644 --- a/.ci_support/README +++ b/.ci_support/README @@ -1 +1,6 @@ -This file is automatically generated by conda-smithy. To change any matrix elements, you should change conda-smithy's input conda_build_config.yaml and re-render the recipe, rather than editing these files directly. \ No newline at end of file +This file is automatically generated by conda-smithy. If any +particular build configuration is expected, but it is not found, +please make sure all dependencies are satisfiable. To add/modify any +matrix elements, you should create/change conda-smithy's input +recipe/conda_build_config.yaml and re-render the recipe, rather than +editing these files directly. diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 0f6e58e..c58cd1b 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,23 +1,21 @@ c_compiler: - gcc c_compiler_version: -- '9' +- '10' cdt_name: - cos6 channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: - gxx cxx_compiler_version: -- '9' +- '10' docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 target_platform: - linux-64 zip_keys: - - c_compiler_version - cxx_compiler_version -- - cdt_name - - docker_image diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 9763979..09de195 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '9' +- '10' cdt_arch: - aarch64 cdt_name: @@ -15,7 +15,7 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '9' +- '10' docker_image: - quay.io/condaforge/linux-anvil-aarch64 target_platform: diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 5053317..6d449be 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -1,17 +1,17 @@ c_compiler: - gcc c_compiler_version: -- '9' +- '10' cdt_name: - cos7 channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: - gxx cxx_compiler_version: -- '9' +- '10' docker_image: - quay.io/condaforge/linux-anvil-ppc64le target_platform: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 09baadb..b65c9ea 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -3,15 +3,15 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '11' +- '13' channel_sources: -- conda-forge,defaults +- conda-forge channel_targets: - conda-forge main cxx_compiler: - clangxx cxx_compiler_version: -- '11' +- '13' macos_machine: - x86_64-apple-darwin13.4.0 target_platform: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 297af8f..e398c78 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -3,15 +3,15 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '11' +- '13' channel_sources: -- conda-forge/label/rust_dev,conda-forge +- conda-forge channel_targets: - conda-forge main cxx_compiler: - clangxx cxx_compiler_version: -- '11' +- '13' macos_machine: - arm64-apple-darwin20.0.0 target_platform: 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 deleted file mode 100644 index af15091..0000000 --- a/.drone.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -kind: pipeline -name: linux_aarch64_ - -platform: - os: linux - arch: arm64 - -steps: -- name: Install and build - image: quay.io/condaforge/linux-anvil-aarch64 - environment: - CONFIG: linux_aarch64_ - UPLOAD_PACKAGES: True - PLATFORM: linux-aarch64 - BINSTAR_TOKEN: - from_secret: BINSTAR_TOKEN - FEEDSTOCK_TOKEN: - from_secret: FEEDSTOCK_TOKEN - STAGING_BINSTAR_TOKEN: - from_secret: STAGING_BINSTAR_TOKEN - commands: - - export FEEDSTOCK_ROOT="$DRONE_WORKSPACE" - - export RECIPE_ROOT="$FEEDSTOCK_ROOT/recipe" - - export CI=drone - - export GIT_BRANCH="$DRONE_BRANCH" - - export FEEDSTOCK_NAME=$(basename ${DRONE_REPO_NAME}) - - 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/.gitattributes b/.gitattributes index 9060b27..7f32763 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,6 +9,7 @@ bld.bat text eol=crlf # github helper pieces to make some files not show up in diffs automatically .azure-pipelines/* linguist-generated=true .circleci/* linguist-generated=true +.ci_support/README linguist-generated=true .drone/* linguist-generated=true .drone.yml linguist-generated=true .github/* linguist-generated=true @@ -18,6 +19,7 @@ bld.bat text eol=crlf .gitignore linguist-generated=true .travis.yml linguist-generated=true .scripts/* linguist-generated=true +.woodpecker.yml linguist-generated=true LICENSE.txt linguist-generated=true README.md linguist-generated=true azure-pipelines.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8ad8fd8..8b6142e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @wolfv \ No newline at end of file +* @traversaro @wolfv \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 7fbce05..c6b23e8 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -5,14 +5,17 @@ # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also # benefit from the improvement. +# -*- mode: jinja-shell -*- + set -xeuo pipefail 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" @@ -24,9 +27,12 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC -BUILD_CMD=build -conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge + +mamba install --update-specs --yes --quiet --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -36,38 +42,42 @@ 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 -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" \ + conda mambabuild "${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" - if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - startgroup "Uploading packages" + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then 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..9236239 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -7,14 +7,14 @@ source .scripts/logging_utils.sh -startgroup "Configure Docker" +( startgroup "Configure Docker" ) 2> /dev/null set -xeo pipefail THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" PROVIDER_DIR="$(basename $THISDIR)" -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" if [ -z ${FEEDSTOCK_NAME} ]; then @@ -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,16 +69,21 @@ 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}" +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 \ @@ -89,9 +94,12 @@ 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" \ 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 7688497..3d85505 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -1,44 +1,58 @@ #!/usr/bin/env bash +# -*- mode: jinja-shell -*- + 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" +MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" -bash $MINIFORGE_FILE -b -endgroup "Installing a fresh version of Miniforge" +rm -rf ${MINIFORGE_HOME} +bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} + +( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null -startgroup "Configuring conda" -BUILD_CMD=build +( startgroup "Configuring conda" ) 2> /dev/null -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." -conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} +echo -e "\n\nInstalling ['conda-forge-ci-setup=3'] and conda-build." +mamba install --update-specs --quiet --yes --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge \ + conda-build pip boa conda-forge-ci-setup=3 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 @@ -46,14 +60,32 @@ if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi -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" -validate_recipe_outputs "${FEEDSTOCK_NAME}" -endgroup "Validating outputs" -if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - startgroup "Uploading packages" - upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml - endgroup "Uploading packages" +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}" + fi + conda debug ./recipe -m ./.ci_support/${CONFIG}.yaml \ + ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + + # Drop into an interactive shell + /bin/bash +else + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + ( startgroup "Validating outputs" ) 2> /dev/null + + validate_recipe_outputs "${FEEDSTOCK_NAME}" + + ( endgroup "Validating outputs" ) 2> /dev/null + + ( startgroup "Uploading packages" ) 2> /dev/null + + if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml + fi + + ( endgroup "Uploading packages" ) 2> /dev/null fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 3e888d7..58a72eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,21 @@ language: generic matrix: include: - - env: CONFIG=linux_ppc64le_ UPLOAD_PACKAGES=True PLATFORM=linux-ppc64le DOCKER_IMAGE=quay.io/condaforge/linux-anvil-ppc64le - os: linux - arch: ppc64le + - env: CONFIG=linux_aarch64_ UPLOAD_PACKAGES=True PLATFORM=linux-aarch64 DOCKER_IMAGE=quay.io/condaforge/linux-anvil-aarch64 + os: linux + arch: arm64 + dist: focal + + - 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 -- export GIT_BRANCH="$TRAVIS_BRANCH" -- export FEEDSTOCK_NAME=$(basename ${TRAVIS_REPO_SLUG}) + - 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 + - if [[ ${PLATFORM} =~ .*linux.* ]]; then CONDA_FORGE_DOCKER_RUN_ARGS="--network=host --security-opt=seccomp=unconfined" ./.scripts/run_docker_build.sh; fi \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index ed3f451..6ec1401 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2021, conda-forge contributors +Copyright (c) 2015-2022, conda-forge contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index af4bf07..38db761 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -About libccd -============ +About libccd-double +=================== Home: https://github.com/danfis/libccd Package license: BSD-3-Clause -Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/libccd-feedstock/blob/master/LICENSE.txt) +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/libccd-feedstock/blob/main/LICENSE.txt) Summary: libccd is library for a collision detection between two convex shapes. @@ -21,15 +21,8 @@ Current build status - - - @@ -39,8 +32,8 @@ Current build status
Travis - - macOS - -
Drone - - linux + + linux
- - + + @@ -48,43 +41,43 @@ Current build status @@ -100,34 +93,61 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | -| [![Conda Recipe](https://img.shields.io/badge/recipe-libccd-green.svg)](https://anaconda.org/conda-forge/libccd) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libccd.svg)](https://anaconda.org/conda-forge/libccd) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libccd.svg)](https://anaconda.org/conda-forge/libccd) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libccd.svg)](https://anaconda.org/conda-forge/libccd) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-libccd--double-green.svg)](https://anaconda.org/conda-forge/libccd-double) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libccd-double.svg)](https://anaconda.org/conda-forge/libccd-double) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libccd-double.svg)](https://anaconda.org/conda-forge/libccd-double) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libccd-double.svg)](https://anaconda.org/conda-forge/libccd-double) | -Installing libccd -================= +Installing libccd-double +======================== -Installing `libccd` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: +Installing `libccd-double` 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, `libccd-double` can be installed with `conda`: + +``` +conda install libccd-double +``` + +or with `mamba`: + +``` +mamba install libccd-double ``` -Once the `conda-forge` channel has been enabled, `libccd` can be installed with: +It is possible to list all of the versions of `libccd-double` available on your platform with `conda`: ``` -conda install libccd +conda search libccd-double --channel conda-forge ``` -It is possible to list all of the versions of `libccd` available on your platform with: +or with `mamba`: ``` -conda search libccd --channel conda-forge +mamba search libccd-double --channel conda-forge +``` + +Alternatively, `mamba repoquery` may provide more information: + +``` +# Search all versions available on your platform: +mamba repoquery search libccd-double --channel conda-forge + +# List packages depending on `libccd-double`: +mamba repoquery whoneeds libccd-double --channel conda-forge + +# List dependencies of `libccd-double`: +mamba repoquery depends libccd-double --channel conda-forge ``` About conda-forge ================= -[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) +[![Powered by +NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org) conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the @@ -137,10 +157,12 @@ for each of the installable packages. Such a repository is known as a *feedstock A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by -[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/) -and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable -packages to the [conda-forge](https://anaconda.org/conda-forge) -[Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively. +[Azure](https://azure.microsoft.com/en-us/services/devops/), [GitHub](https://github.com/), +[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/), +[Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/) +it is possible to build and upload installable packages to the +[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) +channel for Linux, Windows and OSX respectively. To manage the continuous integration and simplify feedstock maintenance [conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed. @@ -162,17 +184,17 @@ Terminology produce the finished article (built conda distributions) -Updating libccd-feedstock -========================= +Updating libccd-double-feedstock +================================ -If you would like to improve the libccd recipe or build a new +If you would like to improve the libccd-double 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/libccd-feedstock are +Note that all branches in the conda-forge/libccd-double-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. @@ -187,5 +209,6 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@traversaro](https://github.com/traversaro/) * [@wolfv](https://github.com/wolfv/) diff --git a/build-locally.py b/build-locally.py index 3453cfe..eec38a0 100755 --- a/build-locally.py +++ b/build-locally.py @@ -7,15 +7,21 @@ import glob import subprocess from argparse import ArgumentParser +import platform 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: 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 +29,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 +57,17 @@ 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"): + if "OSX_SDK_DIR" not in os.environ: + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' " + "to download the SDK automatically to 'SDKs/MacOSX.sdk'. " + "Setting this variable implies agreement to the licensing terms of the SDK by Apple." + ) def main(args=None): @@ -68,7 +86,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/recipe/bld.bat b/recipe/bld.bat index c25ca9c..6f1c127 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -5,6 +5,7 @@ cmake -G "NMake Makefiles"^ -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX%^ -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX%^ -DCMAKE_INSTALL_LIBDIR=lib^ + -DENABLE_DOUBLE_PRECISION:BOOL=ON^ %SRC_DIR% if errorlevel 1 exit 1 @@ -13,4 +14,4 @@ nmake if errorlevel 1 exit 1 nmake install -if errorlevel 1 exit 1 \ No newline at end of file +if errorlevel 1 exit 1 diff --git a/recipe/build.sh b/recipe/build.sh index 9e3b8bc..dc06c17 100755 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -5,7 +5,8 @@ mkdir build && cd build cmake ${CMAKE_ARGS} .. \ -DCMAKE_INSTALL_PREFIX=$PREFIX \ -DCMAKE_INSTALL_LIBDIR=lib \ + -DENABLE_DOUBLE_PRECISION:BOOL=ON \ $SRC_DIR make -j${CPU_COUNT} -make install \ No newline at end of file +make install diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2584813..437569e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,8 +1,8 @@ -{% set name = "libccd" %} +{% set name = "libccd-double" %} {% set version = "2.1" %} package: - name: libccd + name: {{ name }} version: {{ version }} source: @@ -12,7 +12,7 @@ source: - find_libm.patch build: - number: 1 + number: 2 run_exports: - {{ pin_subpackage(name, max_pin='x.x') }} @@ -22,6 +22,11 @@ requirements: - {{ compiler('cxx') }} - cmake - make # [unix] + + # Make sure that libccd-double can't be installed + # together with libccd + run_constrained: + - libccd <1 test: commands: @@ -46,3 +51,4 @@ about: extra: recipe-maintainers: - wolfv + - traversaro
linux_64 - - variant + + variant
linux_aarch64 - - variant + + variant
linux_ppc64le - - variant + + variant
osx_64 - - variant + + variant
osx_arm64 - - variant + + variant
win_64 - - variant + + variant