From 69a36e390ffa11ca4ba488922426ee67662227fd Mon Sep 17 00:00:00 2001 From: Daniel Ching Date: Mon, 2 Oct 2023 10:37:27 -0500 Subject: [PATCH 1/4] BUG: Set CUDAToolkit_ROOT to the cross-compile root --- recipe/linux/activate.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipe/linux/activate.sh b/recipe/linux/activate.sh index 8b11a70..59fe221 100644 --- a/recipe/linux/activate.sh +++ b/recipe/linux/activate.sh @@ -54,16 +54,20 @@ fi if [[ "${CONDA_BUILD_CROSS_COMPILATION:-0}" == "1" ]]; then if [[ "${target_platform:-}" == "linux-aarch64" ]]; then + TARGET_ROOT=/targets/sbsa-linux LIBCUDA_STUB_FILE="${CUDA_HOME}/targets/sbsa-linux/lib/stubs/libcuda.so" CUDA_INCLUDE_DIR="${CUDA_HOME}/targets/sbsa-linux/include" elif [[ "${target_platform:-}" == "linux-ppc64le" ]]; then + TARGET_ROOT=/targets/ppc64le-linux LIBCUDA_STUB_FILE="${CUDA_HOME}/targets/ppc64le-linux/lib/stubs/libcuda.so" CUDA_INCLUDE_DIR="${CUDA_HOME}/targets/ppc64le-linux/include" elif [[ "${target_platform:-}" == "linux-64" ]]; then + TARGET_ROOT=/targets/x86_64-linux LIBCUDA_STUB_FILE="${CUDA_HOME}/targets/x86_64-linux/lib/stubs/libcuda.so" CUDA_INCLUDE_DIR="${CUDA_HOME}/targets/x86_64-linux/include" fi else + TARGET_ROOT="" LIBCUDA_STUB_FILE="${CUDA_HOME}/lib64/stubs/libcuda.so" CUDA_INCLUDE_DIR="${CUDA_HOME}/include" fi @@ -95,7 +99,7 @@ export CXXFLAGS="${CXXFLAGS} -isystem ${CUDA_INCLUDE_DIR}" # CMake looks up components in CUDA_PATH, not CUDA_HOME export CUDA_PATH="${CUDA_HOME}" # New-style CUDA integrations in CMake -CMAKE_ARGS="${CMAKE_ARGS:-} -DCUDAToolkit_ROOT=${CUDA_HOME}" +CMAKE_ARGS="${CMAKE_ARGS:-} -DCUDAToolkit_ROOT=${CUDA_HOME}${TARGET_ROOT}" # Old-style CUDA integrations in CMake ## See https://github.com/conda-forge/nvcc-feedstock/pull/58#issuecomment-752179349 CMAKE_ARGS+=" -DCUDA_TOOLKIT_ROOT_DIR=${CUDA_HOME}" From 65745b2d22f84135029947896b170f6ed68c4ae6 Mon Sep 17 00:00:00 2001 From: Daniel Ching Date: Mon, 2 Oct 2023 10:39:47 -0500 Subject: [PATCH 2/4] MAI: Bump the build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2d72dd9..f74ecc3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "nvcc" %} -{% set number = 22 %} +{% set number = 23 %} {% if cuda_compiler_version in (None, "None", True, False) %} {% set cuda_major = 0 %} From d506c0992c4aff96f0090f0b285f851d5dfc37ab Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:52:32 +0000 Subject: [PATCH 3/4] MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.26.3, and conda-forge-pinning 2023.10.02.11.43.13 --- .azure-pipelines/azure-pipelines-win.yml | 53 ++--------- .scripts/build_steps.sh | 9 +- .scripts/logging_utils.sh | 4 +- .scripts/run_win_build.bat | 112 +++++++++++++++++++++++ 4 files changed, 126 insertions(+), 52 deletions(-) create mode 100755 .scripts/run_win_build.bat diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 2b43f0d..218e16f 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -48,6 +48,7 @@ jobs: UPLOAD_TEMP: D:\\tmp steps: + - task: PythonScript@0 displayName: 'Download Miniforge' inputs: @@ -66,52 +67,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 %EXTRA_CB_OPTIONS% - 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/.scripts/build_steps.sh b/.scripts/build_steps.sh index 595f8b5..438ed2b 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 # 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_win_build.bat b/.scripts/run_win_build.bat new file mode 100755 index 0000000..c4486d9 --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,112 @@ +:: 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" +) + +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 From 5fcc5b1f4e18ab9ffa8e5a0b10d321fec22e6072 Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 18:43:25 +0000 Subject: [PATCH 4/4] MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.27.1, and conda-forge-pinning 2023.10.08.10.53.16 --- .scripts/build_steps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 438ed2b..d20d8f4 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -34,7 +34,7 @@ CONDARC 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 + pip mamba conda-build boa conda-forge-ci-setup=3 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"