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
- - {label: "wo lmdb", opt: "--without-lmdb" }
21
- - {label: "with pcre2", opt: "--with-pcre2" }
22
23
- {label: "wo lua", opt: "--without-lua" }
23
- - {label: "without maxmind", opt: "--without-maxmind" }
24
+ - {label: "wo maxmind", opt: "--without-maxmind" }
25
+ - {label: "wo libxml", opt: "--without-libxml" }
26
+ - {label: "wo geoip", opt: "--without-geoip" }
27
+ - {label: "wo ssdeep", opt: "--without-ssdeep" }
28
+ - {label: "with lmdb", opt: "--with-lmdb" }
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
+ bison flex
48
+ - name : Setup Dependencies (x32)
49
+ if : ${{ matrix.platform.label == 'x32' }}
50
+ run : |
51
+ sudo apt-get install g++-multilib
52
+ sudo apt-get install -y libxml2-dev:${{ matrix.platform.arch }} \
53
+ libpcre3-dev:${{ matrix.platform.arch }}
54
+ - name : Setup Dependencies (x64)
55
+ if : ${{ matrix.platform.label == 'x64' }}
56
+ run : |
57
+ sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \
58
+ libfuzzy-dev:${{ matrix.platform.arch }}
29
59
- uses : actions/checkout@v4
30
60
with :
31
61
submodules : true
32
62
- name : build.sh
33
63
run : ./build.sh
34
- - name : configure ${{ matrix.configure.label }}
35
- run : ./configure ${{ matrix.configure.opt }}
64
+ - name : configure
65
+ env :
66
+ CC : ${{ matrix.compiler.cc }}
67
+ CXX : ${{ matrix.compiler.cxx }}
68
+ run : ./configure ${{ matrix.platform.configure }} ${{ matrix.configure.opt }}
36
69
- uses : ammaraskar/gcc-problem-matcher@master
37
70
- name : make
38
71
run : make -j `nproc`
39
72
- name : check
40
73
run : make check
41
74
42
75
build-macos :
76
+ name : macOS (${{ matrix.configure.label }})
43
77
runs-on : ${{ matrix.os }}
44
78
strategy :
45
79
matrix :
46
80
os : [macos-12]
47
- compiler : [clang]
48
81
configure :
49
82
- {label: "with parser generation", opt: "--enable-parser-generation" }
50
83
- {label: "wo curl", opt: "--without-curl" }
51
- - {label: "wo yajl", opt: "--without-yajl" }
52
- - {label: "wo geoip", opt: "--without-geoip" }
53
- - {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 lmdb", opt: "--with-lmdb" }
90
+ - {label: "with pcre2", opt: "--with-pcre2" }
57
91
steps :
58
92
- name : Setup Dependencies
93
+ # autoconf, curl, pcre2 not installed because they're already
94
+ # included in the image
59
95
run : |
60
- brew install autoconf automake cppcheck lmdb libyaml lua ssdeep libmaxminddb bison
96
+ brew install automake \
97
+ yajl \
98
+ lmdb \
99
+ lua \
100
+ libmaxminddb \
101
+ libxml2 \
102
+ geoip \
103
+ ssdeep \
104
+ pcre \
105
+ bison \
106
+ flex
61
107
- uses : actions/checkout@v4
62
108
with :
63
109
submodules : true
64
110
- name : build.sh
65
111
run : ./build.sh
66
- - name : configure ${{ matrix.configure.label }}
112
+ - name : configure
67
113
run : ./configure ${{ matrix.configure.opt }}
68
114
- uses : ammaraskar/gcc-problem-matcher@master
69
115
- name : make
@@ -72,19 +118,21 @@ jobs:
72
118
run : make check
73
119
74
120
build-windows :
121
+ name : Windows (${{ matrix.platform.label }}, ${{ matrix.configure.label }})
75
122
runs-on : ${{ matrix.os }}
76
123
strategy :
77
124
matrix :
78
125
os : [windows-2022]
79
- platform : [x86_64]
126
+ platform :
127
+ - {label: "x64", arch: "x86_64"}
80
128
configuration : [Release]
81
129
configure :
82
130
- {label: "full", opt: "" }
131
+ - {label: "wo curl", opt: "-DWITHOUT_CURL=ON" }
83
132
- {label: "wo lmdb", opt: "-DWITHOUT_LMDB=ON" }
84
133
- {label: "wo lua", opt: "-DWITHOUT_LUA=ON" }
85
- - {label: "wo libxml2", opt: "-WITHOUT_LIBXML2=ON" }
86
134
- {label: "wo maxmind", opt: "-DWITHOUT_MAXMIND=ON" }
87
- - {label: "wo curl ", opt: "-DWITHOUT_CURL =ON" }
135
+ - {label: "wo libxml ", opt: "-WITHOUT_LIBXML2 =ON" }
88
136
steps :
89
137
- uses : actions/checkout@v4
90
138
with :
94
142
pip3 install conan --upgrade
95
143
conan profile detect
96
144
- uses : ammaraskar/msvc-problem-matcher@master
97
- - name : Build ${{ matrix.configuration }} ${{ matrix.platform }} ${{ matrix.configure.label }}
145
+ - name : Build ${{ matrix.configuration }} ${{ matrix.platform.arch }} ${{ matrix.configure.label }}
98
146
shell : cmd
99
- run : vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform }} NO_ASAN "${{ matrix.configure.opt }}"
147
+ run : vcbuild.bat ${{ matrix.configuration }} ${{ matrix.platform.arch }} NO_ASAN "${{ matrix.configure.opt }}"
100
148
- name : Set up test environment
101
149
working-directory : build\win32\build\${{ matrix.configuration }}
102
150
env :
@@ -140,4 +188,4 @@ jobs:
140
188
./build.sh
141
189
./configure
142
190
- name : Run cppcheck on libModSecurity
143
- run : make check-static
191
+ run : make check-static
0 commit comments