Skip to content

Commit 8946a57

Browse files
committed
Apply classic solver to M1 builds
Add checkchannel where package is installed test test test test test test test test test test test test Fix lint typo
1 parent a098636 commit 8946a57

File tree

3 files changed

+62
-8
lines changed

3 files changed

+62
-8
lines changed

.github/workflows/build_conda_linux.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,32 @@ jobs:
180180
CONSTRAINTS="cpuonly"
181181
fi
182182
183+
# From Conda documentation:
184+
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
185+
# From the command line use --c
186+
# You may specify multiple channels by passing the argument multiple times.
187+
# Priority decreases from left to right - the first argument is higher priority than the second.
188+
# From the command line use --override-channels to only search the specified channel(s),
189+
# rather than any channels configured in .condarc.
190+
183191
${CONDA_RUN_SMOKE} conda install \
184192
--yes \
185193
--quiet \
194+
-c "${CONDA_LOCAL_CHANNEL}" \
186195
-c pytorch-"${CHANNEL}" \
187196
-c nvidia \
188-
-c "${CONDA_LOCAL_CHANNEL}" \
189-
distr::"${PACKAGE_NAME}" \
190-
${CONSTRAINTS}
197+
-c defaults \
198+
"${PACKAGE_NAME}" \
199+
${CONSTRAINTS} \
200+
--override-channels
201+
202+
# check for installed package channel
203+
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
204+
if [[ -z "${CONDA_PKG}" ]]; then
205+
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
206+
echo "${PACKAGE_NAME} is not installed from local channel"
207+
exit 1
208+
fi
191209
192210
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
193211
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"

.github/workflows/build_conda_macos.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,32 @@ jobs:
182182
export CONDA_RUN_SMOKE="conda run -p ${CONDA_ENV_SMOKE}"
183183
export OLD_PATH=${PATH}
184184
export PATH="${CONDA_ENV_SMOKE}/bin:${PATH}"
185-
186185
CONDA_LOCAL_CHANNEL="file://$(readlink -f ${{ inputs.repository }}/distr)"
186+
187+
# From Conda documentation:
188+
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
189+
# From the command line use --c
190+
# You may specify multiple channels by passing the argument multiple times.
191+
# Priority decreases from left to right - the first argument is higher priority than the second.
192+
# From the command line use --override-channels to only search the specified channel(s),
193+
# rather than any channels configured in .condarc.
194+
187195
${CONDA_RUN_SMOKE} conda install \
188196
--quiet \
189197
--yes \
190198
-c "${CONDA_LOCAL_CHANNEL}" \
191199
-c pytorch-${CHANNEL} \
192-
"${PACKAGE_NAME}"
200+
-c defaults \
201+
"${PACKAGE_NAME}" \
202+
"--override-channels"
203+
204+
# check for installed package channel
205+
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
206+
if [[ -z "${CONDA_PKG}" ]]; then
207+
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
208+
echo "${PACKAGE_NAME} is not installed from local channel"
209+
exit 1
210+
fi
193211
194212
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
195213
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"

.github/workflows/build_conda_windows.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,32 @@ jobs:
200200
CONSTRAINTS="cpuonly"
201201
fi
202202
203+
# From Conda documentation:
204+
# https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html#specifying-channels-when-installing-packages
205+
# From the command line use --c
206+
# You may specify multiple channels by passing the argument multiple times.
207+
# Priority decreases from left to right - the first argument is higher priority than the second.
208+
# From the command line use --override-channels to only search the specified channel(s),
209+
# rather than any channels configured in .condarc.
210+
203211
${CONDA_RUN_SMOKE} conda install \
204212
--quiet \
205213
--yes \
214+
-c "${CONDA_LOCAL_CHANNEL}" \
206215
-c pytorch-"${CHANNEL}" \
207216
-c nvidia \
208-
-c "${CONDA_LOCAL_CHANNEL}" \
209-
distr::"${PACKAGE_NAME}" \
210-
${CONSTRAINTS}
217+
-c defaults \
218+
"${PACKAGE_NAME}" \
219+
${CONSTRAINTS} \
220+
--override-channels
221+
222+
# check for installed package channel
223+
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
224+
if [[ -z "${CONDA_PKG}" ]]; then
225+
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
226+
echo "${PACKAGE_NAME} is not installed from local channel"
227+
exit 1
228+
fi
211229
212230
if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
213231
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"

0 commit comments

Comments
 (0)