File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,60 @@ permissions:
1010 contents : write
1111
1212jobs :
13+ format-check :
14+ name : Check code formatting
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Install clang-format-18
21+ run : |
22+ sudo apt-get update
23+ sudo apt-get install -y clang-format-18
24+
25+ - name : Check C++ formatting
26+ run : ./scripts/format.sh --check
27+
28+ tidy-check :
29+ name : Run clang-tidy checks
30+ runs-on : ubuntu-latest
31+ container : fedora:42
32+ needs : [format-check]
33+ steps :
34+ - name : Checkout code
35+ uses : actions/checkout@v4
36+
37+ - name : Install dependencies
38+ run : |
39+ dnf install -y \
40+ gcc-c++ \
41+ clang \
42+ clang-tools-extra \
43+ cmake \
44+ ninja-build \
45+ git \
46+ protobuf-devel \
47+ abseil-cpp-devel \
48+ paho-c-devel \
49+ openssl-devel
50+
51+ - name : Configure CMake
52+ env :
53+ CC : clang
54+ CXX : clang++
55+ run : cmake --preset default
56+
57+ - name : Build (for compile_commands.json)
58+ run : cmake --build build -j$(nproc)
59+
60+ - name : Run clang-tidy
61+ run : ./scripts/tidy.sh --quiet
62+
1363 build-ubuntu-dynamic :
1464 name : Build Ubuntu 24.04 (dynamic)
1565 runs-on : ubuntu-24.04
66+ needs : [tidy-check]
1667 strategy :
1768 matrix :
1869 library : [c, cpp]
@@ -110,6 +161,7 @@ jobs:
110161 name : Build Alpine Linux (static musl)
111162 runs-on : ubuntu-latest
112163 container : alpine:latest
164+ needs : [tidy-check]
113165 steps :
114166 - name : Install build dependencies
115167 run : |
@@ -144,6 +196,7 @@ jobs:
144196 name : Build Fedora 42 (dynamic)
145197 runs-on : ubuntu-latest
146198 container : fedora:42
199+ needs : [tidy-check]
147200 strategy :
148201 matrix :
149202 library : [c, cpp]
You can’t perform that action at this time.
0 commit comments