diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100755 index b1513b8..0000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,52 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: linux - pool: - vmImage: ubuntu-latest - strategy: - matrix: - linux_64_: - CONFIG: linux_64_ - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_aarch64_: - CONFIG: linux_aarch64_ - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - linux_ppc64le_: - CONFIG: linux_ppc64le_ - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma9 - timeoutInMinutes: 360 - variables: {} - - steps: - # configure qemu binfmt-misc running. This allows us to run docker containers - # embedded qemu-static - - script: | - docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes - ls /proc/sys/fs/binfmt_misc/ - condition: not(startsWith(variables['CONFIG'], 'linux_64')) - displayName: Configure binfmt_misc - - - 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 - export IS_PR_BUILD="True" - else - export IS_PR_BUILD="False" - fi - .scripts/run_docker_build.sh - displayName: Run docker build - env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) - FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml old mode 100755 new mode 100644 index ac0bf38..04774f0 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,15 +5,29 @@ jobs: - job: osx pool: - vmImage: macOS-13 + vmImage: $(VMIMAGE) strategy: matrix: osx_64_: CONFIG: osx_64_ UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 + build_workspace_dir: ~/miniforge3/conda-bld + free_disk_space: skip + pagefile_size: 0 + resize_partitions: false + store_build_artifacts: false + tools_install_dir: ~/miniforge3 osx_arm64_: CONFIG: osx_arm64_ UPLOAD_PACKAGES: 'True' + VMIMAGE: macOS-15 + build_workspace_dir: ~/miniforge3/conda-bld + free_disk_space: skip + pagefile_size: 0 + resize_partitions: false + store_build_artifacts: false + tools_install_dir: ~/miniforge3 timeoutInMinutes: 360 variables: {} @@ -21,12 +35,14 @@ jobs: # TODO: Fast finish on azure pipelines? - script: | export CI=azure + export CONDA_BLD_PATH=$(build_workspace_dir) + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export MINIFORGE_HOME=$(tools_install_dir) + export OSX_FORCE_SDK_DOWNLOAD="1" 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}) if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then export IS_PR_BUILD="True" else @@ -37,4 +53,4 @@ jobs: env: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml deleted file mode 100755 index 13022dd..0000000 --- a/.azure-pipelines/azure-pipelines-win.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- - -jobs: -- job: win - pool: - vmImage: windows-2022 - strategy: - matrix: - win_64_: - CONFIG: win_64_ - UPLOAD_PACKAGES: 'True' - timeoutInMinutes: 360 - variables: - CONDA_BLD_PATH: D:\\bld\\ - MINIFORGE_HOME: D:\Miniforge - UPLOAD_TEMP: D:\\tmp - - steps: - - - script: | - call ".scripts\run_win_build.bat" - displayName: Run Windows build - env: - MINIFORGE_HOME: $(MINIFORGE_HOME) - CONDA_BLD_PATH: $(CONDA_BLD_PATH) - 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) - FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 76ec336..b8435f2 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,13 +1,11 @@ c_compiler: - gcc c_compiler_version: -- '13' +- '15' c_stdlib: - sysroot c_stdlib_version: - '2.17' -cdt_name: -- conda channel_sources: - conda-forge channel_targets: @@ -15,11 +13,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '13' +- '15' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 -flann: -- 1.9.2 +- quay.io/condaforge/linux-anvil-x86_64:alma10 +eigen_abi_devel: +- 5.0.1 target_platform: - linux-64 zip_keys: diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index eae418d..342d5bd 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -1,13 +1,11 @@ c_compiler: - gcc c_compiler_version: -- '13' +- '15' c_stdlib: - sysroot c_stdlib_version: - '2.17' -cdt_name: -- conda channel_sources: - conda-forge channel_targets: @@ -15,11 +13,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '13' +- '15' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 -flann: -- 1.9.2 +- quay.io/condaforge/linux-anvil-x86_64:alma10 +eigen_abi_devel: +- 5.0.1 target_platform: - linux-aarch64 zip_keys: diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 77c0dae..3847bd3 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -1,13 +1,11 @@ c_compiler: - gcc c_compiler_version: -- '13' +- '15' c_stdlib: - sysroot c_stdlib_version: - '2.17' -cdt_name: -- conda channel_sources: - conda-forge channel_targets: @@ -15,11 +13,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '13' +- '15' docker_image: -- quay.io/condaforge/linux-anvil-x86_64:alma9 -flann: -- 1.9.2 +- quay.io/condaforge/linux-anvil-x86_64:alma10 +eigen_abi_devel: +- 5.0.1 target_platform: - linux-ppc64le zip_keys: diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index c2e7262..4ee35d8 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -1,15 +1,15 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.13' +- '11.0' MACOSX_SDK_VERSION: -- '10.13' +- '11.0' c_compiler: - clang c_compiler_version: -- '18' +- '21' c_stdlib: - macosx_deployment_target c_stdlib_version: -- '10.13' +- '11.0' channel_sources: - conda-forge channel_targets: @@ -17,9 +17,9 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '18' -flann: -- 1.9.2 +- '21' +eigen_abi_devel: +- 5.0.1 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 ddf0b0c..a8b28c3 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -5,7 +5,7 @@ MACOSX_SDK_VERSION: c_compiler: - clang c_compiler_version: -- '18' +- '21' c_stdlib: - macosx_deployment_target c_stdlib_version: @@ -17,9 +17,9 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '18' -flann: -- 1.9.2 +- '21' +eigen_abi_devel: +- 5.0.1 macos_machine: - arm64-apple-darwin20.0.0 target_platform: diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml index 4ae0032..73463b2 100644 --- a/.ci_support/win_64_.yaml +++ b/.ci_support/win_64_.yaml @@ -1,5 +1,5 @@ c_compiler: -- vs2019 +- vs2022 c_stdlib: - vs channel_sources: @@ -7,8 +7,8 @@ channel_sources: channel_targets: - conda-forge main cxx_compiler: -- vs2019 -flann: -- 1.9.2 +- vs2022 +eigen_abi_devel: +- 5.0.1 target_platform: - win-64 diff --git a/.gitattributes b/.gitattributes index 18f114a..85ccb8f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -24,4 +24,5 @@ bld.bat text eol=crlf /README.md linguist-generated=true azure-pipelines.yml linguist-generated=true build-locally.py linguist-generated=true +pixi.toml linguist-generated=true shippable.yml linguist-generated=true diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index a948c6c..30fb83d 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -1,15 +1,168 @@ -# This file was added automatically by admin-migrations. Do not modify. -# It ensures that Github Actions can run once rerendered for the first time. +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. # -*- mode: yaml -*- name: Build conda package on: - workflow_dispatch: + push: + + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true jobs: build: - name: Disabled build - runs-on: ubuntu-slim - if: false + name: ${{ matrix.CONFIG }} + runs-on: ${{ matrix.runs_on }} + timeout-minutes: 360 + strategy: + fail-fast: false + max-parallel: 50 + matrix: + include: + - CONFIG: linux_64_ + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_workspace_dir: build_artifacts + docker_run_args: + free_disk_space: skip + os: ubuntu + pagefile_size: 0 + resize_partitions: False + runs_on: ['ubuntu-latest'] + tools_install_dir: ~/miniforge3 + - CONFIG: linux_aarch64_ + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_workspace_dir: build_artifacts + docker_run_args: + free_disk_space: skip + os: ubuntu + pagefile_size: 0 + resize_partitions: False + runs_on: ['ubuntu-latest'] + tools_install_dir: ~/miniforge3 + - CONFIG: linux_ppc64le_ + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_workspace_dir: build_artifacts + docker_run_args: + free_disk_space: skip + os: ubuntu + pagefile_size: 0 + resize_partitions: False + runs_on: ['ubuntu-latest'] + tools_install_dir: ~/miniforge3 + - CONFIG: win_64_ + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_platform: win-64 + build_workspace_dir: D:\\bld\\ + docker_run_args: + free_disk_space: skip + os: windows + pagefile_size: 0 + resize_partitions: False + runs_on: ['windows-2022'] + tools_install_dir: D:\Miniforge steps: - - run: exit 0 + + - name: Checkout code + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Configure binfmt_misc + if: matrix.os == 'ubuntu' + shell: bash + run: | + if [[ "$(uname -m)" == "x86_64" ]]; then + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + fi + + - name: Build on Linux + id: build-linux + if: matrix.os == 'ubuntu' + env: + CI: github_actions + CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} + CONDA_FORGE_DOCKER_RUN_ARGS: ${{ matrix.docker_run_args }} + CONFIG: ${{ matrix.CONFIG }} + MINIFORGE_HOME: ${{ matrix.tools_install_dir }} + DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + RATTLER_BUILD_COLOR: always + RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: 'true' + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + export CONDA_BLD_PATH="${CONDA_BLD_PATH/#~/${HOME}}" + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="${GITHUB_REF_NAME}" + export MINIFORGE_HOME="${MINIFORGE_HOME/#~/${HOME}}" + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_docker_build.sh + + - name: Build on macOS + id: build-macos + if: matrix.os == 'macos' + env: + CI: github_actions + CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} + CONFIG: ${{ matrix.CONFIG }} + MINIFORGE_HOME: ${{ matrix.tools_install_dir }} + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + RATTLER_BUILD_COLOR: always + RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: 'true' + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} + shell: bash + run: | + export CONDA_BLD_PATH="${CONDA_BLD_PATH/#~/${HOME}}" + export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" + export GIT_BRANCH="${GITHUB_REF_NAME}" + export MINIFORGE_HOME="${MINIFORGE_HOME/#~/${HOME}}" + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" + if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then + export IS_PR_BUILD="True" + else + export IS_PR_BUILD="False" + fi + ./.scripts/run_osx_build.sh + + - name: Build on windows + id: build-windows + if: matrix.os == 'windows' + shell: cmd + run: | + set "flow_run_id=github_%GITHUB_RUN_ID%" + set "remote_url=https://github.com/%GITHUB_REPOSITORY%" + set "sha=%GITHUB_SHA%" + call ".scripts\run_win_build.bat" + env: + BUILD_PLATFORM: ${{ matrix.build_platform }} + CI: github_actions + CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} + CONFIG: ${{ matrix.CONFIG }} + MINIFORGE_HOME: ${{ matrix.tools_install_dir }} + PYTHONUNBUFFERED: 1 + UPLOAD_PACKAGES: ${{ matrix.UPLOAD_PACKAGES }} + RATTLER_BUILD_COLOR: always + RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: 'true' + BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} + FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 179afe5..86a9c55 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ # Ignore all files and folders in root * !/conda-forge.yml +!.recipe_maintainers.json # Don't ignore any files/folders if the parent folder is 'un-ignored' # This also avoids warnings when adding an already-checked file with an ignored parent. @@ -22,3 +23,8 @@ /build_artifacts *.pyc + +# Rattler-build's artifacts are in `output` when not specifying anything. +/output +# Pixi's configuration +.pixi diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 827a29f..56dc0fe 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -20,6 +20,7 @@ export PYTHONUNBUFFERED=1 export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" +export RATTLER_CACHE_DIR="${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache" cat >~/.condarc < /opt/conda/conda-meta/history micromamba install --root-prefix ~/.conda --prefix /opt/conda \ --yes --override-channels --channel conda-forge --strict-channel-priority \ - pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + pip rattler-build conda-forge-ci-setup=4 "conda-build>=26.3" export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 # set up the condarc @@ -49,7 +50,7 @@ source run_conda_forge_build_setup 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" + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --test skip" fi @@ -60,20 +61,39 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then 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}" - fi - conda debug "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + # differences between conda-build vs. rattler-build + # - 1 step (conda debug + manually open shell) vs. 2 step (rb debug {setup, shell}) + # - recipe is positional vs. --recipe "${RECIPE_ROOT}" + # - --output-id vs. --output-name + # - --clobber-file vs. none + # - none vs. --target-platform + export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${FEEDSTOCK_ROOT}/build_artifacts}" + rattler-build debug setup \ + --recipe "${RECIPE_ROOT}" \ + -m "${CI_SUPPORT}/${CONFIG}.yaml" \ ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + ${BUILD_OUTPUT_ID:+--output-name "${BUILD_OUTPUT_ID}"} \ + --build-platform "${BUILD_PLATFORM}" \ + --target-platform "${HOST_PLATFORM}" - # Drop into an interactive shell - /bin/bash + rattler-build debug shell else - conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ - --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ - --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" + # differences between conda-build vs. rattler-build + # - recipe is positional vs. --recipe "${RECIPE_ROOT}" + # - --suppress-variables vs. none + # - --clobber-file vs. none + # - none vs. --target-platform + # - --extra-meta a=b c=d vs. --extra-meta a=b --extra-meta c=d + + rattler-build build \ + --recipe "${RECIPE_ROOT}" \ + -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + ${EXTRA_CB_OPTIONS:-} \ + --build-platform "${BUILD_PLATFORM}" \ + --target-platform "${HOST_PLATFORM}" \ + --extra-meta flow_run_id="${flow_run_id:-}" \ + --extra-meta remote_url="${remote_url:-}" \ + --extra-meta sha="${sha:-}" ( startgroup "Inspecting artifacts" ) 2> /dev/null # inspect_artifacts was only added in conda-forge-ci-setup 4.9.4 @@ -97,4 +117,4 @@ fi ( startgroup "Final checks" ) 2> /dev/null -touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file +touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh old mode 100644 new mode 100755 diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 00f377a..17d983f 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -11,8 +11,10 @@ source .scripts/logging_utils.sh set -xeo pipefail +DOCKER_EXECUTABLE="${DOCKER_EXECUTABLE:-docker}" + THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" -PROVIDER_DIR="$(basename $THISDIR)" +PROVIDER_DIR="$(basename "$THISDIR")" FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" @@ -27,7 +29,7 @@ if [[ "${sha:-}" == "" ]]; then popd fi -docker info +${DOCKER_EXECUTABLE} info # In order for the conda-build process in the container to write to the mounted # volumes, we need to run with the same id as the host machine, which is @@ -35,6 +37,7 @@ docker info export HOST_USER_ID=$(id -u) # Check if docker-machine is being used (normally on OSX) and get the uid from # the VM + if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) fi @@ -76,27 +79,56 @@ if [ -z "${CI}" ]; then DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" fi -( endgroup "Configure Docker" ) 2> /dev/null +# Default volume suffix for Docker (preserve original behavior) +VOLUME_SUFFIX=",z" + +# Podman-specific handling +if [ "${DOCKER_EXECUTABLE}" = "podman" ]; then + # Fix file permissions for rootless podman builds + podman unshare chown -R ${HOST_USER_ID}:${HOST_USER_ID} "${ARTIFACTS}" + podman unshare chown -R ${HOST_USER_ID}:${HOST_USER_ID} "${RECIPE_ROOT}" + + # Add SELinux label only if enforcing + if command -v getenforce &>/dev/null && [ "$(getenforce)" = "Enforcing" ]; then + VOLUME_SUFFIX=",z" + else + VOLUME_SUFFIX="" + fi +fi + +# When running on GitHub Actions, mount the step summary file into the container +# and point GITHUB_STEP_SUMMARY at it so that rattler-build's GitHub integration +# can write its summary. GitHub writes the file out to the job summary after the +# step finishes. +if [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then + DOCKER_RUN_ARGS="${DOCKER_RUN_ARGS} -v ${GITHUB_STEP_SUMMARY}:/home/conda/github_step_summary:rw${VOLUME_SUFFIX},delegated -e GITHUB_STEP_SUMMARY=/home/conda/github_step_summary" +fi +( 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 \ + +${DOCKER_EXECUTABLE} pull "${DOCKER_IMAGE}" + +${DOCKER_EXECUTABLE} run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw${VOLUME_SUFFIX},delegated \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw${VOLUME_SUFFIX},delegated \ + -e BUILD_OUTPUT_ID \ + -e BUILD_WITH_CONDA_DEBUG \ + -e CI \ -e CONFIG \ + -e CPU_COUNT \ + -e FEEDSTOCK_NAME \ + -e GIT_BRANCH \ + -e GITHUB_ACTIONS \ -e HOST_USER_ID \ - -e UPLOAD_PACKAGES \ -e IS_PR_BUILD \ - -e GIT_BRANCH \ + -e RATTLER_BUILD_COLOR \ + -e RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION \ -e UPLOAD_ON_BRANCH \ - -e CI \ - -e FEEDSTOCK_NAME \ - -e CPU_COUNT \ - -e BUILD_WITH_CONDA_DEBUG \ - -e BUILD_OUTPUT_ID \ + -e UPLOAD_PACKAGES \ -e flow_run_id \ -e remote_url \ -e sha \ @@ -111,4 +143,4 @@ docker run ${DOCKER_RUN_ARGS} \ 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 +( endgroup "Final checks" ) 2> /dev/null diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 0e3c394..400a3a0 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -26,7 +26,7 @@ chmod +x "${micromamba_exe}" echo "Creating environment" "${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \ --channel conda-forge \ - pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + pip rattler-build conda-forge-ci-setup=4 "conda-build>=26.3" echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}" mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}" echo "Cleaning up micromamba" @@ -63,6 +63,25 @@ if [[ "${sha:-}" == "" ]]; then sha=$(git rev-parse HEAD) fi +if [[ "${OSX_SDK_DIR:-}" == "" ]]; then + if [[ "${CI:-}" == "" ]]; then + echo "Please set OSX_SDK_DIR to a directory where SDKs can be downloaded to. Aborting" + exit 1 + else + export OSX_SDK_DIR=/opt/conda-sdks + /usr/bin/sudo mkdir -p "${OSX_SDK_DIR}" + /usr/bin/sudo chown "${USER}" "${OSX_SDK_DIR}" + fi +else + if tmpf=$(mktemp "$OSX_SDK_DIR"/tmp.XXXXXXXX 2>/dev/null); then + rm -f "$tmpf" + echo "OSX_SDK_DIR is writeable without sudo, continuing" + else + echo "User-provided OSX_SDK_DIR is not writeable for current user! Aborting" + exit 1 + fi +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup @@ -70,33 +89,35 @@ source run_conda_forge_build_setup ( endgroup "Configuring conda" ) 2> /dev/null -echo -e "\n\nMaking the build clobber file" -make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" 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}" - 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 + export CONDA_BLD_PATH="${CONDA_BLD_PATH:-${FEEDSTOCK_ROOT:-$PWD}/build_artifacts}" + rattler-build debug setup \ + --recipe ./recipe \ + -m ./.ci_support/${CONFIG}.yaml \ + --build-platform "${BUILD_PLATFORM}" \ + --target-platform "${HOST_PLATFORM}" \ + ${BUILD_OUTPUT_ID:+--output-name "${BUILD_OUTPUT_ID}"} \ + ${EXTRA_CB_OPTIONS:-} + + rattler-build debug shell else if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --test skip" fi - conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \ - --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ - --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" + rattler-build build --recipe ./recipe \ + -m ./.ci_support/${CONFIG}.yaml \ + ${EXTRA_CB_OPTIONS:-} \ + --build-platform "${BUILD_PLATFORM}" \ + --target-platform "${HOST_PLATFORM}" \ + --extra-meta flow_run_id="$flow_run_id" \ + --extra-meta remote_url="$remote_url" \ + --extra-meta sha="$sha" ( startgroup "Inspecting artifacts" ) 2> /dev/null @@ -117,4 +138,4 @@ else fi ( endgroup "Uploading packages" ) 2> /dev/null -fi \ No newline at end of file +fi diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 283e143..a3da73e 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -25,13 +25,13 @@ set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe" echo Downloading micromamba %MICROMAMBA_VERSION% if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%" -certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%" +powershell -ExecutionPolicy Bypass -Command "(New-Object Net.WebClient).DownloadFile('%MICROMAMBA_URL%', '%MICROMAMBA_EXE%')" if !errorlevel! neq 0 exit /b !errorlevel! echo Creating environment call "%MICROMAMBA_EXE%" create --yes --root-prefix "%MAMBA_ROOT_PREFIX%" --prefix "%MINIFORGE_HOME%" ^ --channel conda-forge ^ - pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1" + pip rattler-build conda-forge-ci-setup=4 "conda-build>=26.3" if !errorlevel! neq 0 exit /b !errorlevel! echo Removing %MAMBA_ROOT_PREFIX% del /S /Q "%MAMBA_ROOT_PREFIX%" >nul @@ -64,19 +64,19 @@ if EXIST LICENSE.txt ( ) if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( if [%CROSSCOMPILING_EMULATOR%] == [] ( - set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --test skip" ) ) 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%" + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% --extra-meta remote_url=%remote_url% --extra-meta sha=%sha%" ) call :end_group :: Build the recipe echo Building recipe -conda-build.exe "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +rattler-build.exe build --recipe "recipe" -m .ci_support\%CONFIG%.yaml %EXTRA_CB_OPTIONS% --build-platform %BUILD_PLATFORM% --target-platform %HOST_PLATFORM% if !errorlevel! neq 0 exit /b !errorlevel! call :start_group "Inspecting artifacts" @@ -87,7 +87,7 @@ call :end_group :: Prepare some environment variables for the upload step if /i "%CI%" == "github_actions" ( set "FEEDSTOCK_NAME=%GITHUB_REPOSITORY:*/=%" - set "GIT_BRANCH=%GITHUB_REF:refs/heads/=%" + set "GIT_BRANCH=%GITHUB_REF_NAME%" if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( set "IS_PR_BUILD=True" ) else ( @@ -148,4 +148,4 @@ if /i "%CI%" == "azure" ( echo ##[endgroup] exit /b ) -exit /b \ No newline at end of file +exit /b diff --git a/LICENSE.txt b/LICENSE.txt index 2ec51d7..c5aa738 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,5 @@ BSD-3-Clause license -Copyright (c) 2015-2022, conda-forge contributors -All rights reserved. +Copyright (c) 2015-2026, conda-forge contributors 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 bb7e4c8..61a6bea 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ About fcl-feedstock =================== -Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/fcl-feedstock/blob/main/LICENSE.txt) +Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/fcl-feedstock-v1-feedstock/blob/main/LICENSE.txt) Home: https://github.com/flexible-collision-library/fcl @@ -9,6 +9,8 @@ Package license: BSD-3-Clause Summary: The flexible collision library (FCL) is a library for performing proximity queries. +Development: https://github.com/flexible-collision-library/fcl + FCL is a library for performing three types of proximity queries on a pair of geometric models composed of triangles. - Collision detection: detecting whether the two models overlap, and @@ -24,64 +26,35 @@ FCL is a library for performing three types of proximity queries on a pair of ge detection, the contact information (including contact normals and contact points) can be returned optionally. - Current build status ==================== - +
+ + +
GitHub Actions + + + +
Azure
- - + + - - - - - - - - - - - - - - - @@ -109,31 +82,73 @@ conda config --add channels conda-forge conda config --set channel_priority strict ``` -Once the `conda-forge` channel has been enabled, `fcl` can be installed with `conda`: +How to use +---------- + +
+With conda ``` conda install fcl ``` -or with `mamba`: +
+ +
+With mamba ``` mamba install fcl ``` -It is possible to list all of the versions of `fcl` available on your platform with `conda`: +
+ +
+With pixi + +``` +# for adding to your local project +pixi add fcl +# for installing globally +pixi global install fcl +``` + +
+ +Search package versions +----------------------- + +It is possible to list all of the versions of `fcl` available on your platform: + +
+With conda ``` conda search fcl --channel conda-forge ``` -or with `mamba`: +
+ +
+With mamba ``` mamba search fcl --channel conda-forge ``` -Alternatively, `mamba repoquery` may provide more information: +
+ +
+With pixi + +``` +pixi search fcl --channel conda-forge +``` + +
+ +
+With mamba repoquery, which may provide more information ``` # Search all versions available on your platform: @@ -146,6 +161,8 @@ mamba repoquery whoneeds fcl --channel conda-forge mamba repoquery depends fcl --channel conda-forge ``` +
+ About conda-forge ================= @@ -168,12 +185,12 @@ it is possible to build and upload installable packages to the [conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/) channel for Linux, Windows and OSX respectively. -To manage the continuous integration and simplify feedstock maintenance +To manage the continuous integration and simplify feedstock maintenance, [conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed. Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``. -For more information please check the [conda-forge documentation](https://conda-forge.org/docs/). +For more information, please check the [conda-forge documentation](https://conda-forge.org/docs/). Terminology =========== @@ -200,7 +217,7 @@ merged, the recipe will be re-built and uploaded automatically to the everybody to install and use from the `conda-forge` channel. Note that all branches in the conda-forge/fcl-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 +on branches in forks, and branches in the main repository should only be used to build distinct package versions. In order to produce a uniquely identifiable distribution: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eff4ad6..7e0f633 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ stages: jobs: - job: Skip pool: - vmImage: 'ubuntu-22.04' + vmImage: 'ubuntu-latest' variables: DECODE_PERCENTS: 'false' RET: 'true' @@ -28,6 +28,4 @@ stages: condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true')) dependsOn: Check jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml - - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file + - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py index c4a56c6..3beb68c 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,5 +1,6 @@ #!/bin/sh """exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on + # # This file has been generated by conda-smithy in order to build the recipe # locally. @@ -10,6 +11,7 @@ import os import platform import subprocess +import sys from argparse import ArgumentParser @@ -26,13 +28,6 @@ def setup_environment(ns): os.path.dirname(__file__), "miniforge3" ) - # The default cache location might not be writable using docker on macOS. - if ns.config.startswith("linux") and platform.system() == "Darwin": - os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = ( - os.environ.get("CONDA_FORGE_DOCKER_RUN_ARGS", "") - + " -e RATTLER_CACHE_DIR=/tmp/rattler_cache" - ) - def run_docker_build(ns): script = ".scripts/run_docker_build.sh" @@ -44,10 +39,19 @@ def run_osx_build(ns): subprocess.check_call([script]) +def run_win_build(ns): + script = ".scripts/run_win_build.bat" + subprocess.check_call(["cmd", "/D", "/Q", "/C", f"CALL {script}"]) + + def verify_config(ns): + choices_filter = ns.filter or "*" valid_configs = { - os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml") + os.path.basename(f)[:-5] + for f in glob.glob(f".ci_support/{choices_filter}.yaml") } + if choices_filter != "*": + print(f"filtering for '{choices_filter}.yaml' configs") print(f"valid configs are {valid_configs}") if ns.config in valid_configs: print("Using " + ns.config + " configuration") @@ -60,38 +64,46 @@ def verify_config(ns): selections = list(enumerate(sorted(valid_configs), 1)) for i, c in selections: print(f"{i}. {c}") - s = input("\n> ") + try: + s = input("\n> ") + except KeyboardInterrupt: + print("\nno option selected, bye!", file=sys.stderr) + sys.exit(1) idx = int(s) - 1 ns.config = selections[idx][1] print(f"selected {ns.config}") else: raise ValueError("config " + ns.config + " is not valid") - # Remove the following, as implemented - if ns.config.startswith("win"): - raise ValueError( - f"only Linux/macOS configs currently supported, got {ns.config}" + if ( + ns.config.startswith("osx") + and platform.system() == "Darwin" + and not os.environ.get("OSX_SDK_DIR") + ): + raise RuntimeError( + "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' " + "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " + "Note: OSX_SDK_DIR must be set to an absolute path. " + "Setting this variable implies agreement to the licensing terms of the SDK by Apple." ) - 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=$PWD/SDKs' " - "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. " - "Note: OSX_SDK_DIR must be set to an absolute path. " - "Setting this variable implies agreement to the licensing terms of the SDK by Apple." - ) def main(args=None): p = ArgumentParser("build-locally") p.add_argument("config", default=None, nargs="?") p.add_argument( - "--debug", - action="store_true", - help="Setup debug environment using `conda debug`", + "--filter", + default=None, + help="Glob string to filter which build choices are presented in interactive mode.", ) p.add_argument( - "--output-id", help="If running debug, specify the output to setup." + "--debug", + action="store_true", + help=( + "Setup debug environment using `conda debug` " + "(or `rattler-build debug` for rattler-build recipes)" + ), ) + p.add_argument("--output-id", help="If running debug, specify the output to setup.") ns = p.parse_args(args=args) verify_config(ns) @@ -104,10 +116,10 @@ def main(args=None): run_docker_build(ns) elif ns.config.startswith("osx"): run_osx_build(ns) + elif ns.config.startswith("win"): + run_win_build(ns) finally: - recipe_license_file = os.path.join( - "recipe", "recipe-scripts-license.txt" - ) + recipe_license_file = os.path.join("recipe", "recipe-scripts-license.txt") if os.path.exists(recipe_license_file): os.remove(recipe_license_file) diff --git a/conda-forge.yml b/conda-forge.yml index 976be45..5604560 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -4,5 +4,6 @@ build_platform: osx_arm64: osx_64 conda_build: pkg_format: '2' +conda_build_tool: rattler-build conda_forge_output_validation: true test: native_and_emulated diff --git a/recipe/620.patch b/recipe/620.patch new file mode 100644 index 0000000..c976397 --- /dev/null +++ b/recipe/620.patch @@ -0,0 +1,21 @@ +From a3fbc9fe4f619d7bb1117dc137daa497d2de454b Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Thu, 13 Mar 2025 15:51:44 +0100 +Subject: [PATCH] Add missing cassert include in fcl/common/types.h (#620) + +--- + include/fcl/common/types.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/fcl/common/types.h b/include/fcl/common/types.h +index 892e2b07f..1d41e2c97 100644 +--- a/include/fcl/common/types.h ++++ b/include/fcl/common/types.h +@@ -38,6 +38,7 @@ + #ifndef FCL_DATA_TYPES_H + #define FCL_DATA_TYPES_H + ++#include + #include + #include + #include diff --git a/recipe/645.patch b/recipe/645.patch new file mode 100644 index 0000000..26d2317 --- /dev/null +++ b/recipe/645.patch @@ -0,0 +1,74 @@ +From 1257b4183e0ae4890294b0edea780605c2533cfd Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Sun, 12 Oct 2025 05:33:38 +0200 +Subject: [PATCH] Use target_compile_features to specify the C++11 requirement + (#645) + +--- + CMakeModules/CompilerSettings.cmake | 10 +++++----- + src/CMakeLists.txt | 3 +++ + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/CMakeModules/CompilerSettings.cmake b/CMakeModules/CompilerSettings.cmake +index 96b9e1f73..645ca3805 100644 +--- a/CMakeModules/CompilerSettings.cmake ++++ b/CMakeModules/CompilerSettings.cmake +@@ -33,7 +33,7 @@ + + # GCC + if(CMAKE_COMPILER_IS_GNUCXX) +- add_definitions(-std=c++11 -W -Wall -Wextra -Wpedantic) ++ add_definitions(-W -Wall -Wextra -Wpedantic) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +@@ -41,7 +41,7 @@ endif() + + # Clang + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") +- add_definitions(-std=c++11 -W -Wall -Wextra) ++ add_definitions(-W -Wall -Wextra) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +@@ -53,7 +53,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) + message(FATAL_ERROR "AppleClang version must be at least 6.1!") + endif() +- add_definitions(-std=c++11 -W -Wall -Wextra) ++ add_definitions(-W -Wall -Wextra) + if(FCL_TREAT_WARNINGS_AS_ERRORS) + add_definitions(-Werror) + endif() +@@ -77,7 +77,7 @@ else() + set(IS_ICPC 0) + endif() + if(IS_ICPC) +- add_definitions(-std=c++11 -wd191 -wd411 -wd654 -wd1125 -wd1292 -wd1565 -wd1628 -wd2196) ++ add_definitions(-wd191 -wd411 -wd654 -wd1125 -wd1292 -wd1565 -wd1628 -wd2196) + set(CMAKE_AR "xiar" CACHE STRING "Intel archiver" FORCE) + set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "Default compile flags" FORCE) + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" +@@ -97,7 +97,7 @@ else() + set(IS_XLC 0) + endif() + if(IS_XLC) +- add_definitions(-std=c++11 -qpic -q64 -qmaxmem=-1) ++ add_definitions(-qpic -q64 -qmaxmem=-1) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -q64") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -q64") + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 425724e78..5a0734efd 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -50,6 +50,9 @@ endif() + # Be sure to pass to the consumer the set of SIMD used in the compilation + target_compile_options(${PROJECT_NAME} PUBLIC ${SSE_FLAGS}) + ++# At least C++11 is required ++target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11) ++ + set_target_properties(${PROJECT_NAME} PROPERTIES + VERSION ${FCL_VERSION} + SOVERSION ${FCL_ABI_VERSION}) diff --git a/recipe/659-capsule-test-tolerance.patch b/recipe/659-capsule-test-tolerance.patch new file mode 100644 index 0000000..9794f3b --- /dev/null +++ b/recipe/659-capsule-test-tolerance.patch @@ -0,0 +1,14 @@ +diff --git a/test/test_fcl_capsule_capsule.cpp b/test/test_fcl_capsule_capsule.cpp +index 085a710..f5eef5e 100644 +--- a/test/test_fcl_capsule_capsule.cpp ++++ b/test/test_fcl_capsule_capsule.cpp +@@ -604,7 +604,8 @@ class CapsuleCapsuleSegmentTest : public ::testing::Test { + + detail::capsuleCapsuleDistance(this->c1_, this->X_FC1_, this->c2_, + this->X_FC2_, &distance, &p_FW1, &p_FW2); +- const auto eps = constants::eps_78(); ++ // Slightly looser tolerance to accommodate multiple platforms. ++ const auto eps = constants::eps_34(); + using std::abs; + S error = abs(distance - this->expected_distance_); + if (error > eps) { diff --git a/recipe/bld.bat b/recipe/build.bat similarity index 100% rename from recipe/bld.bat rename to recipe/build.bat diff --git a/recipe/build.sh b/recipe/build.sh index 5ebcbfc..c9e1d7c 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash + +set -euxo pipefail mkdir build && cd build diff --git a/recipe/meta.yaml b/recipe/recipe.yaml similarity index 50% rename from recipe/meta.yaml rename to recipe/recipe.yaml index beacdb3..e714979 100644 --- a/recipe/meta.yaml +++ b/recipe/recipe.yaml @@ -1,51 +1,69 @@ -{% set name = "fcl" %} -{% set version = "0.7.0" %} -{% set sha256 = "90409e940b24045987506a6b239424a4222e2daf648c86dd146cbcb692ebdcbc" %} +schema_version: 1 + +context: + name: fcl + version: "0.7.0" package: - name: {{ name }} - version: {{ version }} + name: ${{ name }} + version: ${{ version }} source: - url: https://github.com/flexible-collision-library/fcl/archive/{{ version }}.tar.gz - sha256: {{ sha256 }} + url: https://github.com/flexible-collision-library/fcl/archive/${{ version }}.tar.gz + sha256: 90409e940b24045987506a6b239424a4222e2daf648c86dd146cbcb692ebdcbc patches: - 553.patch - - enable-shared-libs.patch # [win] + # Backport upstream PRs 620 and 645 for Eigen 5 compatibility. + # Remove after a release containing commits a3fbc9f and 1257b41. + - 620.patch + - 645.patch + # Backport the cross-platform capsule test tolerance from upstream PR 659. + - 659-capsule-test-tolerance.patch + - if: win + then: enable-shared-libs.patch build: - number: 8 - run_exports: - - {{ pin_subpackage(name, max_pin='x.x') }} + number: 9 + script: build requirements: build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - {{ stdlib('c') }} + - ${{ compiler("c") }} + - ${{ compiler("cxx") }} + - ${{ stdlib("c") }} - cmake - ninja host: - - flann - - libccd-double - eigen + - eigen-abi-devel + - libccd-double - octomap run: - - flann + - eigen + run_exports: + - ${{ pin_subpackage("fcl", upper_bound="x.x") }} -test: - commands: - - test -f $PREFIX/include/fcl/geometry/shape/cylinder.h # [not win] - - test -f $PREFIX/lib/pkgconfig/fcl.pc # [not win] - - test -f $PREFIX/lib/cmake/fcl/fcl-config.cmake # [not win] - - test -f $PREFIX/lib/libfcl${SHLIB_EXT} # [not win] - - if not exist %PREFIX%\\Library\\include\\fcl\\geometry\\shape\\cylinder.h exit 1 # [win] - - if not exist %PREFIX%\\Library\\lib\\pkgconfig\\fcl.pc exit 1 # [win] - - if not exist %PREFIX%\\Library\\CMake\\fcl-config.cmake exit 1 # [win] - - if not exist %PREFIX%\\Library\\bin\\fcl.dll exit 1 # [win] +tests: + - files: + recipe: + - tests/ + requirements: + run: + - ${{ compiler("cxx") }} + - ${{ stdlib("c") }} + - cmake + - ninja + - pkg-config + script: + - pkg-config --modversion fcl + - pkg-config --libs fcl + - cmake -S tests -B tests/build -G Ninja -DCMAKE_BUILD_TYPE=Release + - cmake --build tests/build --config Release + - ctest --test-dir tests/build --output-on-failure --build-config Release about: - home: https://github.com/flexible-collision-library/fcl + homepage: https://github.com/flexible-collision-library/fcl + repository: https://github.com/flexible-collision-library/fcl license: BSD-3-Clause license_family: BSD license_file: LICENSE @@ -67,7 +85,8 @@ about: contact points) can be returned optionally. extra: + feedstock-name: fcl recipe-maintainers: - jeongseok-meta - - wolfv - traversaro + - wolfv diff --git a/recipe/tests/CMakeLists.txt b/recipe/tests/CMakeLists.txt new file mode 100644 index 0000000..19d8ddc --- /dev/null +++ b/recipe/tests/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) +project(test_fcl LANGUAGES CXX) + +find_package(fcl CONFIG REQUIRED) + +add_executable(test_fcl test.cpp) +target_link_libraries(test_fcl PRIVATE fcl) + +enable_testing() +add_test(NAME test_fcl COMMAND test_fcl) diff --git a/recipe/tests/test.cpp b/recipe/tests/test.cpp new file mode 100644 index 0000000..c97951f --- /dev/null +++ b/recipe/tests/test.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + const fcl::Sphere sphere(1.0); + return sphere.radius == 1.0 ? 0 : 1; +}
VariantStatus
linux_64 - - variant - -
linux_aarch64 - - variant - -
linux_ppc64le - - variant - -
osx_64 - - variant - -
osx_arm64 - - variant - -
win_64 - - variant + + variant