forked from owasp-modsecurity/ModSecurity
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (105 loc) · 3.94 KB
/
ci.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Quality Assurance
on:
push:
pull_request:
jobs:
# build-linux:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-22.04]
# platform: [x32, x64]
# compiler: [gcc, clang]
# configure:
# - {label: "with parser generation", opt: "--enable-parser-generation" }
# - {label: "wo curl", opt: "--without-curl" }
# - {label: "wo yajl", opt: "--without-yajl" }
# - {label: "wo geoip", opt: "--without-geoip" }
# - {label: "wo lmdb", opt: "--without-lmdb" }
# - {label: "with pcre2", opt: "--with-pcre2" }
# - {label: "wo lua", opt: "--without-lua" }
# - {label: "without maxmind", opt: "--without-maxmind" }
# steps:
# - name: Setup Dependencies
# run: |
# sudo apt-get update -y -qq
# sudo apt-get install -y libfuzzy-dev libyajl-dev libgeoip-dev liblua5.2-dev liblmdb-dev cppcheck libmaxminddb-dev libcurl4-openssl-dev libpcre2-dev pcre2-utils
# - uses: actions/checkout@v2
# with:
# submodules: true
# - name: build.sh
# run: ./build.sh
# - name: configure ${{ matrix.configure.label }}
# run: ./configure ${{ matrix.configure.opt }}
# - uses: ammaraskar/gcc-problem-matcher@master
# - name: make
# run: make -j `nproc`
# - name: check
# run: make check
# - name: check-static
# run: make check-static
# build-macos:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [macos-12]
# compiler: [clang]
# configure:
# - {label: "with parser generation", opt: "--enable-parser-generation" }
# - {label: "wo curl", opt: "--without-curl" }
# - {label: "wo yajl", opt: "--without-yajl" }
# - {label: "wo geoip", opt: "--without-geoip" }
# - {label: "wo lmdb", opt: "--without-lmdb" }
# - {label: "wo ssdeep", opt: "--without-ssdeep" }
# - {label: "wo lua", opt: "--without-lua" }
# - {label: "wo maxmind", opt: "--without-maxmind" }
# steps:
# - name: Setup Dependencies
# run: |
# brew install autoconf automake cppcheck lmdb libyaml lua ssdeep libmaxminddb bison
# - uses: actions/checkout@v2
# with:
# submodules: true
# - name: build.sh
# run: ./build.sh
# - name: configure ${{ matrix.configure.label }}
# run: ./configure ${{ matrix.configure.opt }}
# - uses: ammaraskar/gcc-problem-matcher@master
# - name: make
# run: make -j `sysctl -n hw.logicalcpu`
# - name: check
# run: make check
cppcheck:
runs-on: [ubuntu-22.04]
steps:
# - name: Install cppcheck 2.11
# run: |
# sudo apt-get update -y -qq
# wget https://launchpad.net/ubuntu/+archive/primary/+files/cppcheck_2.11-3_amd64.deb
# sudo apt install -y ./cppcheck_2.11-3_amd64.deb
- name: Build cppcheck 2.14 # https://github.com/LessRekkless/Community-Patch-DLL/blob/788f2d67fae77be5f59fb10dc585e4a0a7871419/.github/workflows/cppcheck.yml#L24C1-L34C27
run: |
cd /tmp
git clone https://github.com/danmar/cppcheck.git
cd cppcheck
git checkout 2.14.0
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" install
cd /tmp
sudo rm -rf /tmp/cppcheck
sudo ldconfig
- name: Run Cppcheck
run: cppcheck --version
- uses: actions/checkout@v4
with:
submodules: true
- name: build.sh
run: ./build.sh
- name: configure
run: ./configure
- uses: ammaraskar/gcc-problem-matcher@master
- name: make
run: make -j `nproc`
- name: check
run: make check
- name: check-static
run: make check-static