Skip to content

Commit 1bb2b97

Browse files
committed
Update build workflow to add test in an Alpine container
1 parent 3fec24a commit 1bb2b97

File tree

4 files changed

+60
-13
lines changed

4 files changed

+60
-13
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,40 @@ jobs:
1919
- name: Build
2020
run: make
2121

22-
- name: Test
23-
run: make check
22+
- name: Test (main test script)
23+
run: ./RunTest
24+
25+
- name: Test (JIT test program)
26+
run: ./pcre2_jit_test
27+
28+
- name: Test (pcre2grep test script)
29+
run: ./RunGrepTest
30+
31+
alpine:
32+
name: alpine
33+
runs-on: ubuntu-latest
34+
container: alpine
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v2
38+
39+
- name: Autotools
40+
run: apk add --no-cache automake autoconf gcc libtool make musl-dev
41+
42+
- name: Autogen
43+
run: ./autogen.sh
44+
45+
- name: Configure
46+
run: ./configure --enable-jit --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32
47+
48+
- name: Build
49+
run: make
50+
51+
- name: Test (main test script)
52+
run: ./RunTest
53+
54+
- name: Test (JIT test program)
55+
run: ./pcre2_jit_test
56+
57+
- name: Test (pcre2grep test script)
58+
run: ./RunGrepTest

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ Change Log for PCRE2
22
--------------------
33

44

5+
Version 10.41 xx-xxx-2022
6+
-------------------------
7+
8+
1. Add fflush() before and after a fork callout in pcre2grep to get its output
9+
to be the same on all systems. (THere were previously ordering differences in
10+
Alpine Linux).
11+
12+
513
Version 10.40 15-April-2022
614
---------------------------
715

src/pcre2grep.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ distribution because other apparatus is needed to compile pcre2grep for z/OS.
1313
The header can be found in the special z/OS distribution, which is available
1414
from www.zaconsultants.net or from www.cbttape.org.
1515
16-
Copyright (c) 1997-2020 University of Cambridge
16+
Copyright (c) 1997-2022 University of Cambridge
1717
1818
-----------------------------------------------------------------------------
1919
Redistribution and use in source and binary forms, with or without
@@ -2437,7 +2437,11 @@ if (pid == 0)
24372437
exit(1);
24382438
}
24392439
else if (pid > 0)
2440+
{
2441+
(void)fflush(stdout);
24402442
(void)waitpid(pid, &result, 0);
2443+
(void)fflush(stdout);
2444+
}
24412445
#endif /* End Windows/VMS/other handling */
24422446

24432447
free(args);

testdata/grepoutputC

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
2-
Arg1: [T] [his] [s] Arg2: |T| () () (0)
3-
Arg1: [T] [his] [s] Arg2: |T| () () (0)
4-
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
5-
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
6-
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
72
The quick brown
3+
Arg1: [T] [his] [s] Arg2: |T| () () (0)
84
This time it jumps and jumps and jumps.
5+
Arg1: [T] [his] [s] Arg2: |T| () () (0)
96
This line contains \E and (regex) *meta* [characters].
7+
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
108
The word is cat in this line
9+
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
1110
The caterpillar sat on the mat
11+
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
1212
The snowcat is not an animal
1313
Arg1: [qu] [qu]
14-
Arg1: [ t] [ t]
15-
Arg1: [ l] [ l]
16-
Arg1: [wo] [wo]
17-
Arg1: [ca] [ca]
18-
Arg1: [sn] [sn]
1914
The quick brown
15+
Arg1: [ t] [ t]
2016
This time it jumps and jumps and jumps.
17+
Arg1: [ l] [ l]
2118
This line contains \E and (regex) *meta* [characters].
19+
Arg1: [wo] [wo]
2220
The word is cat in this line
21+
Arg1: [ca] [ca]
2322
The caterpillar sat on the mat
23+
Arg1: [sn] [sn]
2424
The snowcat is not an animal
2525
0:T
2626
The quick brown

0 commit comments

Comments
 (0)