Skip to content

Commit bedf144

Browse files
committed
Add Clang static analysis build
1 parent a301c04 commit bedf144

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Clang Static Analysis
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run:
7+
name: "Clang Static Analysis"
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Setup PHP
11+
uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: 8.0
14+
tools: composer, phpize
15+
16+
- name: Checkout
17+
# We use v1 due to https://github.com/actions/checkout/issues/334
18+
uses: actions/checkout@v1
19+
with:
20+
submodules: true
21+
22+
- name: Install clang-tools and libmaxminddb
23+
run: sudo apt-get install clang-tools libmaxminddb-dev
24+
25+
- name: Build extension
26+
run: |
27+
export CFLAGS="-L$HOME/libmaxminddb/lib"
28+
export CPPFLAGS="-I$HOME/libmaxminddb/include"
29+
cd ext
30+
phpize
31+
scan-build --status-bugs ./configure --with-maxminddb --enable-maxminddb-debug
32+
make clean
33+
scan-build --status-bugs make

0 commit comments

Comments
 (0)