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
168 changes: 124 additions & 44 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,66 +111,145 @@ jobs:
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@main
with:
files_yaml: |
test_cpp:
build_docs:
Copy link
Member Author

Choose a reason for hiding this comment

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

docs builds use GPU runners. Those runners are scarce, so it's worth skipping those jobs when they're not necessary (like when a PR only changes the Helm chart).

- '**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!ci/release/update-version-cuopt.sh'
- '!ci/release/update-version-rapids.sh'
- '!docs/**'
- '!img/**'
- '!notebooks/**'
- '!python/**'
- '!readme_pages/**'
- '!.ai/**'
- '!.coderabbit.yaml'
- '!.github/AGENTS.md'
- '!.github/CODE_OF_CONDUCT.md'
- '!.github/CODEOWNERS'
- '!.github/ISSUE_TEMPLATE/**'
- '!.github/PULL_REQUEST_TEMPLATE.md'
- '!.github/SECURITY.md'
- '!.github/.ai/**'
- '!.github/.coderabbit_review_guide.md'
- '!.github/agents/**'
- '!.github/copy-pr-bot.yaml'
- '!.github/ops-bot.yaml'
- '!.pre-commit-config.yaml'
- '!ci/build_wheel*.sh'
- '!ci/check_style.sh'
- '!ci/release/**'
- '!ci/run_ctests.sh'
- '!ci/run_*.pytests.sh'
- '!ci/test_cpp*.sh'
- '!ci/test_notebooks.sh'
- '!ci/test_python.sh'
- '!ci/test_self_hosted_service.sh'
- '!ci/test_wheel*.sh'
- '!container-builder/**'
- '!helm-chart/**'
- '!helmchart/**'
Copy link
Member Author

Choose a reason for hiding this comment

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

This directory is called helmchart/ (no -). This was wrong before.

- '!ngc/**'
- '!omniverse/**'
- '!regression/**'
- '!resources/**'
Comment on lines -128 to -130
Copy link
Member Author

Choose a reason for hiding this comment

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

These directories no longer exist in the repo.

- '!sonar-project.properties'
- '!sonarqube/**'
- '!ucf/**'
- '!utilities/**'
test_notebooks:
- '**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!ci/release/update-version-cuopt.sh'
- '!ci/release/update-version-rapids.sh'
- '!docs/**'
- '!python/nvcf_client/**'
test_python:
test_cpp:
- '**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!ci/release/update-version-cuopt.sh'
- '!ci/release/update-version-rapids.sh'
- '!.ai/**'
- '!.coderabbit.yaml'
- '!.github/AGENTS.md'
- '!.github/CODE_OF_CONDUCT.md'
- '!.github/CODEOWNERS'
- '!.github/ISSUE_TEMPLATE/**'
- '!.github/PULL_REQUEST_TEMPLATE.md'
- '!.github/SECURITY.md'
- '!.github/.ai/**'
- '!.github/.coderabbit_review_guide.md'
- '!.github/agents/**'
- '!.github/copy-pr-bot.yaml'
- '!.github/ops-bot.yaml'
- '!.pre-commit-config.yaml'
- '!ci/build_docs.sh'
- '!ci/build_python.sh'
- '!ci/build_wheel*.sh'
- '!ci/check_style.sh'
- '!ci/release/**'
- '!ci/test_python.sh'
- '!ci/test_self_hosted_service.sh'
- '!ci/test_wheel*.sh'
- '!container-builder/**'
- '!docs/**'
- '!helmchart/**'
- '!img/**'
- '!ngc/**'
- '!notebooks/**'
- '!python/nvcf_client/**'
test_python_cuopt:
- '!python/**'
- '!sonar-project.properties'
- '!sonarqube/**'
- '!ucf/**'
- '!utilities/**'
test_python_conda:
- '**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!ci/release/update-version-cuopt.sh'
- '!ci/release/update-version-rapids.sh'
- '!.ai/**'
- '!.coderabbit.yaml'
- '!.github/AGENTS.md'
- '!.github/CODE_OF_CONDUCT.md'
- '!.github/CODEOWNERS'
- '!.github/ISSUE_TEMPLATE/**'
- '!.github/PULL_REQUEST_TEMPLATE.md'
- '!.github/SECURITY.md'
- '!.github/.ai/**'
- '!.github/.coderabbit_review_guide.md'
- '!.github/agents/**'
- '!.github/copy-pr-bot.yaml'
- '!.github/ops-bot.yaml'
- '!.pre-commit-config.yaml'
- '!ci/build_docs.sh'
- '!ci/build_wheel*.sh'
- '!ci/check_style.sh'
- '!ci/release/**'
- '!ci/test_self_hosted_service.sh'
- '!ci/test_wheel*.sh'
- '!container-builder/**'
- '!docs/**'
- '!helmchart/**'
- '!img/**'
- '!ngc/**'
- '!notebooks/**'
- '!python/cuopt_self_hosted/**'
- '!python/cuopt_server/**'
- '!python/nvcf_client/**'
test_python_cuopt_server:
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm hoping the test_python_wheels: group is granular enough that we don't need test_python_cuopt_server separately.

