Skip to content

Commit d12d5a1

Browse files
Fix nightly build which is failing on jq request (#78)
<!-- Thank you for contributing to cuOpt :) Here are some guidelines to help the review process go smoothly. 1. Please write a description in this text box of the changes that are being made. 2. Please ensure that you have written units tests for the changes made/features added. 3. If you are closing an issue please use one of the automatic closing words as noted here: https://help.github.com/articles/closing-issues-using-keywords/ 4. If your pull request is not ready for review but you want to make use of the continuous integration testing facilities please label it with `[WIP]`. 5. If your pull request is ready to be reviewed without requiring additional work on top of it, then remove the `[WIP]` label (if present) and replace it with `[REVIEW]`. If assistance is required to complete the functionality, for example when the C/C++ code of a feature is complete but Python bindings are still required, then add the label `[HELP-REQ]` so that others can triage and assist. The additional changes then can be implemented on top of the same PR. If the assistance is done by members of the rapidsAI team, then no additional actions are required by the creator of the original PR for this, otherwise the original author of the PR needs to give permission to the person(s) assisting to commit to their personal fork of the project. If that doesn't happen then a new PR based on the code of the original PR can be opened by the person assisting, which then will be the PR that will be merged. 6. Once all work has been done and review has taken place please do not add features or make changes out of the scope of those requested by the reviewer (doing this just add delays as already reviewed code ends up having to be re-reviewed/it is hard to tell what is new etc!). Further, please do not rebase your branch on main/force push/rewrite history, doing any of these causes the context of any comments made by reviewers to be lost. If conflicts occur against main they should be resolved by merging main into the branch used for making the pull request. Many thanks in advance for your cooperation! --> `jq` option doesn't work with gh workflow command and needs to be move to separate command.
1 parent 13ca7f6 commit d12d5a1

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

.github/workflows/nightly.yaml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,35 @@ jobs:
2323
export DATE=$(date +%F)
2424
export SHA=$(gh api -q '.commit.sha' "repos/nvidia/cuopt/branches/${CUOPT_BRANCH}")
2525
26-
RUN_ID=$(gh workflow run build.yaml \
27-
-f branch=${CUOPT_BRANCH} \
28-
-f sha=${SHA} \
29-
-f date=${DATE} \
30-
-f build_type=nightly \
31-
--json databaseId --jq '.databaseId')
26+
gh workflow run build.yaml \
27+
-f branch="${CUOPT_BRANCH}" \
28+
-f sha="${SHA}" \
29+
-f date="${DATE}" \
30+
-f build_type=nightly
31+
32+
# Wait a short bit for the workflow to register (optional)
33+
sleep 3
34+
35+
# Get the latest run ID for this workflow on this branch
36+
RUN_ID=$(gh run list --workflow=build.yaml --branch="${CUOPT_BRANCH}" --json databaseId --limit 1 | jq -r '.[0].databaseId')
37+
38+
STATUS=$(gh run view $RUN_ID --json status,conclusion --jq '.status')
39+
CONCLUSION=$(gh run view $RUN_ID --json status,conclusion --jq '.conclusion')
40+
41+
while [[ "$STATUS" != "completed" || "$CONCLUSION" == "null" ]]; do
42+
echo "Status: $STATUS, Conclusion: $CONCLUSION — waiting 10 seconds..."
43+
sleep 10
44+
STATUS=$(gh run view $RUN_ID --json status,conclusion --jq '.status')
45+
CONCLUSION=$(gh run view $RUN_ID --json status,conclusion --jq '.conclusion')
46+
done
47+
48+
echo "Workflow run finished with conclusion: $CONCLUSION"
49+
50+
if [[ "$CONCLUSION" != "success" ]]; then
51+
echo "Build did not succeed"
52+
exit 1
53+
fi
3254
33-
# Wait for workflow to complete
34-
gh run watch $RUN_ID
3555
3656
trigger-test:
3757
runs-on: ubuntu-latest

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
secrets: inherit
3232
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.06
3333
with:
34+
run_codecov: false
3435
build_type: ${{ inputs.build_type }}
3536
branch: ${{ inputs.branch }}
3637
date: ${{ inputs.date }}

0 commit comments

Comments
 (0)