summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-08-05 21:32:19 -0700
committerGitHub <noreply@github.com>2021-08-05 21:32:19 -0700
commita92466a4dd1f5c2b8cb2fa05d3afa7e1f34e80af (patch)
tree03b02766d9a1984398c789538f17a5d03609ace2 /.github
parentafd5a5e8eb3bb315c7a50e22617c5529ba400c8c (diff)
downloadwabt-a92466a4dd1f5c2b8cb2fa05d3afa7e1f34e80af.tar.gz
wabt-a92466a4dd1f5c2b8cb2fa05d3afa7e1f34e80af.tar.bz2
wabt-a92466a4dd1f5c2b8cb2fa05d3afa7e1f34e80af.zip
Add clang-format check to CI (#1683)
This adds clang-format check to the CI. This only checks the diff so it doesn't affect the other parts of the codebase. Also generated files in src/prebuilt/ directories are excluded from the check. A new src/prebuilt/.clang-format is added to disable the check in the directory. scripts/clang-format-diff.sh is copied from the same file we are using in Binaryen.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 00804dcc..464c943a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -18,8 +18,11 @@ jobs:
python-version: '3.x'
- uses: actions/checkout@v1
- name: install tools
- run: pip3 install flake8==3.7.8
+ run: |
+ pip3 install flake8==3.7.8
+ sudo apt-get install clang-format
- run: flake8
+ - run: ./scripts/clang-format-diff.sh
build:
name: build
runs-on: ${{ matrix.os }}