Skip to content

Commit d46e463

Browse files
committed
Attempt to switch CI to CMake 3.15 for one job
1 parent 698612b commit d46e463

File tree

2 files changed

+35
-17
lines changed

2 files changed

+35
-17
lines changed

.github/workflows/dev.yml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
wasp:
7171
name: No JIT
7272
runs-on: ubuntu-24.04
73+
env:
74+
CMAKE_VER: "3.15.7"
7375
steps:
7476
- name: Checkout
7577
uses: actions/checkout@v4
@@ -80,22 +82,38 @@ jobs:
8082
run: |
8183
sudo apt-get -qq update
8284
sudo apt-get -qq install language-pack-fr
83-
./autogen.sh
8485
85-
- name: Configure
86-
run: ./configure CC='clang -fsanitize=undefined,address,integer -fno-sanitize-recover=undefined,integer -fno-sanitize=unsigned-shift-base,function' --enable-pcre2-16 --enable-pcre2-32 --enable-debug
86+
- name: Cache CMake
87+
uses: actions/cache@v4
88+
with:
89+
key: cmake-${{ env.CMAKE_VER }}-Linux-x86_64
90+
path: cmake-${{ env.CMAKE_VER }}-Linux-x86_64.tar.gz
8791

88-
- name: Build
89-
run: make CPPFLAGS='-pedantic -Wall -Wextra -Wpedantic -Wdeclaration-after-statement -Wshadow -Wno-overlength-strings -Werror -Wno-error=incompatible-pointer-types-discards-qualifiers' -j3
92+
- name: Install CMake
93+
run: |
94+
[ -f cmake-${CMAKE_VER}-Linux-x86_64.tar.gz ] || curl -L -S -O "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-Linux-x86_64.tar.gz"
95+
tar -xz -f cmake-${CMAKE_VER}-Linux-x86_64.tar.gz
96+
realpath "cmake-${CMAKE_VER}-Linux-x86_64/bin" >> "$GITHUB_PATH"
9097
91-
- name: Test (main test script)
92-
run: ./RunTest
98+
- name: Configure
99+
run: |
100+
echo "== ENV =="
101+
env
102+
echo ""
103+
echo "== which cmake =="
104+
which cmake
105+
echo ""
106+
echo "== cmake --version =="
107+
cmake --version
108+
echo ""
109+
echo "== CMAKE =="
110+
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=RelWithDebInfo -B build
93111
94-
- name: Test (pcre2grep test script)
95-
run: ./RunGrepTest
112+
- name: Build
113+
run: ninja -C build
96114

97-
- name: Test (pcre2posix program)
98-
run: ./pcre2posix_test -v
115+
- name: Test
116+
run: ninja -C build test
99117

100118
bat:
101119
name: 32bit MSVC
@@ -107,16 +125,16 @@ jobs:
107125
submodules: true
108126

109127
- name: Configure
110-
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2GREP_SUPPORT_CALLOUT_FORK=OFF -DPCRE2_DEBUG=ON -DPCRE2_NEWLINE=ANYCRLF -DPCRE2_STATIC_PIC=ON -DPCRE2_STATIC_RUNTIME=ON -DPCRE2_SUPPORT_BSR_ANYCRLF=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_VERBOSE_MAKEFILE=ON -B build -A Win32
128+
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2GREP_SUPPORT_CALLOUT_FORK=OFF -DPCRE2_DEBUG=ON -DPCRE2_NEWLINE=ANYCRLF -DPCRE2_STATIC_PIC=ON -DPCRE2_STATIC_RUNTIME=ON -DPCRE2_SUPPORT_BSR_ANYCRLF=ON -DPCRE2_DEBUG=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_VERBOSE_MAKEFILE=ON -B build -A Win32
111129

112130
- name: Build
113-
run: cmake --build build
131+
run: cmake --build build --config RelWithDebInfo
114132

115133
- name: Test
116134
shell: cmd
117135
run: |
118136
cd build
119-
ctest -C Debug .
137+
ctest -C RelWithDebInfo .
120138
type Testing\Temporary\LastTest.log
121139
122140
pterodactyl:
@@ -132,7 +150,7 @@ jobs:
132150
run: cmake -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DPCRE2_BUILD_PCRE2GREP=OFF -DPCRE2_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build
133151

134152
- name: Build
135-
run: cmake --build build
153+
run: cmake --build build --config Debug
136154

137155
- name: Test
138156
shell: cmd
@@ -176,7 +194,7 @@ jobs:
176194
apt-get -qq install cmake ninja-build
177195
178196
- name: Configure
179-
run: cmake -G Ninja -B build -DPCRE2_BUILD_PCRE2_8=OFF -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_NEVER_BACKSLASH_C=ON
197+
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
180198

181199
- name: Build
182200
run: cmake --build build

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
# 2023-01-15 Carlo added C99 as the minimum required
104104
# 2023-08-06 PH added support for setting variable length lookbehind maximum
105105

106-
# Increased minimum to 3.15 to allow use of generator expressions.
106+
# Increased minimum to 3.15 to allow use of string(REPEAT).
107107
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
108108
project(PCRE2 C)
109109
set(CMAKE_C_STANDARD 99)

0 commit comments

Comments
 (0)