6
6
7
7
jobs :
8
8
build-linux :
9
+ name : Linux (${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }})
9
10
runs-on : ${{ matrix.os }}
10
11
strategy :
11
12
matrix :
12
13
os : [ubuntu-22.04]
13
- platform : [x32, x64]
14
- compiler : [gcc, clang]
14
+ platform :
15
+ - {label: "x64", arch: "amd64", configure: ""}
16
+ - {label: "x32", arch: "i386", configure: "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32"}
17
+ compiler :
18
+ - {label: "gcc", cc: "gcc", cxx: "g++"}
19
+ - {label: "clang", cc: "clang", cxx: "clang++"}
15
20
configure :
16
21
- {label: "with parser generation", opt: "--enable-parser-generation" }
17
22
- {label: "wo curl", opt: "--without-curl" }
18
- - {label: "wo yajl", opt: "--without-yajl" }
19
- - {label: "wo geoip", opt: "--without-geoip" }
20
23
- {label: "wo lmdb", opt: "--without-lmdb" }
21
- - {label: "with pcre2", opt: "--with-pcre2" }
22
24
- {label: "wo lua", opt: "--without-lua" }
23
- - {label: "without maxmind", opt: "--without-maxmind" }
25
+ - {label: "wo maxmind", opt: "--without-maxmind" }
26
+ - {label: "wo libxml", opt: "--without-libxml" }
27
+ - {label: "wo geoip", opt: "--without-geoip" }
28
+ - {label: "wo ssdeep", opt: "--without-ssdeep" }
29
+ - {label: "with pcre2", opt: "--with-pcre2" }
30
+ exclude :
31
+ - platform : {label: "x32"}
32
+ configure : {label: "wo geoip"}
33
+ - platform : {label: "x32"}
34
+ configure : {label: "wo ssdeep"}
24
35
steps :
25
- - name : Setup Dependencies
36
+ - name : Setup Dependencies (common)
26
37
run : |
38
+ sudo dpkg --add-architecture ${{ matrix.platform.arch }}
27
39
sudo apt-get update -y -qq
28
- sudo apt-get install -y libfuzzy-dev libyajl-dev libgeoip-dev liblua5.2-dev liblmdb-dev libmaxminddb-dev libcurl4-openssl-dev libpcre2-dev pcre2-utils
40
+ sudo apt-get install -y libyajl-dev:${{ matrix.platform.arch }} \
41
+ libcurl4-openssl-dev:${{ matrix.platform.arch }} \
42
+ liblmdb-dev:${{ matrix.platform.arch }} \
43
+ liblua5.2-dev:${{ matrix.platform.arch }} \
44
+ libmaxminddb-dev:${{ matrix.platform.arch }} \
45
+ libpcre2-dev:${{ matrix.platform.arch }} \
46
+ pcre2-utils:${{ matrix.platform.arch }}
47
+ - name : Setup Dependencies (x32)
48
+ if : ${{ matrix.platform.label == 'x32' }}
49
+ run : |
50
+ sudo apt-get install g++-multilib
51
+ sudo apt-get install -y libxml2-dev:${{ matrix.platform.arch }} \
52
+ libpcre3-dev:${{ matrix.platform.arch }}
53
+ - name : Setup Dependencies (x64)
54
+ if : ${{ matrix.platform.label == 'x64' }}
55
+ run : |
56
+ sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \
57
+ libfuzzy-dev:${{ matrix.platform.arch }}
29
58
- uses : actions/checkout@v4
30
59
with :
31
60
submodules : true
32
61
- name : build.sh
33
62
run : ./build.sh
34
- - name : configure ${{ matrix.configure.label }}
35
- run : ./configure ${{ matrix.configure.opt }}
63
+ - name : configure
64
+ env :
65
+ CC : ${{ matrix.compiler.cc }}
66
+ CXX : ${{ matrix.compiler.cxx }}
67
+ run : ./configure ${{ matrix.platform.configure }} ${{ matrix.configure.opt }}
36
68
- uses : ammaraskar/gcc-problem-matcher@master
37
69
- name : make
38
70
run : make -j `nproc`
39
71
- name : check
40
72
run : make check
41
73
42
74
build-macos :
75
+ name : macOS (${{ matrix.configure.label }})
43
76
runs-on : ${{ matrix.os }}
44
77
strategy :
45
78
matrix :
46
79
os : [macos-12]
47
- compiler : [clang]
48
80
configure :
49
81
- {label: "with parser generation", opt: "--enable-parser-generation" }
50
82
- {label: "wo curl", opt: "--without-curl" }
51
- - {label: "wo yajl", opt: "--without-yajl" }
52
- - {label: "wo geoip", opt: "--without-geoip" }
53
83
- {label: "wo lmdb", opt: "--without-lmdb" }
54
- - {label: "wo ssdeep", opt: "--without-ssdeep" }
55
84
- {label: "wo lua", opt: "--without-lua" }
56
85
- {label: "wo maxmind", opt: "--without-maxmind" }
86
+ - {label: "wo libxml", opt: "--without-libxml" }
87
+ - {label: "wo geoip", opt: "--without-geoip" }
88
+ - {label: "wo ssdeep", opt: "--without-ssdeep" }
89
+ - {label: "with pcre2", opt: "--with-pcre2" }
57
90
steps :
58
91
- name : Setup Dependencies
59
92
run : |
60
- brew install autoconf automake cppcheck lmdb libyaml lua ssdeep libmaxminddb bison
93
+ brew install autoconf \
94
+ automake \
95
+ yajl \
96
+ curl \
97
+ lmdb \
98
+ lua \
99
+ libmaxminddb \
100
+ libxml2 \
101
+ geoip \
102
+ ssdeep \
103
+ pcre \
104
+ pcre2
61
105
- uses : actions/checkout@v4
62
106
with :
63
107
submodules : true
64
108
- name : build.sh
65
109
run : ./build.sh
66
- - name : configure ${{ matrix.configure.label }}
110
+ - name : configure
67
111
run : ./configure ${{ matrix.configure.opt }}
68
112
- uses : ammaraskar/gcc-problem-matcher@master
69
113
- name : make
@@ -72,19 +116,21 @@ jobs:
72
116
run : make check
73
117
74
118
build-windows :
119
+ name : Windows (${{ matrix.platform.label }}, ${{ matrix.configure.label }})
75
120
runs-on : ${{ matrix.os }}
76
121
strategy :
77
122
matrix :
78
123
os : [windows-2022]
79
- platform : [x86_64]
124
+ platform :
125
+ - {label: "x64", arch: "x86_64"}
80
126
configuration : [Release]
81
127
configure :
82
128
- {label: "full", opt: "" }
129
+ - {label: "wo curl", opt: "-DWITHOUT_CURL=ON" }
83
130
- {label: "wo lmdb", opt: "-DWITHOUT_LMDB=ON" }
84
131
- {label: "wo lua", opt: "-DWITHOUT_LUA=ON" }
85
- - {label: "wo libxml2", opt: "-WITHOUT_LIBXML2=ON" }
86
132
- {label: "wo maxmind", opt: "-DWITHOUT_MAXMIND=ON" }
87
- - {label: "wo curl ", opt: "-DWITHOUT_CURL =ON" }
133
+ - {label: "wo libxml ", opt: "-WITHOUT_LIBXML2 =ON" }
88
134
steps :
89
135
- uses : actions/checkout@v4
90
136
with :
94
140
pip3 install conan --upgrade
95
141
conan profile detect
96
142
- uses : ammaraskar/msvc-problem-matcher@master
97
- - name : Build ${{ matrix.configuration }} ${{ matrix.platform }} ${{ matrix.configure.label }}
143
+ - name : Build ${{ matrix.configuration }} ${{ matrix.platform.arch }} ${{ matrix.configure.label }}
98
144
shell : cmd
99
- run : vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform }} NO_ASAN "${{ matrix.configure.opt }}"
145
+ run : vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform.arch }} NO_ASAN "${{ matrix.configure.opt }}"
100
146
- name : Set up test environment
101
147
working-directory : build\win32\build\${{ matrix.configuration }}
102
148
env :
@@ -140,4 +186,4 @@ jobs:
140
186
./build.sh
141
187
./configure
142
188
- name : Run cppcheck on libModSecurity
143
- run : make check-static
189
+ run : make check-static
0 commit comments