diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 875d996..94cc204 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -12,6 +12,10 @@ jobs: CONFIG: linux_64_ UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_aarch64_: + CONFIG: linux_aarch64_ + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 variables: {} diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index a8ca2b4..7708e23 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -11,6 +11,9 @@ jobs: osx_64_: CONFIG: osx_64_ UPLOAD_PACKAGES: 'True' + osx_arm64_: + CONFIG: osx_arm64_ + UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 51d8853..49fab45 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -11,7 +11,7 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '12' +- '13' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 target_platform: diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml new file mode 100644 index 0000000..67957c7 --- /dev/null +++ b/.ci_support/linux_aarch64_.yaml @@ -0,0 +1,25 @@ +BUILD: +- aarch64-conda_cos7-linux-gnu +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_arch: +- aarch64 +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +target_platform: +- linux-aarch64 +zip_keys: +- - c_stdlib_version + - cdt_name diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 9b919a9..39920e8 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -13,7 +13,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '16' +- '17' macos_machine: - x86_64-apple-darwin13.4.0 target_platform: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml new file mode 100644 index 0000000..25d49c1 --- /dev/null +++ b/.ci_support/osx_arm64_.yaml @@ -0,0 +1,20 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- clangxx +cxx_compiler_version: +- '17' +macos_machine: +- arm64-apple-darwin20.0.0 +target_platform: +- osx-arm64 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..5b3367a --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @baszalmstra \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index e23c296..1cac28a 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -43,6 +43,8 @@ setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -58,7 +60,13 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then echo "rattler-build currently doesn't support debug mode" else - rattler-build build --recipe "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" ${EXTRA_CB_OPTIONS:-} + rattler-build build --recipe "${RECIPE_ROOT}" \ + -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + ${EXTRA_CB_OPTIONS:-} \ + --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.6.0 diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index fc08385..80bd43a 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -66,8 +66,14 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then echo "rattler-build does not currently support debug mode" else - - rattler-build build --recipe ./recipe -m ./.ci_support/${CONFIG}.yaml --output-dir ${MINIFORGE_HOME}/conda-bld ${EXTRA_CB_OPTIONS:-} + export SYSTEM_VERSION_COMPAT=0 + rattler-build build --recipe ./recipe \ + -m ./.ci_support/${CONFIG}.yaml \ + --output-dir ${MINIFORGE_HOME}/conda-bld ${EXTRA_CB_OPTIONS:-} \ + --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 diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index dc6be2c..cc507ce 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -24,7 +24,7 @@ set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" :: Provision the necessary dependencies to build the recipe later echo Installing dependencies -mamba.exe install "python=3.10" pip mamba rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes +mamba.exe install pip mamba rattler-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes if !errorlevel! neq 0 exit /b !errorlevel! :: Set basic configuration @@ -43,14 +43,14 @@ if EXIST LICENSE.txt ( ) 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.exe run rattler-build build --recipe "recipe" -m .ci_support\%CONFIG%.yaml %EXTRA_CB_OPTIONS% +conda.exe run rattler-build build --recipe "recipe" -m .ci_support\%CONFIG%.yaml %EXTRA_CB_OPTIONS% --target-platform %HOST_PLATFORM% if !errorlevel! neq 0 exit /b !errorlevel! call :start_group "Inspecting artifacts" diff --git a/README.md b/README.md index 21b8bc2..1035ca8 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,16 @@ About jolt-physics-feedstock Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/jolt-physics-feedstock/blob/main/LICENSE.txt) - +Home: https://github.com/jrouwe/JoltPhysics Package license: MIT Summary: A multi core friendly rigid body physics and collision detection library. +Development: https://github.com/jrouwe/JoltPhysics + +Documentation: https://jrouwe.github.io/JoltPhysics/ + A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West. Current build status @@ -35,6 +39,13 @@ Current build status variant + + linux_aarch64 + + + variant + + osx_64 @@ -42,6 +53,13 @@ Current build status variant + + osx_arm64 + + + variant + + win_64 @@ -178,4 +196,5 @@ In order to produce a uniquely identifiable distribution: Feedstock Maintainers ===================== +* [@baszalmstra](https://github.com/baszalmstra/) diff --git a/build-locally.py b/build-locally.py index d78427b..6788aea 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,8 +1,11 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally. # +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob import os import platform diff --git a/conda-forge.yml b/conda-forge.yml index ff8c453..7a8b3a7 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,3 +1,6 @@ +build_platform: + linux_aarch64: linux_64 + osx_arm64: osx_64 conda_build_tool: rattler-build github: branch_name: main diff --git a/recipe/patches/001-use-gnuinstalldirs.patch b/recipe/patches/001-use-gnuinstalldirs.patch new file mode 100644 index 0000000..f31064e --- /dev/null +++ b/recipe/patches/001-use-gnuinstalldirs.patch @@ -0,0 +1,43 @@ +From 1f45f8a3f49e778aed940326e9abf0ea89b8aa1c Mon Sep 17 00:00:00 2001 +From: Bas Zalmstra +Date: Tue, 1 Oct 2024 15:01:26 +0200 +Subject: [PATCH] use gnu install dirs + +--- + Build/CMakeLists.txt | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/Build/CMakeLists.txt b/Build/CMakeLists.txt +index bf40d940a..922dd68f1 100644 +--- a/Build/CMakeLists.txt ++++ b/Build/CMakeLists.txt +@@ -282,14 +282,18 @@ endif() + + # Install Jolt library and includes + if (ENABLE_INSTALL) ++ include(GNUInstallDirs) + install(TARGETS Jolt + EXPORT JoltExport +- DESTINATION lib) ++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + foreach(SRC_FILE ${JOLT_PHYSICS_SRC_FILES}) + string(REPLACE ${PHYSICS_REPO_ROOT} "" RELATIVE_SRC_FILE ${SRC_FILE}) + get_filename_component(DESTINATION_PATH ${RELATIVE_SRC_FILE} DIRECTORY) + if (NOT RELATIVE_SRC_FILE MATCHES "\.cpp") +- install(FILES ${SRC_FILE} DESTINATION include/${DESTINATION_PATH}) ++ install(FILES ${SRC_FILE} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${DESTINATION_PATH}) + endif() + endforeach() + +@@ -298,7 +302,7 @@ if (ENABLE_INSTALL) + NAMESPACE Jolt:: + FILE JoltConfig.cmake) + install(EXPORT JoltExport +- DESTINATION lib/cmake/Jolt/ ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Jolt/ + NAMESPACE Jolt:: + FILE JoltConfig.cmake) + endif() diff --git a/recipe/recipe.yaml b/recipe/recipe.yaml index 2d28ee3..f2167fb 100644 --- a/recipe/recipe.yaml +++ b/recipe/recipe.yaml @@ -8,13 +8,8 @@ package: source: url: https://github.com/jrouwe/JoltPhysics/archive/refs/tags/v${{ version }}.zip sha256: 10fcc863ae2b9d48c2f22d8b0204034820e57a55f858b7c388ac9579d8cf4095 - -requirements: - build: - - ${{ compiler("cxx") }} - - ${{ stdlib("c") }} - - cmake - - ninja + patches: + - patches/001-use-gnuinstalldirs.patch build: number: 0 @@ -49,6 +44,20 @@ build: -S $SRC_DIR/Build cmake --build . --target install +requirements: + build: + - ${{ compiler("cxx") }} + - ${{ stdlib("c") }} + - cmake + - ninja + +tests: + - package_contents: + include: + - Jolt/Jolt.h + lib: + - Jolt + about: homepage: https://github.com/jrouwe/JoltPhysics license: MIT