mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 16:31:25 +08:00
Try to address linting issues (#8485)
This commit is contained in:
@@ -57,13 +57,11 @@ jobs:
|
||||
BAZEL_CACHE_CREDENTIAL_B64: ${{ secrets.BAZEL_CACHE_CREDENTIAL_B64 }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
#LINUX_WHEELS: 1
|
||||
LINT: 1
|
||||
#MAC_WHEELS: 1
|
||||
RAY_DEFAULT_BUILD: 1
|
||||
WINDOWS_WHEELS: 1
|
||||
run: |
|
||||
. ./ci/travis/ci.sh init
|
||||
. ./ci/travis/ci.sh lint
|
||||
. ./ci/travis/ci.sh build
|
||||
. ./ci/travis/ci.sh upload_wheels || true
|
||||
. ./ci/travis/ci.sh test_python
|
||||
|
||||
@@ -143,7 +143,7 @@ if [ "$RAY_BUILD_PYTHON" == "YES" ]; then
|
||||
# Install pickle5-backport.
|
||||
TEMP_DIR="$(mktemp -d)"
|
||||
pushd "$TEMP_DIR"
|
||||
wget --quiet -O pickle5-backport.zip https://github.com/suquark/pickle5-backport/archive/8ffe41ceba9d5e2ce8a98190f6b3d2f3325e5a72.zip
|
||||
curl -f -s -L -R -o "pickle5-backport.zip" "https://github.com/suquark/pickle5-backport/archive/8ffe41ceba9d5e2ce8a98190f6b3d2f3325e5a72.zip"
|
||||
unzip pickle5-backport.zip
|
||||
pushd pickle5-backport-8ffe41ceba9d5e2ce8a98190f6b3d2f3325e5a72
|
||||
CC=gcc "$PYTHON_EXECUTABLE" setup.py --quiet bdist_wheel
|
||||
|
||||
@@ -5,7 +5,7 @@ if [ -z "${TRAVIS_PULL_REQUEST-}" ] || [ "${TRAVIS_PULL_REQUEST}" = "false" ]; t
|
||||
base_commit="HEAD^"
|
||||
echo "Running clang-format against parent commit $(git rev-parse "$base_commit")"
|
||||
else
|
||||
base_commit="$TRAVIS_BRANCH"
|
||||
base_commit="$(git merge-base "${TRAVIS_BRANCH}" HEAD)"
|
||||
echo "Running clang-format against branch $base_commit, with hash $(git rev-parse "$base_commit")"
|
||||
fi
|
||||
exclude_regex="(.*thirdparty/|.*redismodule.h|.*.java|.*.jsx?|.*.tsx?)"
|
||||
|
||||
+13
-5
@@ -262,10 +262,14 @@ build_wheels() {
|
||||
}
|
||||
|
||||
lint_readme() {
|
||||
(
|
||||
cd "${WORKSPACE_DIR}"/python
|
||||
python setup.py check --restructuredtext --strict --metadata
|
||||
)
|
||||
if python -s -c "import docutils" >/dev/null 2>/dev/null; then
|
||||
(
|
||||
cd "${WORKSPACE_DIR}"/python
|
||||
python setup.py check --restructuredtext --strict --metadata
|
||||
)
|
||||
else
|
||||
echo "Skipping README lint because the docutils package is not installed" 1>&2
|
||||
fi
|
||||
}
|
||||
|
||||
lint_python() {
|
||||
@@ -310,7 +314,11 @@ _lint() {
|
||||
linux*) platform=linux;;
|
||||
esac
|
||||
|
||||
"${ROOT_DIR}"/check-git-clang-format-output.sh
|
||||
if command -v clang-format > /dev/null; then
|
||||
"${ROOT_DIR}"/check-git-clang-format-output.sh
|
||||
else
|
||||
{ echo "WARNING: Skipping linting C/C++ as clang-format is not installed."; } 2> /dev/null
|
||||
fi
|
||||
|
||||
# Run Python linting
|
||||
lint_python
|
||||
|
||||
Reference in New Issue
Block a user