Skip to content
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

[CI] Verify bazel buildifier is run and changes committed #1700

Merged
merged 2 commits into from
Dec 8, 2022
Merged
Changes from 1 commit
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
Next Next commit
Check buildifier is run
  • Loading branch information
sjain-stanford committed Dec 8, 2022
commit a572b4001be5f2c71572092b17286c7edc6c5fc0
12 changes: 12 additions & 0 deletions .github/workflows/bazelBuildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ jobs:
torch-mlir:ci \
bazel test @torch-mlir//test/...

- name: Verify buildifier was run (bazel lint)
run: |
docker run --rm \
-v "$(pwd)":"/opt/src/torch-mlir" \
-v "${HOME}/.cache/bazel":"/root/.cache/bazel" \
torch-mlir:ci \
bazel run @torch-mlir//:buildifier
if [ -n "$(git status --porcelain)" ]; then
echo "Please 'bazel run @torch-mlir//:buildifier' and commit changes."
exit 1
fi

# Switch back bazel cache directory to user ownership
# to allow GHA post-cache step to save cache without
# permissions issue.
Expand Down