Skip to content

Commit 6b8956e

Browse files
author
Marc Stern
authored
Merge pull request #3078 from airween/v2/ciworklowinstall
feat: Add more steps: install built module and restart the server
2 parents 705002b + 462bf70 commit 6b8956e

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

.github/security2.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
LoadModule security2_module /usr/lib/apache2/modules/mod_security2.so
2+
3+
<IfModule security2_module>
4+
SecDataDir /var/cache/modsecurity
5+
Include /etc/apache2/modsecurity.conf
6+
</IfModule>

.github/workflows/ci.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,24 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-22.04]
13-
platform: [x64]
14-
compiler: [gcc]
13+
platform: [x32, x64]
14+
compiler: [gcc, clang]
1515
configure:
16-
- {label: "with pcre2", opt: "--with-pcre2" }
17-
- {label: "with lua", opt: "--with-lua" }
18-
- {label: "wo lua", opt: "--without-lua" }
16+
- {label: "with pcre, no study, no jit", opt: "--enable-pcre-study=no" }
17+
- {label: "with pcre, with study, no jit", opt: "--enable-pcre-study=yes" }
18+
- {label: "with pcre, no study, with jit", opt: "--enable-pcre-study=no --enable-pcre-jit" }
19+
- {label: "with pcre, with study, with jit", opt: "--enable-pcre-study=yes --enable-pcre-jit" }
20+
- {label: "with pcre2", opt: "--with-pcre2 --enable-pcre-study=no" }
21+
- {label: "with pcre2, with study, no jit", opt: "--with-pcre2 --enable-pcre-study=yes" }
22+
- {label: "with pcre2, no study, with jit", opt: "--with-pcre2 --enable-pcre-study=no --enable-pcre-jit" }
23+
- {label: "with pcre2, with study, with jit", opt: "--with-pcre2 --enable-pcre-study=yes --enable-pcre-jit" }
24+
- {label: "with lua", opt: "--with-lua" }
25+
- {label: "wo lua", opt: "--without-lua" }
1926
steps:
2027
- name: Setup Dependencies
2128
run: |
2229
sudo apt-get update -y -qq
23-
sudo apt-get install -y apache2-dev libxml2-dev liblua5.1-0-dev libcurl4-gnutls-dev libpcre2-dev pkg-config libyajl-dev
30+
sudo apt-get install -y apache2-dev libxml2-dev liblua5.1-0-dev libcurl4-gnutls-dev libpcre2-dev pkg-config libyajl-dev apache2 apache2-bin apache2-data
2431
- uses: actions/checkout@v2
2532
- name: autogen.sh
2633
run: ./autogen.sh
@@ -29,3 +36,16 @@ jobs:
2936
- uses: ammaraskar/gcc-problem-matcher@master
3037
- name: make
3138
run: make -j `nproc`
39+
- name: install module
40+
run: sudo make install
41+
- name: prepare config
42+
run: |
43+
sudo cp .github/security2.conf /etc/apache2/mods-enabled/
44+
sudo cp modsecurity.conf-recommended /etc/apache2/modsecurity.conf
45+
sudo cp unicode.mapping /etc/apache2/
46+
sudo mkdir -p /var/cache/modsecurity
47+
sudo chown -R www-data:www-data /var/cache/modsecurity
48+
- name: start apache with module
49+
run: |
50+
sudo systemctl restart apache2.service
51+

0 commit comments

Comments
 (0)