Skip to content

Commit

Permalink
Apply classic solver to M1 builds
Browse files Browse the repository at this point in the history
Add checkchannel where package is installed

test

test

test

test

test

test

test

test

test

test

test

test

Fix lint

typo
  • Loading branch information
atalman committed Nov 30, 2023
1 parent a098636 commit 8946a57
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 8 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/build_conda_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,32 @@ jobs:
CONSTRAINTS="cpuonly"
fi
# From Conda documentation:
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
# From the command line use --c
# You may specify multiple channels by passing the argument multiple times.
# Priority decreases from left to right - the first argument is higher priority than the second.
# From the command line use --override-channels to only search the specified channel(s),
# rather than any channels configured in .condarc.
${CONDA_RUN_SMOKE} conda install \
--yes \
--quiet \
-c "${CONDA_LOCAL_CHANNEL}" \
-c pytorch-"${CHANNEL}" \
-c nvidia \
-c "${CONDA_LOCAL_CHANNEL}" \
distr::"${PACKAGE_NAME}" \
${CONSTRAINTS}
-c defaults \
"${PACKAGE_NAME}" \
${CONSTRAINTS} \
--override-channels
# check for installed package channel
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
if [[ -z "${CONDA_PKG}" ]]; then
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
echo "${PACKAGE_NAME} is not installed from local channel"
exit 1
fi
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/build_conda_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,32 @@ jobs:
export CONDA_RUN_SMOKE="conda run -p ${CONDA_ENV_SMOKE}"
export OLD_PATH=${PATH}
export PATH="${CONDA_ENV_SMOKE}/bin:${PATH}"
CONDA_LOCAL_CHANNEL="file://$(readlink -f ${{ inputs.repository }}/distr)"
# From Conda documentation:
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
# From the command line use --c
# You may specify multiple channels by passing the argument multiple times.
# Priority decreases from left to right - the first argument is higher priority than the second.
# From the command line use --override-channels to only search the specified channel(s),
# rather than any channels configured in .condarc.
${CONDA_RUN_SMOKE} conda install \
--quiet \
--yes \
-c "${CONDA_LOCAL_CHANNEL}" \
-c pytorch-${CHANNEL} \
"${PACKAGE_NAME}"
-c defaults \
"${PACKAGE_NAME}" \
"--override-channels"
# check for installed package channel
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
if [[ -z "${CONDA_PKG}" ]]; then
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
echo "${PACKAGE_NAME} is not installed from local channel"
exit 1
fi
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/build_conda_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,32 @@ jobs:
CONSTRAINTS="cpuonly"
fi
# From Conda documentation:
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
# From the command line use --c
# You may specify multiple channels by passing the argument multiple times.
# Priority decreases from left to right - the first argument is higher priority than the second.
# From the command line use --override-channels to only search the specified channel(s),
# rather than any channels configured in .condarc.
${CONDA_RUN_SMOKE} conda install \
--quiet \
--yes \
-c "${CONDA_LOCAL_CHANNEL}" \
-c pytorch-"${CHANNEL}" \
-c nvidia \
-c "${CONDA_LOCAL_CHANNEL}" \
distr::"${PACKAGE_NAME}" \
${CONSTRAINTS}
-c defaults \
"${PACKAGE_NAME}" \
${CONSTRAINTS} \
--override-channels
# check for installed package channel
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
if [[ -z "${CONDA_PKG}" ]]; then
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
echo "${PACKAGE_NAME} is not installed from local channel"
exit 1
fi
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Expand Down

0 comments on commit 8946a57

Please sign in to comment.