Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit d5193e3

Browse files
committed
ci: Add a clang-ast workflow
This does compile time type-checking using a clang-plugin. It was run as part of buildbot. Link: <https://github.com/ac000/clang-ast/tree/unit-stdc%2B%2B17> Signed-off-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
1 parent cfb5200 commit d5193e3

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/clang-ast.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Clang AST"
2+
3+
on:
4+
push:
5+
branches: master
6+
paths:
7+
- configure
8+
- 'auto/**'
9+
- 'src/**'
10+
- 'test/**'
11+
- '.github/workflows/clang-ast.yaml'
12+
pull_request:
13+
branches: master
14+
paths:
15+
- configure
16+
- 'auto/**'
17+
- 'src/**'
18+
- 'test/**'
19+
- '.github/workflows/clang-ast.yaml'
20+
21+
jobs:
22+
clang-ast:
23+
runs-on: ubuntu-latest
24+
25+
container:
26+
image: debian:testing
27+
28+
steps:
29+
- name: Install tools/deps
30+
run: |
31+
apt-get -y update
32+
apt-get -y install git llvm-dev libclang-dev clang make \
33+
libssl-dev libpcre2-dev
34+
35+
- uses: actions/checkout@v4
36+
37+
- name: Checkout and build clang-ast
38+
run: |
39+
git clone https://github.com/nginx/clang-ast.git -b unit
40+
cd clang-ast
41+
make
42+
43+
- name: Configure Unit
44+
run: ./configure --cc=clang --cc-opt="-Xclang -load -Xclang clang-ast/ngx-ast.so -Xclang -add-plugin -Xclang ngx-ast" --openssl --debug --tests
45+
46+
- name: Build Unit
47+
run: |
48+
make -j4 NXT_SHARED_LOCAL_LINK=: build/lib/libnxt.so
49+
50+
- name: Build C tests
51+
run: make -j4 tests

0 commit comments

Comments
 (0)