Skip to content

Commit

Permalink
Install and test zlib, bzip2 in CI builds
Browse files Browse the repository at this point in the history
Also, ensure that the libreadline and libeditline builds pass (although
we can't really test whether these work).
  • Loading branch information
NWilson committed Nov 26, 2024
1 parent 04ab344 commit a3b4474
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 29 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ jobs:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
sudo apt-get -qq update
sudo apt-get -qq install zlib1g-dev libbz2-dev
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -16,7 +21,7 @@ jobs:
run: ./autogen.sh

- name: Configure
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2

- name: Build
run: make -j2 CPPFLAGS='-Wall -Wextra -Werror'
Expand All @@ -39,7 +44,7 @@ jobs:
container: alpine
steps:
- name: Setup
run: apk add --no-cache automake autoconf gcc libtool make musl-dev git #musl-locales
run: apk add --no-cache automake autoconf gcc libtool make musl-dev git zlib zlib-dev bzip2 bzip2-dev #musl-locales

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -50,7 +55,7 @@ jobs:
run: ./autogen.sh

- name: Configure
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2

- name: Build
run: make -j2 CPPFLAGS='-Wall -Wextra -Werror'
Expand All @@ -77,7 +82,7 @@ jobs:
submodules: true

- name: Configure
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_C_FLAGS='-Wall -Wextra' -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_SUPPORT_LIBZ=ON -DPCRE2_SUPPORT_LIBBZ2=ON -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_C_FLAGS='-Wall -Wextra' -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_BUILD_TYPE=Release -B build

- name: Build
run: cmake --build build
Expand Down Expand Up @@ -134,13 +139,18 @@ jobs:
name: Code coverage
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
sudo apt-get -qq update
sudo apt-get -qq install zlib1g-dev libbz2-dev libeditline-dev
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Configure
run: CC="clang -fprofile-instr-generate -fcoverage-mapping" cmake -DCMAKE_BUILD_TYPE=Debug -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -B build
run: CC="clang -fprofile-instr-generate -fcoverage-mapping" cmake -DCMAKE_BUILD_TYPE=Debug -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_SUPPORT_LIBZ=ON -DPCRE2_SUPPORT_LIBBZ2=ON -DPCRE2_SUPPORT_LIBEDIT=ON -B build

- name: Build
run: cmake --build build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/clang-analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ jobs:
Analyze:
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
sudo apt-get -qq update
sudo apt-get -qq install ninja-build clang-tools
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Prepare
run: |
sudo apt-get -qq update
sudo apt-get -qq install ninja-build clang-tools
- name: Configure
run: |
mkdir build
Expand Down
43 changes: 24 additions & 19 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:
jobs:

canary:
# Tests with: Debug & assertions; link-size=4
# Tests with: Debug & assertions; link-size=4; libeditline
name: GCC -O0
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
sudo apt-get -qq update
sudo apt-get -qq install libeditline-dev
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -21,7 +26,7 @@ jobs:
run: ./autogen.sh

- name: Configure
run: ./configure CC='gcc -fsanitize=undefined,address -fsanitize-undefined-trap-on-error' CFLAGS='-O0 -Wall -Wextra -Werror -Wno-error=unused-but-set-parameter' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --with-link-size=4
run: ./configure CC='gcc -fsanitize=undefined,address -fsanitize-undefined-trap-on-error' CFLAGS='-O0 -Wall -Wextra -Werror -Wno-error=unused-but-set-parameter' --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-debug --enable-pcre2test-libedit --with-link-size=4

- name: Build
run: make -j3
Expand Down Expand Up @@ -94,22 +99,22 @@ jobs:
run: cd build && make test

wasp:
# Tests with: French locale; oldest supported CMake; no JIT; -Os
# Tests with: French locale; oldest supported CMake; no JIT; -Os; libreadline
name: GCC -Os, CMake+ninja, no JIT
runs-on: ubuntu-latest
env:
CMAKE_VER: "3.15.7"
steps:
- name: Setup
run: |
sudo apt-get -qq update
sudo apt-get -qq install language-pack-fr ninja-build libreadline-dev
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Prepare
run: |
sudo apt-get -qq update
sudo apt-get -qq install language-pack-fr ninja-build
- name: Cache CMake
uses: actions/cache@v4
with:
Expand All @@ -125,7 +130,7 @@ jobs:
- name: Configure
run: |
cmake --version | grep "version ${CMAKE_VER}" || (echo "CMake version mismatch" && exit 1)
CC='clang' CFLAGS='-fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-shift-base,function -pedantic -Wall -Wextra -Wpedantic -Wdeclaration-after-statement -Wshadow -Wno-overlength-strings -Werror -Wno-error=incompatible-pointer-types-discards-qualifiers' cmake -G Ninja -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DCMAKE_BUILD_TYPE=MinSizeRel -B build
CC='clang' CFLAGS='-fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-shift-base,function -pedantic -Wall -Wextra -Wpedantic -Wdeclaration-after-statement -Wshadow -Wno-overlength-strings -Werror -Wno-error=incompatible-pointer-types-discards-qualifiers' cmake -G Ninja -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DPCRE2_SUPPORT_LIBREADLINE=ON -DCMAKE_BUILD_TYPE=MinSizeRel -B build
- name: Build
run: ninja -C build
Expand Down Expand Up @@ -182,16 +187,16 @@ jobs:
name: manyconfig
runs-on: ubuntu-latest
steps:
- name: Setup
run: |
sudo apt-get update
sudo apt-get install -y valgrind
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y valgrind
- name: Run
run: |
./autogen.sh
Expand All @@ -203,16 +208,16 @@ jobs:
runs-on: ubuntu-latest
container: perl:devel
steps:
- name: Setup
run: |
apt-get -qq update
apt-get -qq install cmake ninja-build
- name: Checkout
uses: actions/checkout@v4
with:
submodules: yes

- name: Prepare
run: |
apt-get -qq update
apt-get -qq install cmake ninja-build
- name: Configure
run: cmake -G Ninja -B build -DPCRE2_BUILD_PCRE2_8=OFF -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_NEVER_BACKSLASH_C=ON -DPCRE2_DEBUG=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo

Expand Down

0 comments on commit a3b4474

Please sign in to comment.