Update build workflow to add test in an Alpine container

This commit is contained in:
Philip Hazel 2022-04-22 09:31:05 +01:00
parent 3fec24a26f
commit 1bb2b97b29
4 changed files with 60 additions and 13 deletions

View File

@ -19,5 +19,40 @@ jobs:
- name: Build - name: Build
run: make run: make
- name: Test - name: Test (main test script)
run: make check run: ./RunTest
- name: Test (JIT test program)
run: ./pcre2_jit_test
- name: Test (pcre2grep test script)
run: ./RunGrepTest
alpine:
name: alpine
runs-on: ubuntu-latest
container: alpine
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Autotools
run: apk add --no-cache automake autoconf gcc libtool make musl-dev
- name: Autogen
run: ./autogen.sh
- name: Configure
run: ./configure --enable-jit --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32
- name: Build
run: make
- name: Test (main test script)
run: ./RunTest
- name: Test (JIT test program)
run: ./pcre2_jit_test
- name: Test (pcre2grep test script)
run: ./RunGrepTest

View File

@ -2,6 +2,14 @@ Change Log for PCRE2
-------------------- --------------------
Version 10.41 xx-xxx-2022
-------------------------
1. Add fflush() before and after a fork callout in pcre2grep to get its output
to be the same on all systems. (THere were previously ordering differences in
Alpine Linux).
Version 10.40 15-April-2022 Version 10.40 15-April-2022
--------------------------- ---------------------------

View File

@ -13,7 +13,7 @@ distribution because other apparatus is needed to compile pcre2grep for z/OS.
The header can be found in the special z/OS distribution, which is available The header can be found in the special z/OS distribution, which is available
from www.zaconsultants.net or from www.cbttape.org. from www.zaconsultants.net or from www.cbttape.org.
Copyright (c) 1997-2020 University of Cambridge Copyright (c) 1997-2022 University of Cambridge
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
@ -2437,7 +2437,11 @@ if (pid == 0)
exit(1); exit(1);
} }
else if (pid > 0) else if (pid > 0)
{
(void)fflush(stdout);
(void)waitpid(pid, &result, 0); (void)waitpid(pid, &result, 0);
(void)fflush(stdout);
}
#endif /* End Windows/VMS/other handling */ #endif /* End Windows/VMS/other handling */
free(args); free(args);

20
testdata/grepoutputC vendored
View File

@ -1,26 +1,26 @@
Arg1: [T] [he ] [ ] Arg2: |T| () () (0) Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
Arg1: [T] [his] [s] Arg2: |T| () () (0)
Arg1: [T] [his] [s] Arg2: |T| () () (0)
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
The quick brown The quick brown
Arg1: [T] [his] [s] Arg2: |T| () () (0)
This time it jumps and jumps and jumps. This time it jumps and jumps and jumps.
Arg1: [T] [his] [s] Arg2: |T| () () (0)
This line contains \E and (regex) *meta* [characters]. This line contains \E and (regex) *meta* [characters].
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
The word is cat in this line The word is cat in this line
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
The caterpillar sat on the mat The caterpillar sat on the mat
Arg1: [T] [he ] [ ] Arg2: |T| () () (0)
The snowcat is not an animal The snowcat is not an animal
Arg1: [qu] [qu] Arg1: [qu] [qu]
Arg1: [ t] [ t]
Arg1: [ l] [ l]
Arg1: [wo] [wo]
Arg1: [ca] [ca]
Arg1: [sn] [sn]
The quick brown The quick brown
Arg1: [ t] [ t]
This time it jumps and jumps and jumps. This time it jumps and jumps and jumps.
Arg1: [ l] [ l]
This line contains \E and (regex) *meta* [characters]. This line contains \E and (regex) *meta* [characters].
Arg1: [wo] [wo]
The word is cat in this line The word is cat in this line
Arg1: [ca] [ca]
The caterpillar sat on the mat The caterpillar sat on the mat
Arg1: [sn] [sn]
The snowcat is not an animal The snowcat is not an animal
0:T 0:T
The quick brown The quick brown