Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI job and fix for CMake Unity build #578

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,21 @@ jobs:
cd ..
perl -v
maint/RunPerlTest

chaffinch:
name: CMake unity build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Configure
run: cmake -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=0 -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build

- name: Build
run: cd build && make -j3

- name: Test
run: cd build && make test
4 changes: 2 additions & 2 deletions src/pcre2_compile_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ static const uint32_t char_list_starts[] = {
};

static class_ranges *
optimize_class(uint32_t *start_ptr, uint32_t options,
compile_optimize_class(uint32_t *start_ptr, uint32_t options,
uint32_t xoptions, compile_block *cb)
{
class_ranges* cranges;
Expand Down Expand Up @@ -1047,7 +1047,7 @@ if (utf)
{
if (lengthptr != NULL)
{
cranges = optimize_class(pptr, options, xoptions, cb);
cranges = compile_optimize_class(pptr, options, xoptions, cb);

if (cranges == NULL)
{
Expand Down
6 changes: 3 additions & 3 deletions src/pcre2_substitute.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Returns: TRUE if a name was read
*/

static BOOL
read_name(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, BOOL utf,
read_name_subst(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, BOOL utf,
const uint8_t* ctypes)
{
PCRE2_SPTR ptr = *ptrptr;
Expand Down Expand Up @@ -758,7 +758,7 @@ do
{
PCRE2_SIZE name_len;
PCRE2_SPTR name_start = ptr;
if (!read_name(&ptr, repend, utf, code->tables + ctypes_offset))
if (!read_name_subst(&ptr, repend, utf, code->tables + ctypes_offset))
goto BAD;
name_len = ptr - name_start;
memcpy(name, name_start, CU2BYTES(name_len));
Expand Down Expand Up @@ -1068,7 +1068,7 @@ do
++ptr;

name_start = ptr;
if (!read_name(&ptr, repend, utf, code->tables + ctypes_offset))
if (!read_name_subst(&ptr, repend, utf, code->tables + ctypes_offset))
goto BADESCAPE;
name_len = ptr - name_start;

Expand Down