But please do break it down into more-specific groups if you feel that's doable! The more unnecessary CI runs we can save, the better 😁

- '!sonar-project.properties'
- '!sonarqube/**'
- '!ucf/**'
- '!utilities/**'
test_python_wheels:
- '**'
- '!CONTRIBUTING.md'
- '!README.md'
- '!ci/release/update-version-cuopt.sh'
- '!ci/release/update-version-rapids.sh'
- '!docs/**'
- '!.ai/**'
- '!.coderabbit.yaml'
- '!.github/AGENTS.md'
- '!.github/CODE_OF_CONDUCT.md'
- '!.github/CODEOWNERS'
- '!.github/ISSUE_TEMPLATE/**'
- '!.github/PULL_REQUEST_TEMPLATE.md'
- '!.github/SECURITY.md'
- '!.github/.ai/**'
- '!.github/.coderabbit_review_guide.md'
- '!.github/agents/**'
- '!.github/copy-pr-bot.yaml'
- '!.github/ops-bot.yaml'
- '!.pre-commit-config.yaml'
- '!ci/build_cpp.sh'
- '!ci/build_docs.sh'
- '!ci/build_python.sh'
- '!ci/check_style.sh'
- '!ci/release/**'
- '!ci/run_ctests.sh'
- '!ci/test_python.sh'
- '!conda/**'
- '!container-builder/**'
- '!helmchart/**'
- '!img/**'
- '!ngc/**'
- '!notebooks/**'
- '!python/cuopt_self_hosted/**'
- '!python/nvcf_client/**'
- '!sonar-project.properties'
- '!sonarqube/**'
- '!ucf/**'
- '!utilities/**'
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@main
Expand All @@ -187,7 +266,7 @@ jobs:
conda-cpp-tests:
needs: [conda-cpp-build, changed-files, compute-matrix-filters]
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
script: ci/test_cpp.sh
Expand All @@ -210,7 +289,7 @@ jobs:
conda-python-tests:
needs: [conda-python-build, changed-files, compute-matrix-filters]
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_conda
Copy link
Member Author

Choose a reason for hiding this comment

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

These skips have all been disabled for the last year: https://github.com/rapidsai/cuopt/pull/2244

From that PR, I'm really not sure why or what the issue was. But either way, that's a year of running more CI than necessary, which is a waste of money and time. Hopefully we can re-enable this now... it'd help get changes integrated faster and reduce cuopt's demands on our shared CI runners.

with:
run_codecov: false
build_type: pull-request
Expand All @@ -224,9 +303,10 @@ jobs:
script-env-secret-3-key: CUOPT_AWS_SECRET_ACCESS_KEY
script-env-secret-3-value: ${{ secrets.CUOPT_AWS_SECRET_ACCESS_KEY }}
docs-build:
needs: conda-python-build
needs: [conda-python-build, changed-files]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
if: fromJSON(needs.changed-files.outputs.changed_file_groups).build_docs
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
Expand Down Expand Up @@ -271,7 +351,7 @@ jobs:
wheel-tests-cuopt:
needs: [wheel-build-cuopt, wheel-build-cuopt-mps-parser, wheel-build-cuopt-sh-client, changed-files, compute-matrix-filters]
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_cuopt
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels
with:
build_type: pull-request
script: ci/test_wheel_cuopt.sh
Expand Down Expand Up @@ -311,7 +391,7 @@ jobs:
wheel-tests-cuopt-server:
needs: [wheel-build-cuopt, wheel-build-cuopt-server, changed-files, compute-matrix-filters]
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_cuopt_server
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels
with:
build_type: pull-request
script: ci/test_wheel_cuopt_server.sh
Expand All @@ -327,7 +407,7 @@ jobs:
needs: [wheel-build-cuopt, wheel-build-cuopt-server, changed-files]
secrets: inherit
uses: ./.github/workflows/self_hosted_service_test.yaml
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels
with:
build_type: pull-request
script: ci/test_self_hosted_service.sh
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ repos:
- id: shellcheck
args: ["--severity=warning"]
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v1.2.1
rev: v1.3.3
hooks:
- id: verify-copyright
args: [--fix, --spdx]
Expand All @@ -75,6 +75,12 @@ repos:
(?x)^(
^cpp/tests/utilities/cxxopts.hpp
)
- id: verify-pyproject-license
# ignore the top-level pyproject.toml, which doesn't
# have or need a [project] table
exclude: |
(?x)
^pyproject[.]toml$
- repo: local
hooks:
- id: update-versions
Expand Down
5 changes: 3 additions & 2 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package_dir=$2

