[release][C++ API] support sanity check C++ (#18545)

This commit is contained in:
Guyang Song 2021-09-14 11:39:08 +08:00 committed by GitHub
parent bf1176311f
commit beff857cc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# This script automatically download ray and run the sanity check (sanity_check.py)
# This script automatically download ray and run the sanity check (sanity_check.py and sanity_check_cpp.sh)
# in various Python version. This script requires conda command to exist.
unset RAY_ADDRESS
@ -44,9 +44,10 @@ do
echo "========================================================="
printf "\n\n\n"
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple ray=="${RAY_VERSION}"
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple ray=="${RAY_VERSION}" ray—cpp=="${RAY_VERSION}"
failed=false
cpp_failed=false
printf "\n\n\n"
echo "========================================================="
if python sanity_check.py; then
@ -54,13 +55,21 @@ do
else
failed=true
fi
if sh sanity_check_cpp.sh; then
echo "PYTHON ${PYTHON_VERSION} succeed sanity check C++."
else
cpp_failed=true
fi
echo "========================================================="
printf "\n\n\n"
conda deactivate
conda remove -y --name "${env_name}" --all
if [ "$failed" = true ]; then
echo "PYTHON ${PYTHON_VERSION} failed sanity check."
exit 1
fi
if [ "$cpp_failed" = true ]; then
echo "PYTHON ${PYTHON_VERSION} failed sanity check C++."
exit 1
fi
done

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# This script generate a ray C++ template and run example
set -e
rm -rf ray-template && mkdir ray-template
ray cpp --generate-bazel-project-template-to ray-template
pushd ray-template && sh run.sh