Skip to content

Commit

Permalink
[ci] Switch to clang-format 10
Browse files Browse the repository at this point in the history
  • Loading branch information
gergondet committed May 31, 2022
1 parent f33798e commit a3debfe
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .clang-format-common.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This script is meant to be sourced from other scripts

# Check for clang-format, prefer 6.0 if available
if [[ -x "$(command -v clang-format-6.0)" ]]; then
clang_format=clang-format-6.0
# Check for clang-format, prefer 10 if available
if [[ -x "$(command -v clang-format-10)" ]]; then
clang_format=clang-format-10
elif [[ -x "$(command -v clang-format)" ]]; then
clang_format=clang-format
else
echo "clang-format or clang-format-6.0 must be installed"
echo "clang-format or clang-format-10 must be installed"
exit 1
fi

Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,7 @@ on:
- '**'

jobs:

clang-format:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Install clang-format-6.0
run: |
sudo apt-get -qq update
sudo apt-get -qq remove clang-6.0 libclang1-6.0 libclang-common-6.0-dev libllvm6.0
sudo apt-get -qq install clang-format-6.0 clang-format
- name: Run clang-format-check
run: |
./.clang-format-check.sh
build:
needs: clang-format
strategy:
fail-fast: false
matrix:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check formatting of Tasks sources

on:
push:
paths-ignore:
# Changes to those files don't mandate running CI
- ".github/workflows/sources/*"
- ".github/workflows/build.yml"
- ".github/workflows/conan.yml"
- ".github/workflows/package.yml"
- "debian/**"
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
clang-format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install clang-format-10
run: |
sudo apt-get -qq update
sudo apt-get -qq install clang-format-10
- name: Run clang-format-check
run: |
./.clang-format-check.sh

0 comments on commit a3debfe

Please sign in to comment.