source rapids-configure-sccache
source rapids-date-string
RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

# Update the version to accomdate nightly and release changes for the wheel name
Expand All @@ -26,14 +28,13 @@ RAPIDS_PIP_WHEEL_ARGS=(
-v
--no-deps
--disable-pip-version-check
--extra-index-url=https://pypi.nvidia.com
)

# Only use --build-constraint when build isolation is enabled.
#
# Passing '--build-constraint' and '--no-build-isolation` together results in an error from 'pip',
# but we want to keep environment variable PIP_CONSTRAINT set unconditionally.
# PIP_NO_BUILD_ISOLATION=0 means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/573
# PIP_NO_BUILD_ISOLATION=0 means "add --no-build-isolation" (ref: https://github.com/pypa/pip/issues/5735)
if [[ "${PIP_NO_BUILD_ISOLATION:-}" != "0" ]]; then
RAPIDS_PIP_WHEEL_ARGS+=(--build-constraint="${PIP_CONSTRAINT}")
fi
Expand Down
2 changes: 2 additions & 0 deletions ci/build_wheel_cuopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

set -euo pipefail

RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

# Install rockylinux repo
Expand Down
4 changes: 3 additions & 1 deletion ci/build_wheel_cuopt_mps_parser.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0


set -euo pipefail

RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

package_dir="python/cuopt/cuopt/linear_programming"
Expand Down
4 changes: 3 additions & 1 deletion ci/build_wheel_cuopt_server.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

package_dir="python/cuopt_server"
Expand Down
4 changes: 3 additions & 1 deletion ci/build_wheel_cuopt_sh_client.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

package_dir="python/cuopt_self_hosted"
Expand Down
4 changes: 3 additions & 1 deletion ci/build_wheel_libcuopt.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

package_name="libcuopt"
Expand Down
5 changes: 3 additions & 2 deletions ci/test_self_hosted_service.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

# Download the cuopt built in the previous step
Expand All @@ -16,7 +18,6 @@ LIBCUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" r

# echo to expand wildcard before adding `[extra]` requires for pip
rapids-pip-retry install \
--extra-index-url=https://pypi.nvidia.com \
"${CUOPT_MPS_PARSER_WHEELHOUSE}"/cuopt_mps_parser*.whl \
"${CUOPT_WHEELHOUSE}"/cuopt*.whl \
"${LIBCUOPT_WHEELHOUSE}"/libcuopt*.whl \
Expand Down
5 changes: 3 additions & 2 deletions ci/test_wheel_cuopt.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail

# sets up a constraints file for 'pip' and puts its location in an exported variable PIP_EXPORT,
# so those constraints will affect all future 'pip install' calls
RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX="true"
export RAPIDS_INIT_PIP_REMOVE_NVIDIA_INDEX
source rapids-init-pip

# Download the packages built in the previous step
Expand All @@ -27,7 +29,6 @@ EOF

# echo to expand wildcard before adding `[extra]` requires for pip
rapids-pip-retry install \
--extra-index-url=https://pypi.nvidia.com \
--constraint "${PIP_CONSTRAINT}" \
"${CUOPT_MPS_PARSER_WHEELHOUSE}"/cuopt_mps_parser*.whl \
"$(echo "${CUOPT_WHEELHOUSE}"/cuopt*.whl)[test]" \
Expand Down
Loading