From 982bb6e4574640017e25e8adca9e1b21ce6aa7fe Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 13 Dec 2023 05:50:45 -0800 Subject: [PATCH] Add constraint to build version when in test channel --- .github/workflows/build_conda_linux.yml | 7 ++++++- .github/workflows/build_conda_macos.yml | 7 ++++++- .github/workflows/build_conda_windows.yml | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_conda_linux.yml b/.github/workflows/build_conda_linux.yml index 750f0e5f09..d4f953952a 100644 --- a/.github/workflows/build_conda_linux.yml +++ b/.github/workflows/build_conda_linux.yml @@ -181,6 +181,11 @@ jobs: CONSTRAINTS="cpuonly" fi + CONSTRAINT_BUILD="" + if [[ "${CHANNEL}" = "test" ]]; then + CONSTRAINT_BUILD="=${BUILD_VERSION}" + fi + ${CONDA_RUN_SMOKE} conda install \ --yes \ --quiet \ @@ -188,7 +193,7 @@ jobs: -c pytorch-"${CHANNEL}" \ -c nvidia \ -c defaults \ - "${PACKAGE_NAME}" \ + "${PACKAGE_NAME}${CONSTRAINT_BUILD}" \ ${CONSTRAINTS} \ --override-channels diff --git a/.github/workflows/build_conda_macos.yml b/.github/workflows/build_conda_macos.yml index af5b36eafb..e8f6170722 100644 --- a/.github/workflows/build_conda_macos.yml +++ b/.github/workflows/build_conda_macos.yml @@ -189,13 +189,18 @@ jobs: export PATH="${CONDA_ENV_SMOKE}/bin:${PATH}" CONDA_LOCAL_CHANNEL="file://$(readlink -f ${{ inputs.repository }}/distr)" + CONSTRAINT_BUILD="" + if [[ "${CHANNEL}" = "test" ]]; then + CONSTRAINT_BUILD="=${BUILD_VERSION}" + fi + ${CONDA_RUN_SMOKE} conda install \ --quiet \ --yes \ -c "${CONDA_LOCAL_CHANNEL}" \ -c pytorch-${CHANNEL} \ -c defaults \ - "${PACKAGE_NAME}" \ + "${PACKAGE_NAME}${CONSTRAINT_BUILD}" \ "--override-channels" # check for installed package channel diff --git a/.github/workflows/build_conda_windows.yml b/.github/workflows/build_conda_windows.yml index 8f06367a67..e6a999549e 100644 --- a/.github/workflows/build_conda_windows.yml +++ b/.github/workflows/build_conda_windows.yml @@ -206,6 +206,11 @@ jobs: CONSTRAINTS="cpuonly" fi + CONSTRAINT_BUILD="" + if [[ "${CHANNEL}" = "test" ]]; then + CONSTRAINT_BUILD="=${BUILD_VERSION}" + fi + ${CONDA_RUN_SMOKE} conda install \ --quiet \ --yes \ @@ -213,7 +218,7 @@ jobs: -c pytorch-"${CHANNEL}" \ -c nvidia \ -c defaults \ - "${PACKAGE_NAME}" \ + "${PACKAGE_NAME}${CONSTRAINT_BUILD}" \ ${CONSTRAINTS} \ --override-channels