diff --git a/.ci_support/linux_64_numpy1.21python3.10.____cpython.yaml b/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml similarity index 78% rename from .ci_support/linux_64_numpy1.21python3.10.____cpython.yaml rename to .ci_support/linux_64_numpy1.23python3.11.____cpython.yaml index 6bce1be6b5f..03a3a68f8d4 100644 --- a/.ci_support/linux_64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml @@ -1,11 +1,9 @@ alsa_lib: -- 1.2.7 -boost_cpp: -- 1.78.0 +- 1.2.10 c_compiler: - gcc c_compiler_version: -- '10' +- '12' cdt_name: - cos7 channel_sources: @@ -15,7 +13,7 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '12' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 fftw: @@ -24,38 +22,40 @@ gmp: - '6' gsl: - '2.7' +libboost_devel: +- '1.82' libiio: - '0' libsndfile: -- '1.1' +- '1.2' libthrift: -- 0.16.0 +- 0.19.0 numpy: -- '1.21' +- '1.23' pin_run_as_build: - boost-cpp: - max_pin: x.x.x python: min_pin: x.x max_pin: x.x pybind11_abi: - '4' +pyqt: +- '5.15' python: -- 3.10.* *_cpython +- 3.11.* *_cpython qt_main: - '5.15' soapysdr: - '0.8' spdlog: -- '1.10' +- '1.12' target_platform: - linux-64 uhd: -- 4.3.0 +- 4.5.0 volk: -- '2.5' +- '3.0' zeromq: -- 4.3.4 +- 4.3.5 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/migrations/boost_cpp_to_libboost.yaml b/.ci_support/migrations/boost_cpp_to_libboost.yaml new file mode 100644 index 00000000000..5e0e2c2461f --- /dev/null +++ b/.ci_support/migrations/boost_cpp_to_libboost.yaml @@ -0,0 +1,20 @@ +migrator_ts: 1695775149 +__migrator: + kind: version + migration_number: 1 + bump_number: 1 + commit_message: "Rebuild for libboost 1.82" + # limit the number of prs for ramp-up + pr_limit: 10 +libboost_devel: + - 1.82 +# This migration is matched with a piggy-back migrator +# (see https://github.com/regro/cf-scripts/pull/1668) +# that will replace boost-cpp with libboost-devel +boost_cpp: + - 1.82 +# same for boost -> libboost-python-devel +libboost_python_devel: + - 1.82 +boost: + - 1.82 diff --git a/.ci_support/migrations/fmt10.yaml b/.ci_support/migrations/fmt10.yaml new file mode 100644 index 00000000000..0d2b1ed73cd --- /dev/null +++ b/.ci_support/migrations/fmt10.yaml @@ -0,0 +1,7 @@ +__migrator: + build_number: 1 + kind: version + migration_number: 1 +fmt: +- '10' +migrator_ts: 1683802784.4940007 diff --git a/.ci_support/migrations/libthrift0190.yaml b/.ci_support/migrations/libthrift0190.yaml new file mode 100644 index 00000000000..a69410844d7 --- /dev/null +++ b/.ci_support/migrations/libthrift0190.yaml @@ -0,0 +1,7 @@ +__migrator: + build_number: 1 + kind: version + migration_number: 1 +libthrift: +- 0.19.0 +migrator_ts: 1693762377.7427814 diff --git a/.ci_support/migrations/qt515.yaml b/.ci_support/migrations/zeromq435.yaml similarity index 55% rename from .ci_support/migrations/qt515.yaml rename to .ci_support/migrations/zeromq435.yaml index 33bea1b54a3..27ed38e2f85 100644 --- a/.ci_support/migrations/qt515.yaml +++ b/.ci_support/migrations/zeromq435.yaml @@ -1,10 +1,8 @@ -migrator_ts: 1653771978 +migrator_ts: 1698047052 __migrator: kind: version migration_number: 1 bump_number: 1 -qt: - - 5.15 -qt_main: - - 5.15 +zeromq: + - '4.3.5' diff --git a/.ci_support/osx_64_numpy1.21python3.10.____cpython.yaml b/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml similarity index 79% rename from .ci_support/osx_64_numpy1.21python3.10.____cpython.yaml rename to .ci_support/osx_64_numpy1.23python3.11.____cpython.yaml index ad072241701..a27dfd93fe9 100644 --- a/.ci_support/osx_64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml @@ -1,11 +1,9 @@ MACOSX_DEPLOYMENT_TARGET: - '10.9' -boost_cpp: -- 1.78.0 c_compiler: - clang c_compiler_version: -- '14' +- '16' channel_sources: - conda-forge channel_targets: @@ -13,47 +11,49 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '14' +- '16' fftw: - '3' gmp: - '6' gsl: - '2.7' +libboost_devel: +- '1.82' libiio: - '0' libsndfile: -- '1.1' +- '1.2' libthrift: -- 0.16.0 +- 0.19.0 macos_machine: - x86_64-apple-darwin13.4.0 numpy: -- '1.21' +- '1.23' pin_run_as_build: - boost-cpp: - max_pin: x.x.x python: min_pin: x.x max_pin: x.x pybind11_abi: - '4' +pyqt: +- '5.15' python: -- 3.10.* *_cpython +- 3.11.* *_cpython qt_main: - '5.15' soapysdr: - '0.8' spdlog: -- '1.10' +- '1.12' target_platform: - osx-64 uhd: -- 4.3.0 +- 4.5.0 volk: -- '2.5' +- '3.0' zeromq: -- 4.3.4 +- 4.3.5 zip_keys: - - c_compiler_version - cxx_compiler_version diff --git a/.ci_support/win_64_numpy1.21python3.10.____cpython.yaml b/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml similarity index 75% rename from .ci_support/win_64_numpy1.21python3.10.____cpython.yaml rename to .ci_support/win_64_numpy1.23python3.11.____cpython.yaml index 6781acca750..ca5ce5c1c90 100644 --- a/.ci_support/win_64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml @@ -1,5 +1,3 @@ -boost_cpp: -- 1.78.0 c_compiler: - vs2019 channel_sources: @@ -12,36 +10,38 @@ fftw: - '3' gsl: - '2.7' +libboost_devel: +- '1.82' libiio: - '0' libsndfile: -- '1.1' +- '1.2' numpy: -- '1.21' +- '1.23' pin_run_as_build: - boost-cpp: - max_pin: x.x.x python: min_pin: x.x max_pin: x.x pybind11_abi: - '4' +pyqt: +- '5.15' python: -- 3.10.* *_cpython +- 3.11.* *_cpython qt_main: - '5.15' soapysdr: - '0.8' spdlog: -- '1.10' +- '1.12' target_platform: - win-64 uhd: -- 4.3.0 +- 4.5.0 volk: -- '2.5' +- '3.0' zeromq: -- 4.3.4 +- 4.3.5 zip_keys: - - python - numpy diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index c20367f7a7e..22216dd56a2 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -3,30 +3,35 @@ # -*- mode: yaml -*- name: Build conda package -on: [push, pull_request] +on: ['push', 'pull_request'] jobs: build: name: ${{ matrix.CONFIG }} - runs-on: ${{ matrix.os }}-latest + runs-on: ${{ matrix.runs_on }} + timeout-minutes: 360 strategy: fail-fast: false matrix: include: - - CONFIG: linux_64_numpy1.21python3.10.____cpython - SHORT_CONFIG: linux_64_numpy1.21python3.10.____cpython + - CONFIG: linux_64_numpy1.23python3.11.____cpython + SHORT_CONFIG: linux_64_numpy1.23python3.11.____cpython UPLOAD_PACKAGES: True - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 os: ubuntu - - CONFIG: win_64_numpy1.21python3.10.____cpython - SHORT_CONFIG: win_64_numpy1.21python3.10.____cpython + runs_on: ['ubuntu-latest'] + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + - CONFIG: win_64_numpy1.23python3.11.____cpython + SHORT_CONFIG: win_64_numpy1.23python3.11.____cpython UPLOAD_PACKAGES: True os: windows - - CONFIG: osx_64_numpy1.21python3.10.____cpython - SHORT_CONFIG: osx_64_numpy1.21python3.10.____cpython + runs_on: ['windows-latest'] + - CONFIG: osx_64_numpy1.23python3.11.____cpython + SHORT_CONFIG: osx_64_numpy1.23python3.11.____cpython UPLOAD_PACKAGES: True os: macos + runs_on: ['macos-latest'] steps: + - name: Checkout code uses: actions/checkout@v3 with: @@ -40,11 +45,15 @@ jobs: DOCKER_IMAGE: ${{ matrix.DOCKER_IMAGE }} CI: github_actions UPLOAD_ON_BRANCH: main + CONDA_FORGE_DOCKER_RUN_ARGS: "${{ matrix.CONDA_FORGE_DOCKER_RUN_ARGS }}" BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} shell: bash run: | echo "::group::Configure binfmt_misc" docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" export GIT_BRANCH="$(basename $GITHUB_REF)" if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then @@ -65,6 +74,9 @@ jobs: BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} shell: bash run: | + export flow_run_id="github_$GITHUB_RUN_ID" + export remote_url="https://github.com/$GITHUB_REPOSITORY" + export sha="$GITHUB_SHA" export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" export GIT_BRANCH="$(basename $GITHUB_REF)" if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then @@ -80,33 +92,14 @@ jobs: miniforge-version: latest miniforge-variant: Mambaforge if: matrix.os == 'windows' + - name: Build on windows shell: cmd run: | - call activate base - mamba.exe install -c conda-forge 'python=3.9' conda-build conda pip boa conda-forge-ci-setup=3 "py-lief<0.12" - if errorlevel 1 exit 1 - setup_conda_rc .\ ".\.packaging/conda_recipe" .\.ci_support\%CONFIG%.yaml - if errorlevel 1 exit 1 - - - if EXIST LICENSE.txt ( - copy LICENSE.txt ".packaging/conda_recipe\\recipe-scripts-license.txt" - ) - conda.exe mambabuild ".packaging/conda_recipe" -m .ci_support\%CONFIG%.yaml - if errorlevel 1 exit 1 - 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" - ) - if /i "%UPLOAD_PACKAGES%" == "true" ( - if /i "%IS_PR_BUILD%" == "false" ( - upload_package .\ ".\.packaging/conda_recipe" .ci_support\%CONFIG%.yaml - ) - ) + 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: PYTHONUNBUFFERED: 1 CONFIG: ${{ matrix.CONFIG }} diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 6f6bf34703e..021c0617c2b 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -28,14 +28,15 @@ conda-build: pkgs_dirs: - ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache - /opt/conda/pkgs +solver: libmamba CONDARC +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 - -mamba install --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" +mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -47,12 +48,15 @@ source run_conda_forge_build_setup # "recipe/yum_requirements.txt" file. After updating that file, # run "conda smithy rerender" and this line will be updated # automatically. -/usr/bin/sudo -n yum install -y mesa-libGL mesa-dri-drivers libice libselinux libsm libX11 libXcomposite libXcursor libXdamage libXext libXfixes libXi libXinerama libXrandr libXxf86vm xcb-util xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm xorg-x11-server-Xvfb +/usr/bin/sudo -n yum install -y mesa-libGL mesa-dri-drivers xorg-x11-server-Xvfb # make the build number clobber 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" +fi ( endgroup "Configuring conda" ) 2> /dev/null @@ -61,6 +65,12 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" fi +if [[ "${sha:-}" == "" ]]; then + pushd ${FEEDSTOCK_ROOT} + sha=$(git rev-parse HEAD) + popd +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}" @@ -72,9 +82,10 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" + --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \ + --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}" ( startgroup "Uploading packages" ) 2> /dev/null diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh index cba0faeea94..17ec0868c56 100755 --- a/.scripts/create_conda_build_artifacts.sh +++ b/.scripts/create_conda_build_artifacts.sh @@ -79,8 +79,8 @@ if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" elif [[ "$CI" == "github_actions" ]]; then - echo "::set-output name=BLD_ARTIFACT_NAME::$BLD_ARTIFACT_NAME" - echo "::set-output name=BLD_ARTIFACT_PATH::$BLD_ARTIFACT_PATH" + echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT fi fi @@ -107,7 +107,7 @@ if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" elif [[ "$CI" == "github_actions" ]]; then - echo "::set-output name=ENV_ARTIFACT_NAME::$ENV_ARTIFACT_NAME" - echo "::set-output name=ENV_ARTIFACT_PATH::$ENV_ARTIFACT_PATH" + echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT fi fi \ No newline at end of file diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh index 57bc95c2421..aff009f0c53 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_docker_build.sh b/.scripts/run_docker_build.sh index f7be9228602..83c96ed3dee 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -15,7 +15,7 @@ THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )" PROVIDER_DIR="$(basename $THISDIR)" FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )" -RECIPE_ROOT="${FEEDSTOCK_ROOT}/.packaging/conda_recipe" +RECIPE_ROOT="${FEEDSTOCK_ROOT}/.conda/recipe" if [ -z ${FEEDSTOCK_NAME} ]; then export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) @@ -91,6 +91,9 @@ docker run ${DOCKER_RUN_ARGS} \ -e CPU_COUNT \ -e BUILD_WITH_CONDA_DEBUG \ -e BUILD_OUTPUT_ID \ + -e flow_run_id \ + -e remote_url \ + -e sha \ -e BINSTAR_TOKEN \ "${DOCKER_IMAGE}" \ bash \ diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index f4a027340fa..7223ba1abf2 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -22,19 +22,21 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base +export CONDA_SOLVER="libmamba" +export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1 -mamba install --update-specs --quiet --yes --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" -mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" +mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 +mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \ + pip mamba conda-build conda-forge-ci-setup=4 echo -e "\n\nSetting up the condarc and mangling the compiler." -setup_conda_rc ./ ./.packaging/conda_recipe ./.ci_support/${CONFIG}.yaml +setup_conda_rc ./ ./.conda/recipe ./.ci_support/${CONFIG}.yaml if [[ "${CI:-}" != "" ]]; then - mangle_compiler ./ ./.packaging/conda_recipe .ci_support/${CONFIG}.yaml + mangle_compiler ./ ./.conda/recipe .ci_support/${CONFIG}.yaml fi if [[ "${CI:-}" != "" ]]; then @@ -45,6 +47,10 @@ else echo -e "\n\nNot mangling homebrew as we are not running in CI" fi +if [[ "${sha:-}" == "" ]]; then + sha=$(git rev-parse HEAD) +fi + echo -e "\n\nRunning the build setup script." source run_conda_forge_build_setup @@ -53,32 +59,37 @@ source run_conda_forge_build_setup ( endgroup "Configuring conda" ) 2> /dev/null echo -e "\n\nMaking the build clobber file" -make_build_number ./ ./.packaging/conda_recipe ./.ci_support/${CONFIG}.yaml - +make_build_number ./ ./.conda/recipe ./.ci_support/${CONFIG}.yaml if [[ -f LICENSE.txt ]]; then - cp LICENSE.txt ".packaging/conda_recipe/recipe-scripts-license.txt" + cp LICENSE.txt ".conda/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 ./.packaging/conda_recipe -m ./.ci_support/${CONFIG}.yaml \ + conda debug ./.conda/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 ./.packaging/conda_recipe -m ./.ci_support/${CONFIG}.yaml \ + + if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" + fi + + conda build ./.conda/recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ - --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \ + --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha" ( startgroup "Uploading packages" ) 2> /dev/null if [[ "${UPLOAD_PACKAGES}" != "False" ]] && [[ "${IS_PR_BUILD}" == "False" ]]; then - upload_package ./ ./.packaging/conda_recipe ./.ci_support/${CONFIG}.yaml + upload_package ./ ./.conda/recipe ./.ci_support/${CONFIG}.yaml fi ( endgroup "Uploading packages" ) 2> /dev/null diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat new file mode 100755 index 00000000000..827449e804e --- /dev/null +++ b/.scripts/run_win_build.bat @@ -0,0 +1,121 @@ +:: 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 +:: Configure the solver +set "CONDA_SOLVER=libmamba" +if !errorlevel! neq 0 exit /b !errorlevel! +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 conda-build conda-forge-ci-setup=4 -c conda-forge --strict-channel-priority --yes +if !errorlevel! neq 0 exit /b !errorlevel! + +:: Set basic configuration +echo Setting up configuration +setup_conda_rc .\ ".\.conda/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 ".conda/recipe\\recipe-scripts-license.txt" +) +if NOT [%HOST_PLATFORM%] == [%BUILD_PLATFORM%] ( + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --no-test" +) + +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%" +) + +call :end_group + +:: Build the recipe +echo Building recipe +conda.exe build ".conda/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%" +) +set "UPLOAD_ON_BRANCH=main" +:: Note, this needs GIT_BRANCH too + +:: Validate + +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 .\ ".\.conda/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