From 8ea0bb0acc077d6b9a6f0358addbf5e7c1a379cc Mon Sep 17 00:00:00 2001 From: Keith Kraus Date: Sun, 15 Oct 2023 20:23:29 -0400 Subject: [PATCH 1/2] Add patch to fix nvcc --- recipe/meta.yaml | 5 +- ...CONSTEXPR_FUNC-to-FMT_CONSTEXPR-2901.patch | 54 +++++++++++++++++++ recipe/{ => patches}/fix.patch | 0 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 recipe/patches/0001-Match-SPDLOG_CONSTEXPR_FUNC-to-FMT_CONSTEXPR-2901.patch rename recipe/{ => patches}/fix.patch (100%) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index cf35cfb..7034242 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,10 +10,11 @@ source: url: https://github.com/gabime/{{ name|lower }}/archive/v{{ version }}.tar.gz sha256: {{ sha256 }} patches: - - fix.patch + - patches/fix.patch + - patches/0001-Match-SPDLOG_CONSTEXPR_FUNC-to-FMT_CONSTEXPR-2901.patch build: - number: 1 + number: 2 run_exports: - {{ pin_subpackage('spdlog', max_pin='x.x') }} diff --git a/recipe/patches/0001-Match-SPDLOG_CONSTEXPR_FUNC-to-FMT_CONSTEXPR-2901.patch b/recipe/patches/0001-Match-SPDLOG_CONSTEXPR_FUNC-to-FMT_CONSTEXPR-2901.patch new file mode 100644 index 0000000..ad7eb03 --- /dev/null +++ b/recipe/patches/0001-Match-SPDLOG_CONSTEXPR_FUNC-to-FMT_CONSTEXPR-2901.patch @@ -0,0 +1,54 @@ +From a3a499b19dfba55ae9a995de181eac7921c13bf3 Mon Sep 17 00:00:00 2001 +From: Keith Kraus +Date: Fri, 13 Oct 2023 03:00:00 -0400 +Subject: [PATCH] Match SPDLOG_CONSTEXPR_FUNC to FMT_CONSTEXPR (#2901) + +* Modify the condition of SPDLOG_CONSTEXPR_FUNC to match that of fmt +--- + include/spdlog/common.h | 29 +++++++++++++++++++---------- + 1 file changed, 19 insertions(+), 10 deletions(-) + +diff --git a/include/spdlog/common.h b/include/spdlog/common.h +index 0a262eb2..29ef2324 100644 +--- a/include/spdlog/common.h ++++ b/include/spdlog/common.h +@@ -62,17 +62,26 @@ + + // visual studio up to 2013 does not support noexcept nor constexpr + #if defined(_MSC_VER) && (_MSC_VER < 1900) +-# define SPDLOG_NOEXCEPT _NOEXCEPT +-# define SPDLOG_CONSTEXPR +-# define SPDLOG_CONSTEXPR_FUNC inline ++ #define SPDLOG_NOEXCEPT _NOEXCEPT ++ #define SPDLOG_CONSTEXPR + #else +-# define SPDLOG_NOEXCEPT noexcept +-# define SPDLOG_CONSTEXPR constexpr +-# if __cplusplus >= 201402L +-# define SPDLOG_CONSTEXPR_FUNC constexpr +-# else +-# define SPDLOG_CONSTEXPR_FUNC inline +-# endif ++ #define SPDLOG_NOEXCEPT noexcept ++ #define SPDLOG_CONSTEXPR constexpr ++#endif ++ ++// If building with std::format, can just use constexpr, otherwise if building with fmt ++// SPDLOG_CONSTEXPR_FUNC needs to be set the same as FMT_CONSTEXPR to avoid situations where ++// a constexpr function in spdlog could end up calling a non-constexpr function in fmt ++// depending on the compiler ++// If fmt determines it can't use constexpr, we should inline the function instead ++#ifdef SPDLOG_USE_STD_FORMAT ++ #define SPDLOG_CONSTEXPR_FUNC constexpr ++#else // Being built with fmt ++ #if FMT_USE_CONSTEXPR ++ #define SPDLOG_CONSTEXPR_FUNC FMT_CONSTEXPR ++ #else ++ #define SPDLOG_CONSTEXPR_FUNC inline ++ #endif + #endif + + #if defined(__GNUC__) || defined(__clang__) +-- +2.42.0 + diff --git a/recipe/fix.patch b/recipe/patches/fix.patch similarity index 100% rename from recipe/fix.patch rename to recipe/patches/fix.patch From 41546b8ad8fa3361438ff0a2400a789730fd08c5 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 00:28:48 +0000 Subject: [PATCH 2/2] MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.27.1, and conda-forge-pinning 2023.10.14.15.41.10 --- .azure-pipelines/azure-pipelines-linux.yml | 5 - .azure-pipelines/azure-pipelines-win.yml | 53 ++-------- .ci_support/osx_64_.yaml | 2 +- .ci_support/osx_arm64_.yaml | 2 +- .scripts/build_steps.sh | 9 +- .scripts/logging_utils.sh | 4 +- .scripts/run_osx_build.sh | 18 ++-- .scripts/run_win_build.bat | 115 +++++++++++++++++++++ 8 files changed, 140 insertions(+), 68 deletions(-) create mode 100755 .scripts/run_win_build.bat diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 3b9dee7..fcb0974 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -23,11 +23,6 @@ jobs: timeoutInMinutes: 360 steps: - - script: | - rm -rf /opt/ghc - df -h - displayName: Manage disk space - # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 8a96a72..82c5318 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -17,6 +17,7 @@ jobs: UPLOAD_TEMP: D:\\tmp steps: + - task: PythonScript@0 displayName: 'Download Miniforge' inputs: @@ -35,52 +36,14 @@ jobs: displayName: Add conda to PATH - script: | - call activate base - mamba.exe install "python=3.10" conda-build conda pip boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes - displayName: Install conda-build - - - script: set PYTHONUNBUFFERED=1 - displayName: Set PYTHONUNBUFFERED - - # Configure the VM - - script: | - call activate base - setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml - displayName: conda-forge CI setup - - # Configure the VM. - - script: | - set "CI=azure" - call activate base - run_conda_forge_build_setup - displayName: conda-forge build setup - - - script: | - call activate base - if EXIST LICENSE.txt ( - copy LICENSE.txt "recipe\\recipe-scripts-license.txt" - ) - conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables - displayName: Build recipe + call ".scripts\run_win_build.bat" + displayName: Run Windows build env: PYTHONUNBUFFERED: 1 - - script: | - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - call activate base - validate_recipe_outputs "%FEEDSTOCK_NAME%" - displayName: Validate Recipe Outputs - - - script: | - set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" - set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" - set "TEMP=$(UPLOAD_TEMP)" - if not exist "%TEMP%\" md "%TEMP%" - set "TMP=%TEMP%" - call activate base - upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml - displayName: Upload package - env: + CONFIG: $(CONFIG) + CI: azure + UPLOAD_PACKAGES: $(UPLOAD_PACKAGES) + UPLOAD_TEMP: $(UPLOAD_TEMP) BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) - STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 840cb36..302a186 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '15' +- '16' fmt: - '10' macos_machine: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 9cd9162..0fd573d 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '15' +- '16' fmt: - '10' macos_machine: diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index a6b09f6..bd9e671 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -31,11 +31,10 @@ pkgs_dirs: CONDARC - -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 +mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c..aff009f 100644 --- a/.scripts/logging_utils.sh +++ b/.scripts/logging_utils.sh @@ -12,7 +12,7 @@ function startgroup { echo "##[group]$1";; travis ) echo "$1" - echo -en 'travis_fold:start:'"${1// /}"'\\r';; + echo -en 'travis_fold:start:'"${1// /}"'\r';; github_actions ) echo "::group::$1";; * ) @@ -28,7 +28,7 @@ function endgroup { azure ) echo "##[endgroup]";; travis ) - echo -en 'travis_fold:end:'"${1// /}"'\\r';; + echo -en 'travis_fold:end:'"${1// /}"'\r';; github_actions ) echo "::endgroup::";; esac diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index bb00584..870c49a 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -23,10 +23,10 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base -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 +mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build boa conda-forge-ci-setup=3 @@ -55,11 +55,6 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" -fi - - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" fi @@ -75,6 +70,11 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else + + if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" + fi + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100755 index 0000000..07d3445 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,115 @@ +:: PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +:: will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +:: changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +:: benefit from the improvement. + +:: Note: we assume a Miniforge installation is available + +:: INPUTS (required environment variables) +:: CONFIG: name of the .ci_support/*.yaml file for this job +:: CI: azure, github_actions, or unset +:: UPLOAD_PACKAGES: true or false +:: UPLOAD_ON_BRANCH: true or false + +setlocal enableextensions enabledelayedexpansion + +call :start_group "Configuring conda" + +:: Activate the base conda environment +call activate base + +:: Provision the necessary dependencies to build the recipe later +echo Installing dependencies +mamba.exe install "python=3.10" pip mamba conda-build boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes +if !errorlevel! neq 0 exit /b !errorlevel! + +:: Set basic configuration +echo Setting up configuration +setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml +if !errorlevel! neq 0 exit /b !errorlevel! +echo Running build setup +CALL run_conda_forge_build_setup + + +if !errorlevel! neq 0 exit /b !errorlevel! + +if EXIST LICENSE.txt ( + echo Copying feedstock license + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" +) +if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" +) + +call :end_group + +:: Build the recipe +echo Building recipe +conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables %EXTRA_CB_OPTIONS% +if !errorlevel! neq 0 exit /b !errorlevel! + +:: 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/=%" + if /i "%GITHUB_EVENT_NAME%" == "pull_request" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%RUNNER_TEMP%" +) +if /i "%CI%" == "azure" ( + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + if /i "%BUILD_REASON%" == "PullRequest" ( + set "IS_PR_BUILD=True" + ) else ( + set "IS_PR_BUILD=False" + ) + set "TEMP=%UPLOAD_TEMP%" +) + +:: Validate +call :start_group "Validating outputs" +validate_recipe_outputs "%FEEDSTOCK_NAME%" +if !errorlevel! neq 0 exit /b !errorlevel! +call :end_group + +if /i "%UPLOAD_PACKAGES%" == "true" ( + if /i "%IS_PR_BUILD%" == "false" ( + call :start_group "Uploading packages" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + if !errorlevel! neq 0 exit /b !errorlevel! + call :end_group + ) +) + +exit + +:: Logging subroutines + +:start_group +if /i "%CI%" == "github_actions" ( + echo ::group::%~1 + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[group]%~1 + exit /b +) +echo %~1 +exit /b + +:end_group +if /i "%CI%" == "github_actions" ( + echo ::endgroup:: + exit /b +) +if /i "%CI%" == "azure" ( + echo ##[endgroup] + exit /b +) +exit /b \ No newline at end of file