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
40 changes: 40 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ on:
description: "build_type: one of [branch, nightly, pull-request]"
type: string
default: nightly
# Triggering 'test.yaml' from inside 'build.yaml' allows the use of the 'needs:' mechanism
# to ensure tests only start runniing once the builds they need are complete.
trigger-tests:
description: |
If 'true', trigger the test workflow after all builds complete.
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -213,6 +220,39 @@ jobs:
date: ${{ inputs.date }}
package-name: cuopt_sh_client
package-type: python
tests:
# Docker image build / tests aren't necessary for the 'test.yaml' workflow,
# so 'test.yaml' can be triggered without waiting for those.
needs:
- upload-conda
- wheel-publish-cuopt
- wheel-publish-cuopt-mps-parser
- wheel-publish-cuopt-server
- wheel-publish-cuopt-sh-client
- wheel-publish-libcuopt
if: inputs.trigger-tests
runs-on: ubuntu-latest
# ref: https://docs.github.com/en/actions/reference/security/secure-use#use-an-intermediate-environment-variable
env:
GH_TOKEN: ${{ github.token }}
INPUT_BRANCH: "${{ inputs.branch }}"
INPUT_BUILD_TYPE: "${{ inputs.build_type }}"
INPUT_DATE: "${{ inputs.date }}"
INPUT_SHA: "${{ inputs.sha }}"
steps:
- name: trigger-test-workflow
run: |
# NOTE: '--ref' is the branch to pull the workflow file from, 'branch' input is the branch
# to pull the actual cuOpt source code from
gh workflow run \
--repo NVIDIA/cuopt \
--ref "${{ github.ref }}" \
'test.yaml' \
-f branch="${INPUT_BRANCH}" \
-f build_type="${INPUT_BUILD_TYPE}" \
-f date="${INPUT_DATE}" \
-f sha="${INPUT_SHA}"

build-images:
needs:
- wheel-publish-cuopt
Expand Down
63 changes: 11 additions & 52 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on:


jobs:
trigger-build:
trigger-nightly-builds-and-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
include:
Expand All @@ -23,55 +24,13 @@ jobs:
export DATE=$(date +%F)
export SHA=$(gh api -q '.commit.sha' "repos/nvidia/cuopt/branches/${CUOPT_BRANCH}")

gh workflow run build.yaml \
# NOTE: '--ref' is the branch to pull the workflow file from, 'branch' input is the branch
# to pull the actual cuOpt source code from
gh workflow run build.yaml \
--repo NVIDIA/cuopt \
--ref "${{ github.ref }}" \
-f branch="${CUOPT_BRANCH}" \
-f sha="${SHA}" \
-f date="${DATE}" \
-f build_type=nightly

# Wait a short bit for the workflow to register (optional)
sleep 3

# Get the latest run ID for this workflow on this branch
RUN_ID=$(gh run list --workflow=build.yaml --branch="${CUOPT_BRANCH}" --json databaseId --limit 1 | jq -r '.[0].databaseId')

STATUS=$(gh run view $RUN_ID --json status,conclusion --jq '.status')
CONCLUSION=$(gh run view $RUN_ID --json status,conclusion --jq '.conclusion')

while [[ "$STATUS" != "completed" || "$CONCLUSION" == "null" ]]; do
echo "Status: $STATUS, Conclusion: $CONCLUSION — waiting 10 seconds..."
sleep 10
STATUS=$(gh run view $RUN_ID --json status,conclusion --jq '.status')
CONCLUSION=$(gh run view $RUN_ID --json status,conclusion --jq '.conclusion')
done

echo "Workflow run finished with conclusion: $CONCLUSION"

if [[ "$CONCLUSION" != "success" ]]; then
echo "Build did not succeed"
exit 1
fi


trigger-test:
runs-on: ubuntu-latest
needs: trigger-build
strategy:
matrix:
include:
- cuopt_version: "25.10"
steps:
- uses: actions/checkout@v4
- name: Trigger Test
env:
GH_TOKEN: ${{ github.token }}
run: |
export CUOPT_BRANCH="branch-${{ matrix.cuopt_version }}"
export DATE=$(date +%F)
export SHA=$(gh api -q '.commit.sha' "repos/nvidia/cuopt/branches/${CUOPT_BRANCH}")

gh workflow run test.yaml \
-f branch=${CUOPT_BRANCH} \
-f sha=${SHA} \
-f date=${DATE} \
-f build_type=nightly
-f build_type=nightly \
-f date="${DATE}" \
-f sha="${SHA}" \
-f trigger-tests="true"
2 changes: 2 additions & 0 deletions .github/workflows/test_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ on:
jobs:

prepare:
name: test-images (prepare)
runs-on: ubuntu-latest
outputs:
CUDA_SHORT: ${{ steps.trim.outputs.CUDA_SHORT }}
Expand All @@ -50,6 +51,7 @@ jobs:
echo "PYTHON_SHORT=$PYTHON_SHORT" >> $GITHUB_OUTPUT

test:
name: test-images (${{ inputs.ARCH }}, ${{ inputs.IMAGE_TAG_PREFIX }}-cuda${{ needs.prepare.outputs.CUDA_SHORT }}-py${{ needs.prepare.outputs.PYTHON_SHORT }})
runs-on: "linux-${{ inputs.ARCH }}-gpu-a100-latest-1"
needs: prepare
container:
Expand Down
2 changes: 1 addition & 1 deletion docs/cuopt/source/cuopt-server/quick-start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Step 2: Once given access, users can find `cuOpt container <https://catalog.ngc.
Step 3: Access NGC registry:

* Log into NGC using the invite and choose the appropriate NGC org.
* Generate an NGC API key from settings. If you have not generated an API Key, you can generate it by going to the Setup option in your profile and choose Get API Key. Store this or generate a new one next time. More information can be found `here <https://docs.nvidia.com/ngc/ngc-private-registry-user-guide/index.html#generating-api-key>`_.
* Generate an NGC API key from settings. If you have not generated an API Key, you can generate it by going to the Setup option in your profile and choose Get API Key. Store this or generate a new one next time. More information can be found `here <https://docs.nvidia.com/ngc/latest/ngc-private-registry-user-guide.html#generating-a-personal-api-key>`_.

Step 4: Pull the container:

Expand Down
2 changes: 1 addition & 1 deletion docs/cuopt/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ General FAQ

1. Log into NGC using the invite and choose the appropriate NGC org.

2. Generate an NGC API key from settings. If you have not generated an API Key, you can generate it by going to the Setup option in your profile and choose `Get API Key <https://docs.nvidia.com/ngc/gpu-cloud/ngc-private-registry-user-guide/index.html#generating-api-key>`_. Store this or generate a new one next time.
2. Generate an NGC API key from settings. If you have not generated an API Key, you can generate it by going to the Setup option in your profile and choose `Get API Key <https://docs.nvidia.com/ngc/latest/ngc-private-registry-user-guide.html#generating-a-personal-api-key>`_. Store this or generate a new one next time.

3. Go to the container section for cuOpt and copy the pull tag for the latest image.
- Within the Select a tag dropdown, locate the container image release that you want to run.
Expand Down