-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
60 lines (57 loc) · 1.82 KB
/
Copy pathclang-tidy-plugin.yml
File metadata and controls
60 lines (57 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Ubuntu
on:
push:
branches:
- develop
- master
- release/*
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
ci_test_clang_tidy:
runs-on: ubuntu-latest
strategy:
matrix:
# clang-tidy plugins require at least Clang 16. This means that
# anything older than Ubuntu 24.04 and Debian 12 can't work at all.
include:
- distro: ubuntu:24.04
clang_version: 16
- distro: ubuntu:24.04
clang_version: 17
- distro: ubuntu:24.04
clang_version: 18
- distro: debian:12
clang_version: 16
- distro: debian:12
clang_version: 19
- distro: debian:trixie
clang_version: 17
- distro: debian:trixie
clang_version: 18
- distro: debian:trixie
clang_version: 19
container: ${{ matrix.distro }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: List files
run: ls -l
- name: Install packages
run: >-
echo distro=${{matrix.distro}} &&
echo clang_version=${{matrix.clang_version}} &&
apt-get update &&
apt-get install -y
build-essential
clang-${{ matrix.clang_version }}
clang-tidy-${{ matrix.clang_version }}
libclang-${{matrix.clang_version}}-dev
cmake ninja-build
- name: Run CMake
run: cmake -S . -B build -G Ninja -DJSON_CI=On -DJSON_ClangTidyPlugin=ON
- name: Build clang-tidy plugin
run: cmake --build build --target clang_tidy_plugin/libNlohmannJsonClangTidyPlugin.so
- name: Test clang-tidy plugin
run: cd build && ctest -V --output-on-failure -R modernize-nlohmann-json-explicit-conversions-check