Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/test_wheel_cuopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,6 @@ timeout 30m ./ci/run_cuopt_pytests.sh --verbose --capture=no
if [[ "${RAPIDS_BUILD_TYPE}" == "nightly" ]]; then
./ci/thirdparty-testing/run_jump_tests.sh
./ci/thirdparty-testing/run_cvxpy_tests.sh
./ci/thirdparty-testing/run_pulp_tests.sh
./ci/thirdparty-testing/run_pyomo_tests.sh
fi
43 changes: 43 additions & 0 deletions ci/thirdparty-testing/run_pulp_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -e -u -o pipefail

rapids-logger "building 'pulp' from source and running cuOpt tests"

if [ -z "${PIP_CONSTRAINT:-}" ]; then
rapids-logger "PIP_CONSTRAINT is not set; ensure ci/test_wheel_cuopt.sh (or equivalent) has set it so cuopt wheels are used."
exit 1
fi

git clone --depth 1 https://github.com/coin-or/pulp.git
pushd ./pulp || exit 1

# Install PuLP in editable form so it uses the environment's cuopt (from PIP_CONSTRAINT)
python -m pip install \
--constraint "${PIP_CONSTRAINT}" \
--extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple \
pytest \
-e .

pip check

rapids-logger "running PuLP tests (cuOpt-related)"
# PuLP uses pytest; run only tests that reference cuopt/CUOPT
# Exit code 5 = no tests collected; then try run_tests.py which detects solvers (including cuopt)
pytest_rc=0
timeout 5m python -m pytest \
--verbose \
--capture=no \
-k "cuopt or CUOPT" \
pulp/tests/ || pytest_rc=$?

if [ "$pytest_rc" -eq 5 ]; then
rapids-logger "No pytest -k cuopt tests found; running PuLP run_tests.py (solver auto-detection, includes cuopt)"
timeout 5m python pulp/tests/run_tests.py
pytest_rc=$?
fi

popd || exit 1
exit "$pytest_rc"
34 changes: 34 additions & 0 deletions ci/thirdparty-testing/run_pyomo_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -e -u -o pipefail

rapids-logger "building 'pyomo' from source and running cuOpt tests"

if [ -z "${PIP_CONSTRAINT:-}" ]; then
rapids-logger "PIP_CONSTRAINT is not set; ensure ci/test_wheel_cuopt.sh (or equivalent) has set it so cuopt wheels are used."
exit 1
fi

git clone --depth 1 https://github.com/Pyomo/pyomo.git
pushd ./pyomo || exit 1

# Install Pyomo in editable form so it uses the environment's cuopt (from PIP_CONSTRAINT)
python -m pip install \
--constraint "${PIP_CONSTRAINT}" \
--extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple \
pytest \
-e .

pip check

rapids-logger "running Pyomo tests (cuopt_direct / cuOpt-related)"
# Run only tests that reference cuopt (cuopt_direct solver)
timeout 5m python -m pytest \
--verbose \
--capture=no \
-k "cuopt or CUOPT" \
pyomo/solvers/tests/

popd || exit 1
Loading