Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -67,4 +67,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) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Comment thread
Iroy30 marked this conversation as resolved.
Outdated
# SPDX-License-Identifier: Apache-2.0

set -e -u -o pipefail

echo "building 'pulp' from source and running cuOpt tests"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use rapids-logger instead of echo -- it makes it easier to parse in github actions logs.

I'd suggest replacing all echo calls with rapids-logger

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, thanks!


if [ -z "${PIP_CONSTRAINT:-}" ]; then
echo "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

echo "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
echo "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) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Comment thread
Iroy30 marked this conversation as resolved.
Outdated
# SPDX-License-Identifier: Apache-2.0

set -e -u -o pipefail

echo "building 'pyomo' from source and running cuOpt tests"

if [ -z "${PIP_CONSTRAINT:-}" ]; then
echo "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

echo "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
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Loading