Skip to content

Commit d71b77e

Browse files
authored
Merge branch 'branch-25.08' into add_python_model_builder
2 parents 7562bbe + d2f11ff commit d71b77e

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
package-name: cuopt
190190
package-type: python
191191
wheel-tests-cuopt:
192-
needs: [wheel-build-cuopt, wheel-build-cuopt-mps-parser, changed-files]
192+
needs: [wheel-build-cuopt, wheel-build-cuopt-mps-parser, wheel-build-cuopt-sh-client, changed-files]
193193
secrets: inherit
194194
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.08
195195
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_cuopt

ci/test_wheel_cuopt.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,33 @@
1717

1818
set -euo pipefail
1919

20+
# sets up a constraints file for 'pip' and puts its location in an exported variable PIP_EXPORT,
21+
# so those constraints will affect all future 'pip install' calls
2022
source rapids-init-pip
2123

2224
# Download the packages built in the previous step
2325
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
2426
CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python)
27+
CUOPT_SH_CLIENT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_sh_client" rapids-download-wheels-from-github python)
2528
CUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python)
2629
LIBCUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
2730

31+
# update pip constraints.txt to ensure all future 'pip install' (including those in ci/thirdparty-testing)
32+
# use these wheels for cuopt packages
33+
cat > "${PIP_CONSTRAINT}" <<EOF
34+
cuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${CUOPT_WHEELHOUSE}/cuopt_${RAPIDS_PY_CUDA_SUFFIX}-*.whl)
35+
cuopt-mps-parser @ file://$(echo ${CUOPT_MPS_PARSER_WHEELHOUSE}/cuopt_mps_parser-*.whl)
36+
cuopt-sh-client @ file://$(echo ${CUOPT_SH_CLIENT_WHEELHOUSE}/cuopt_sh_client-*.whl)
37+
libcuopt-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${LIBCUOPT_WHEELHOUSE}/libcuopt_${RAPIDS_PY_CUDA_SUFFIX}-*.whl)
38+
EOF
39+
2840
# echo to expand wildcard before adding `[extra]` requires for pip
2941
rapids-pip-retry install \
3042
--extra-index-url=https://pypi.nvidia.com \
43+
--constraint "${PIP_CONSTRAINT}" \
3144
"${CUOPT_MPS_PARSER_WHEELHOUSE}"/cuopt_mps_parser*.whl \
3245
"$(echo "${CUOPT_WHEELHOUSE}"/cuopt*.whl)[test]" \
46+
"${CUOPT_SH_CLIENT_WHEELHOUSE}"/cuopt_sh_client*.whl \
3347
"${LIBCUOPT_WHEELHOUSE}"/libcuopt*.whl
3448

3549
python -c "import cuopt"
@@ -59,3 +73,5 @@ timeout 10m bash ./python/libcuopt/libcuopt/tests/test_cli.sh
5973
# Run Python tests
6074
RAPIDS_DATASET_ROOT_DIR=./datasets timeout 30m python -m pytest --verbose --capture=no ./python/cuopt/cuopt/tests/
6175

76+
# run cvxpy integration tests
77+
./ci/thirdparty-testing/run_cvxpy_tests.sh
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e -u -o pipefail
18+
19+
echo "building 'cvxpy' from source"
20+
git clone https://github.com/cvxpy/cvxpy.git
21+
pushd ./cvxpy || exit 1
22+
pip wheel \
23+
-w dist \
24+
.
25+
26+
# NOTE: installing cvxpy[CUOPT] alongside CI artifacts is helpful to catch dependency conflicts
27+
echo "installing 'cvxpy' with cuopt"
28+
python -m pip install \
29+
--constraint "${PIP_CONSTRAINT}" \
30+
--extra-index-url=https://pypi.nvidia.com \
31+
--extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple \
32+
'pytest-error-for-skips>=2.0.2' \
33+
"$(echo ./dist/cvxpy*.whl)[CUOPT,testing]"
34+
35+
# ensure that environment is still consistent (i.e. cvxpy requirements do not conflict with cuopt's)
36+
pip check
37+
38+
echo "running 'cvxpy' tests"
39+
timeout 3m python -m pytest \
40+
--verbose \
41+
--capture=no \
42+
--error-for-skips \
43+
-k "TestCUOPT" \
44+
./cvxpy/tests/test_conic_solvers.py

0 commit comments

Comments
 (0)