diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 9c7d6f95d9..21d402e0aa 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -5,13 +5,14 @@ on: [push, pull_request] jobs: codestyle: - runs-on: macos-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - - run: brew install clang-format + - run: sudo apt install -y clang-format-6.0 name: Install clang-format - - run: clang-format --version + - run: clang-format-6.0 --version - run: bash ./tools/format-code.sh name: Run code formatter + - run: git diff - run: git diff --quiet HEAD name: Check if the styling guide is followed diff --git a/tools/format-code.sh b/tools/format-code.sh index b88c5a093e..f79756cc6e 100755 --- a/tools/format-code.sh +++ b/tools/format-code.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash cwd=$(pwd) -clang-format -i --style=WebKit $cwd/src/*.h $cwd/src/*.cpp +clang-format-6.0 -i --style=WebKit $cwd/src/*.h $cwd/src/*.cpp