File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Presubmits
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ # Run clang-format and verify there are no errors. We don't want to bother
8+ # building until we've at least got clean code.
9+ # TODO(benvanik): add other checks (license, etc).
10+ lint :
11+ name : Code Style Check
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Installing dependencies
15+ run : |
16+ sudo add-apt-repository -y "deb http://mirror.enzu.com/ubuntu/ eoan main universe"
17+ sudo apt-get update -qq
18+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends clang-format-9
19+ wget https://raw.githubusercontent.com/llvm-mirror/clang/master/tools/clang-format/git-clang-format -O /tmp/git-clang-format
20+ chmod +x /tmp/git-clang-format
21+ - name : Checking out latest version and all submodules
22+ run : |
23+ git clone https://github.com/$GITHUB_REPOSITORY $GITHUB_WORKSPACE --no-checkout --no-tags
24+ git checkout $GITHUB_SHA
25+ - name : Running clang-format on changed source files
26+ # TODO(benvanik): actually filter to changed files.
27+ run : |
28+ /tmp/git-clang-format origin/master --binary=clang-format-9
29+ git diff --exit-code
You can’t perform that action at this time.
0 commit comments