-
Notifications
You must be signed in to change notification settings - Fork 178
Don't run routing tests if PR only touches LP/MIP files #935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,6 +277,18 @@ jobs: | |
| - '!.cursor-plugin/**' | ||
| - '!.claude-plugin/**' | ||
| - '!gemini-extension.json' | ||
| has_non_lp_mip_changes: | ||
| - '**' | ||
| - '!cpp/src/math_optimization/**' | ||
| - '!cpp/src/pdlp/**' | ||
| - '!cpp/src/dual_simplex/**' | ||
| - '!cpp/src/cuts/**' | ||
| - '!cpp/src/barrier/**' | ||
| - '!cpp/src/mip_heuristics/**' | ||
| - '!cpp/src/branch_and_bound/**' | ||
| - '!cpp/tests/dual_simplex/**' | ||
| - '!cpp/tests/linear_programming/**' | ||
| - '!cpp/tests/mip/**' | ||
|
Comment on lines
+280
to
+291
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
python - <<'PY'
import pathlib
import re
workflow = pathlib.Path(".github/workflows/pr.yaml").read_text()
# Extract has_non_lp_mip_changes block
m = re.search(r'^\s*has_non_lp_mip_changes:\n((?:\s+- .+\n)+)', workflow, re.M)
if not m:
raise SystemExit("Could not find has_non_lp_mip_changes block in .github/workflows/pr.yaml")
block = m.group(1).splitlines()
excluded_prefixes = []
for line in block:
s = line.strip()
if s.startswith("- '!") and s.endswith("/**'"):
excluded_prefixes.append(s[len("- '!"):-len("/**'")])
# Candidate LP/MIP-related files in repo (heuristic by path tokens)
tokens = (
"mip", "lp", "pdlp", "dual_simplex", "linear_programming",
"math_optimization", "branch_and_bound", "barrier", "cuts"
)
candidates = []
for p in pathlib.Path(".").rglob("*"):
if not p.is_file():
continue
ps = p.as_posix()
if ".git/" in ps:
continue
low = ps.lower()
if any(t in low for t in tokens):
covered = any(ps.startswith(prefix + "/") for prefix in excluded_prefixes)
if not covered:
candidates.append(ps)
print("Excluded prefixes from has_non_lp_mip_changes:")
for ep in excluded_prefixes:
print(" -", ep)
print("\nPotential LP/MIP-related files NOT covered by exclusions:")
for c in sorted(candidates):
print(" -", c)
print(f"\nTotal uncovered candidates: {len(candidates)}")
PYRepository: NVIDIA/cuopt Length of output: 16454 Verify The exclusion list is incomplete. Currently excluded are only
PRs touching only these files will incorrectly be treated as 🤖 Prompt for AI Agents |
||
| checks: | ||
| secrets: inherit | ||
| uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@main | ||
|
|
@@ -305,6 +317,8 @@ jobs: | |
| script-env-secret-2-value: ${{ secrets.CUOPT_AWS_ACCESS_KEY_ID }} | ||
| script-env-secret-3-key: CUOPT_AWS_SECRET_ACCESS_KEY | ||
| script-env-secret-3-value: ${{ secrets.CUOPT_AWS_SECRET_ACCESS_KEY }} | ||
| script-env-secret-4-key: SKIP_ROUTING_TESTS | ||
| script-env-secret-4-value: ${{ (!fromJSON(needs.changed-files.outputs.changed_file_groups).has_non_lp_mip_changes) && 'true' || 'false' }} | ||
| conda-python-build: | ||
| needs: [conda-cpp-build, compute-matrix-filters] | ||
| secrets: inherit | ||
|
|
@@ -329,6 +343,8 @@ jobs: | |
| script-env-secret-2-value: ${{ secrets.CUOPT_AWS_ACCESS_KEY_ID }} | ||
| script-env-secret-3-key: CUOPT_AWS_SECRET_ACCESS_KEY | ||
| script-env-secret-3-value: ${{ secrets.CUOPT_AWS_SECRET_ACCESS_KEY }} | ||
| script-env-secret-4-key: SKIP_ROUTING_TESTS | ||
| script-env-secret-4-value: ${{ (!fromJSON(needs.changed-files.outputs.changed_file_groups).has_non_lp_mip_changes) && 'true' || 'false' }} | ||
| docs-build: | ||
| needs: [conda-python-build, changed-files] | ||
| secrets: inherit | ||
|
|
@@ -390,6 +406,8 @@ jobs: | |
| script-env-secret-2-value: ${{ secrets.CUOPT_AWS_ACCESS_KEY_ID }} | ||
| script-env-secret-3-key: CUOPT_AWS_SECRET_ACCESS_KEY | ||
| script-env-secret-3-value: ${{ secrets.CUOPT_AWS_SECRET_ACCESS_KEY }} | ||
| script-env-secret-4-key: SKIP_ROUTING_TESTS | ||
| script-env-secret-4-value: ${{ (!fromJSON(needs.changed-files.outputs.changed_file_groups).has_non_lp_mip_changes) && 'true' || 'false' }} | ||
| wheel-build-cuopt-server: | ||
| needs: [checks, compute-matrix-filters] | ||
| secrets: inherit | ||
|
|
@@ -430,11 +448,13 @@ jobs: | |
| script-env-secret-2-value: ${{ secrets.CUOPT_AWS_ACCESS_KEY_ID }} | ||
| script-env-secret-3-key: CUOPT_AWS_SECRET_ACCESS_KEY | ||
| script-env-secret-3-value: ${{ secrets.CUOPT_AWS_SECRET_ACCESS_KEY }} | ||
| script-env-secret-4-key: SKIP_ROUTING_TESTS | ||
| script-env-secret-4-value: ${{ (!fromJSON(needs.changed-files.outputs.changed_file_groups).has_non_lp_mip_changes) && 'true' || 'false' }} | ||
| test-self-hosted-server: | ||
| 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_wheels | ||
| if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_wheels && fromJSON(needs.changed-files.outputs.changed_file_groups).has_non_lp_mip_changes | ||
| with: | ||
| build_type: pull-request | ||
| script: ci/test_self_hosted_service.sh | ||
Uh oh!
There was an error while loading. Please reload this page.