-
Notifications
You must be signed in to change notification settings - Fork 312
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
Run relevant CI tests based on what's changed in the ChangeList #2396
Changes from 1 commit
ec7009c
9041c43
ad5ca57
19c298a
2f244cd
5a8e054
ad41796
6887219
879b64b
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 |
---|---|---|
|
@@ -26,6 +26,31 @@ GTEST_ARGS="--gtest_output=xml:${CUGRAPH_ROOT}/test-results/" | |
DOWNLOAD_MODE="" | ||
EXITCODE=0 | ||
|
||
PRHTTP=https://api.github.com/repos/rapidsai/cugraph/pulls/${PR_ID}/files | ||
fnames=`curl -sb -X GET -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $GHTK" $PRHTTP | python3 -c "import sys, json; print([labels['filename'] for labels in json.load(sys.stdin)])"` | ||
cpp_changed="false" python_changed="false" nb_changed="false" doc_changed="false" | ||
for fname in ${fnames[@]} | ||
do | ||
if [[ "$fname" == *"cpp/cmake/"* || "$fname" == *"cpp/CMakeLists.txt"* || "$fname" == *"cpp/src/"* || "$fname" == *"cpp/include/"* || "$fname" == *"cpp/tests/"* || "$fname" == *"cpp/libcugraph_etl/"* || "$fname" == *"cpp/scripts/"* ]]; then | ||
cpp_changed="true" python_changed="true" nb_changed="true" doc_changed="true" | ||
fi | ||
if [[ "$fname" == *"python/"* ]]; then | ||
python_changed="true" nb_changed="true" doc_changed="true" | ||
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. It might be better to make the variable names a little more accurate, since 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. Make sense |
||
fi | ||
if [[ "$fname" == *"docs/"* ]]; then | ||
doc_changed="true" | ||
fi | ||
if [[ "$fname" == *"notebooks/"* ]]; then | ||
nb_changed="true" | ||
fi | ||
done | ||
|
||
if [[ "$nb_changed" == "false" ]]; then | ||
export NB_CHANGED="FALSE" | ||
else | ||
export NB_CHANGED="TRUE" | ||
fi | ||
|
||
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. I think this code would be more appropriate in Once this code is moved out, 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. Got it, thanks Rick 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. Somewhere around here might be a good place to print a summary of what's going to be run, what's going to be skipped, and (most importantly) why, since it might be confusing to devs who are expecting certain tests to run which end up getting skipped. 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. Fair ask, will do |
||
export RAPIDS_DATASET_ROOT_DIR=${RAPIDS_DATASET_ROOT_DIR:-${CUGRAPH_ROOT}/datasets} | ||
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. Based on the CI failures, it looks like this isn't being set properly beause 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. Sounds good |
||
|
||
# FIXME: consider using getopts for option parsing | ||
|
@@ -65,7 +90,7 @@ set +e | |
|
||
if (python ${CUGRAPH_ROOT}/ci/utils/is_pascal.py); then | ||
echo "WARNING: skipping C++ tests on Pascal GPU arch." | ||
else | ||
elif [[ "$cpp_changed" == "true" ]]; then | ||
echo "C++ gtests for cuGraph (single-GPU only)..." | ||
for gt in "${CONDA_PREFIX}/bin/gtests/libcugraph/"*_TEST; do | ||
test_name=$(basename $gt) | ||
|
@@ -84,21 +109,23 @@ else | |
done | ||
fi | ||
|
||
echo "Python pytest for pylibcugraph..." | ||
cd ${CUGRAPH_ROOT}/python/pylibcugraph/pylibcugraph | ||
pytest --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-pylibcugraph-pytests.xml -v --cov-config=.coveragerc --cov=pylibcugraph --cov-report=xml:${WORKSPACE}/python/pylibcugraph/pylibcugraph-coverage.xml --cov-report term --ignore=raft --benchmark-disable | ||
echo "Ran Python pytest for pylibcugraph : return code was: $?, test script exit code is now: $EXITCODE" | ||
if [[ "$python_changed" == "true" ]]; then | ||
echo "Python pytest for pylibcugraph..." | ||
cd ${CUGRAPH_ROOT}/python/pylibcugraph/pylibcugraph | ||
pytest --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-pylibcugraph-pytests.xml -v --cov-config=.coveragerc --cov=pylibcugraph --cov-report=xml:${WORKSPACE}/python/pylibcugraph/pylibcugraph-coverage.xml --cov-report term --ignore=raft --benchmark-disable | ||
echo "Ran Python pytest for pylibcugraph : return code was: $?, test script exit code is now: $EXITCODE" | ||
|
||
echo "Python pytest for cuGraph (single-GPU only)..." | ||
cd ${CUGRAPH_ROOT}/python/cugraph/cugraph | ||
# rmat is not tested because of MG testing | ||
pytest --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-cugraph-pytests.xml -v --cov-config=.coveragerc --cov=cugraph --cov-report=xml:${WORKSPACE}/python/cugraph/cugraph-coverage.xml --cov-report term --ignore=raft --ignore=tests/mg --ignore=tests/generators --benchmark-disable | ||
echo "Ran Python pytest for cugraph : return code was: $?, test script exit code is now: $EXITCODE" | ||
echo "Python pytest for cuGraph (single-GPU only)..." | ||
cd ${CUGRAPH_ROOT}/python/cugraph/cugraph | ||
# rmat is not tested because of MG testing | ||
pytest --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-cugraph-pytests.xml -v --cov-config=.coveragerc --cov=cugraph --cov-report=xml:${WORKSPACE}/python/cugraph/cugraph-coverage.xml --cov-report term --ignore=raft --ignore=tests/mg --ignore=tests/generators --benchmark-disable | ||
echo "Ran Python pytest for cugraph : return code was: $?, test script exit code is now: $EXITCODE" | ||
|
||
echo "Python benchmarks for cuGraph (running as tests)..." | ||
cd ${CUGRAPH_ROOT}/benchmarks | ||
pytest -v -m "managedmem_on and poolallocator_on and tiny" --benchmark-disable | ||
echo "Ran Python benchmarks for cuGraph (running as tests) : return code was: $?, test script exit code is now: $EXITCODE" | ||
echo "Python benchmarks for cuGraph (running as tests)..." | ||
cd ${CUGRAPH_ROOT}/benchmarks | ||
pytest -v -m "managedmem_on and poolallocator_on and tiny" --benchmark-disable | ||
echo "Ran Python benchmarks for cuGraph (running as tests) : return code was: $?, test script exit code is now: $EXITCODE" | ||
fi | ||
|
||
echo "Test script exiting with value: $EXITCODE" | ||
exit ${EXITCODE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the codecov step below will fail if python tests aren't run, since the python tests generate the output needed by codecov. You might try adding something to this
if
block to prevent codecov from running if python tests did not run.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks Rick