From d21f641bb06829a4764ac137795990c976670bc5 Mon Sep 17 00:00:00 2001 From: Ishika Roy Date: Mon, 9 Mar 2026 09:57:16 -0700 Subject: [PATCH 1/5] add pulp, pyomo integration tests --- ci/test_wheel_cuopt.sh | 2 ++ ci/thirdparty-testing/run_pulp_tests.sh | 43 ++++++++++++++++++++++++ ci/thirdparty-testing/run_pyomo_tests.sh | 34 +++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100755 ci/thirdparty-testing/run_pulp_tests.sh create mode 100755 ci/thirdparty-testing/run_pyomo_tests.sh diff --git a/ci/test_wheel_cuopt.sh b/ci/test_wheel_cuopt.sh index d761b27214..dbf25d617e 100755 --- a/ci/test_wheel_cuopt.sh +++ b/ci/test_wheel_cuopt.sh @@ -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 diff --git a/ci/thirdparty-testing/run_pulp_tests.sh b/ci/thirdparty-testing/run_pulp_tests.sh new file mode 100755 index 0000000000..ac5dc09f95 --- /dev/null +++ b/ci/thirdparty-testing/run_pulp_tests.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +set -e -u -o pipefail + +echo "building 'pulp' 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/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" diff --git a/ci/thirdparty-testing/run_pyomo_tests.sh b/ci/thirdparty-testing/run_pyomo_tests.sh new file mode 100755 index 0000000000..37dd4c088b --- /dev/null +++ b/ci/thirdparty-testing/run_pyomo_tests.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# 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 From da62b7449548595ff12e5ba4a082e59d2372b75f Mon Sep 17 00:00:00 2001 From: Ishika Roy <41401566+Iroy30@users.noreply.github.com> Date: Mon, 23 Mar 2026 23:11:45 -0500 Subject: [PATCH 2/5] Apply suggestion from @gforsyth Co-authored-by: Gil Forsyth --- ci/thirdparty-testing/run_pulp_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/thirdparty-testing/run_pulp_tests.sh b/ci/thirdparty-testing/run_pulp_tests.sh index ac5dc09f95..c06ebc727f 100755 --- a/ci/thirdparty-testing/run_pulp_tests.sh +++ b/ci/thirdparty-testing/run_pulp_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 set -e -u -o pipefail From fc0fc8c0708040987064dbae366ec0106d739977 Mon Sep 17 00:00:00 2001 From: Ishika Roy <41401566+Iroy30@users.noreply.github.com> Date: Mon, 23 Mar 2026 23:11:59 -0500 Subject: [PATCH 3/5] Apply suggestion from @gforsyth Co-authored-by: Gil Forsyth --- ci/thirdparty-testing/run_pyomo_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/thirdparty-testing/run_pyomo_tests.sh b/ci/thirdparty-testing/run_pyomo_tests.sh index 37dd4c088b..4ea176434a 100755 --- a/ci/thirdparty-testing/run_pyomo_tests.sh +++ b/ci/thirdparty-testing/run_pyomo_tests.sh @@ -1,5 +1,5 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 set -e -u -o pipefail From d498ff96ef79700435566bc7a1169990ff60ad51 Mon Sep 17 00:00:00 2001 From: Ishika Roy <41401566+Iroy30@users.noreply.github.com> Date: Tue, 24 Mar 2026 09:19:33 -0500 Subject: [PATCH 4/5] Update run_pulp_tests.sh --- ci/thirdparty-testing/run_pulp_tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/thirdparty-testing/run_pulp_tests.sh b/ci/thirdparty-testing/run_pulp_tests.sh index c06ebc727f..f9cb0ca8a5 100755 --- a/ci/thirdparty-testing/run_pulp_tests.sh +++ b/ci/thirdparty-testing/run_pulp_tests.sh @@ -4,10 +4,10 @@ set -e -u -o pipefail -echo "building 'pulp' from source and running cuOpt tests" +rapids-logger "building 'pulp' 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." + 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 @@ -23,7 +23,7 @@ python -m pip install \ pip check -echo "running PuLP tests (cuOpt-related)" +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 @@ -34,7 +34,7 @@ timeout 5m python -m pytest \ 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)" + 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 From a3de82ca97d43a4d9291bbacd41c812cca14bacb Mon Sep 17 00:00:00 2001 From: Ishika Roy <41401566+Iroy30@users.noreply.github.com> Date: Tue, 24 Mar 2026 09:21:22 -0500 Subject: [PATCH 5/5] Update run_pyomo_tests.sh --- ci/thirdparty-testing/run_pyomo_tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/thirdparty-testing/run_pyomo_tests.sh b/ci/thirdparty-testing/run_pyomo_tests.sh index 4ea176434a..f50df676c9 100755 --- a/ci/thirdparty-testing/run_pyomo_tests.sh +++ b/ci/thirdparty-testing/run_pyomo_tests.sh @@ -4,10 +4,10 @@ set -e -u -o pipefail -echo "building 'pyomo' from source and running cuOpt tests" +rapids-logger "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." + 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 @@ -23,7 +23,7 @@ python -m pip install \ pip check -echo "running Pyomo tests (cuopt_direct / cuOpt-related)" +rapids-logger "running Pyomo tests (cuopt_direct / cuOpt-related)" # Run only tests that reference cuopt (cuopt_direct solver) timeout 5m python -m pytest \ --verbose \