Skip to content

Commit

Permalink
CI checks improvement: add clang-format check
Browse files Browse the repository at this point in the history
  • Loading branch information
neatudarius committed Jun 13, 2024
1 parent 32b1d41 commit 18f92ef
Showing 1 changed file with 36 additions and 20 deletions.
56 changes: 36 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ on:
branches: [ main ]

jobs:
lint:
name: Lint C++
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: 'file' # Use .clang-format config file
tidy-checks: '' # Use .clang-tidy config file
# only 'update' a single comment in a pull request's thread.
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1

build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
Expand All @@ -17,30 +35,30 @@ jobs:
matrix:
config:
- {
name: "Ubuntu Clang 17",
os: ubuntu-24.04,
toolchain: "clang-17-toolchain.cmake",
clang_version: 17,
installed_clang_version: 14,
cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "
name: "Ubuntu Clang 17",
os: ubuntu-24.04,
toolchain: "clang-17-toolchain.cmake",
clang_version: 17,
installed_clang_version: 14,
cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "
}

- {
name: "Ubuntu Clang 18",
os: ubuntu-24.04,
toolchain: "clang-18-toolchain.cmake",
clang_version: 18,
installed_clang_version: 14,
cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "
name: "Ubuntu Clang 18",
os: ubuntu-24.04,
toolchain: "clang-18-toolchain.cmake",
clang_version: 18,
installed_clang_version: 14,
cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "
}

- {
name: "Ubuntu Clang 19",
os: ubuntu-24.04,
toolchain: "clang-19-toolchain.cmake",
clang_version: 19,
installed_clang_version: 14,
cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "
name: "Ubuntu Clang 19",
os: ubuntu-24.04,
toolchain: "clang-19-toolchain.cmake",
clang_version: 19,
installed_clang_version: 14,
cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "
}

- {
Expand Down Expand Up @@ -95,14 +113,12 @@ jobs:
sudo ./llvm.sh ${{matrix.config.clang_version}} all
sudo apt-get install libc++-dev libc++1 libc++abi-dev libc++abi1
- name: Install GCC 14
if: matrix.config.name == 'Ubuntu GCC 14'
run: |
sudo apt update
sudo apt-get install g++-14
- name: Configure
run: |
mkdir -p .build
Expand Down

0 comments on commit 18f92ef

Please sign in to comment.