CI: Move clang format check into a seperate github workflow

This commit is contained in:
Colin Edwards
2020-04-09 20:54:04 -05:00
parent 9023a57afc
commit 8b6f6d1c85
5 changed files with 50 additions and 22 deletions

48
.github/workflows/clang-format.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Clang Format Check
on: [push, pull_request]
jobs:
ubuntu64:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install clang format
run: |
# gets us newer clang
sudo bash -c "cat >> /etc/apt/sources.list" << LLVMAPT
# 3.8
deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main
LLVMAPT
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get -qq update
sudo apt-get install -y clang-format-8
- name: Check the Formatting
run: |
./formatcode.sh
./CI/check-format.sh
macos64:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install clang-format
run: |
brew install clang-format
- name: Check the Formatting
run: |
./formatcode.sh
./CI/check-format.sh