Skip to content

Commit 9b83a42

Browse files
committed
Merge branch 'v3/master' into process_partial_json_xml_req_body
2 parents 5576ba1 + e5d00df commit 9b83a42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1971
-2740
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name: Quality Assurance
33
on:
44
push:
55
pull_request:
6-
6+
77
jobs:
88
build-linux:
99
name: Linux (${{ matrix.platform.label }}, ${{ matrix.compiler.label }}, ${{ matrix.configure.label }})
1010
runs-on: ${{ matrix.os }}
1111
strategy:
12+
fail-fast: false
1213
matrix:
1314
os: [ubuntu-22.04]
1415
platform:
@@ -33,18 +34,49 @@ jobs:
3334
- platform: {label: "x32"}
3435
configure: {label: "wo ssdeep"}
3536
steps:
37+
- name: Detect latest Lua dev package
38+
id: detect_lua
39+
shell: bash
40+
run: |
41+
set -euo pipefail
42+
43+
sudo apt-get update -y -qq
44+
45+
CANDIDATES="$(apt-cache pkgnames | grep -E '^liblua[0-9]+\.[0-9]+-dev$' || true)"
46+
47+
if [ -z "$CANDIDATES" ]; then
48+
echo "No libluaX.Y-dev package found"
49+
exit 1
50+
fi
51+
52+
BEST_PKG="$(
53+
printf '%s\n' "$CANDIDATES" \
54+
| sed -E 's/^liblua([0-9]+\.[0-9]+)-dev$/\1 &/' \
55+
| sort -V \
56+
| tail -n1 \
57+
| awk '{print $2}'
58+
)"
59+
60+
if [ -z "$BEST_PKG" ]; then
61+
echo "Failed to determine Lua package"
62+
exit 1
63+
fi
64+
65+
echo "lua_pkg=$BEST_PKG" >> "$GITHUB_OUTPUT"
66+
echo "Using $BEST_PKG"
67+
3668
- name: Setup Dependencies (common)
3769
run: |
3870
sudo dpkg --add-architecture ${{ matrix.platform.arch }}
3971
sudo apt-get update -y -qq
4072
sudo apt-get install -y libyajl-dev:${{ matrix.platform.arch }} \
4173
libcurl4-openssl-dev:${{ matrix.platform.arch }} \
4274
liblmdb-dev:${{ matrix.platform.arch }} \
43-
liblua5.2-dev:${{ matrix.platform.arch }} \
75+
${{ steps.detect_lua.outputs.lua_pkg }}:${{ matrix.platform.arch }} \
4476
libmaxminddb-dev:${{ matrix.platform.arch }} \
4577
libpcre2-dev:${{ matrix.platform.arch }} \
4678
pcre2-utils:${{ matrix.platform.arch }} \
47-
bison flex
79+
bison flex python3 python3-venv
4880
- name: Setup Dependencies (x32)
4981
if: ${{ matrix.platform.label == 'x32' }}
5082
run: |
@@ -54,11 +86,11 @@ jobs:
5486
- name: Setup Dependencies (x64)
5587
if: ${{ matrix.platform.label == 'x64' }}
5688
run: |
57-
sudo apt-get install -y libgeoip-dev:${{ matrix.platform.arch }} \
58-
libfuzzy-dev:${{ matrix.platform.arch }}
59-
- uses: actions/checkout@v4
89+
sudo apt-get install -y libfuzzy-dev:${{ matrix.platform.arch }}
90+
91+
- uses: actions/checkout@v6
6092
with:
61-
submodules: true
93+
submodules: recursive
6294
fetch-depth: 0
6395
- name: build.sh
6496
run: ./build.sh
@@ -77,6 +109,7 @@ jobs:
77109
name: macOS (${{ matrix.configure.label }})
78110
runs-on: ${{ matrix.os }}
79111
strategy:
112+
fail-fast: false
80113
matrix:
81114
os: [macos-14]
82115
configure:
@@ -105,21 +138,12 @@ jobs:
105138
ssdeep \
106139
pcre \
107140
bison \
108-
flex
109-
- uses: actions/checkout@v4
141+
flex
142+
143+
- uses: actions/checkout@v6
110144
with:
111-
submodules: true
145+
submodules: recursive
112146
fetch-depth: 0
113-
- name: Build GeoIP
114-
run: |
115-
git clone --depth 1 --no-checkout https://github.com/maxmind/geoip-api-c.git
116-
cd geoip-api-c
117-
git fetch --tags
118-
# Check out the last release, v1.6.12
119-
git checkout 4b526e7331ca1d692b74a0509ddcc725622ed31a
120-
autoreconf --install
121-
./configure --disable-dependency-tracking --disable-silent-rules --prefix=/opt/homebrew
122-
make install
123147
- name: build.sh
124148
run: ./build.sh
125149
- name: configure
@@ -134,6 +158,7 @@ jobs:
134158
name: Windows (${{ matrix.platform.label }}, ${{ matrix.configure.label }})
135159
runs-on: ${{ matrix.os }}
136160
strategy:
161+
fail-fast: false
137162
matrix:
138163
os: [windows-2022]
139164
platform:
@@ -147,9 +172,9 @@ jobs:
147172
- {label: "wo libxml", opt: "-DWITH_LIBXML2=OFF" }
148173
- {label: "with lmdb", opt: "-DWITH_LMDB=ON" }
149174
steps:
150-
- uses: actions/checkout@v4
175+
- uses: actions/checkout@v6
151176
with:
152-
submodules: true
177+
submodules: recursive
153178
fetch-depth: 0
154179
- name: Install Conan
155180
run: |
@@ -195,9 +220,10 @@ jobs:
195220
automake \
196221
libtool \
197222
cppcheck
198-
- uses: actions/checkout@v4
223+
224+
- uses: actions/checkout@v6
199225
with:
200-
submodules: true
226+
submodules: recursive
201227
fetch-depth: 0
202228
- name: configure
203229
run: |

0 commit comments

Comments
 (0)