Skip to content

Commit

Permalink
ci: upgrade build linux job to latest Ubuntu
Browse files Browse the repository at this point in the history
Most of the uses of `PCRE2_UNREACHABLE(0)` are at the end of `case`
and therefore in non debug builds, the assertion "should" tell
the compiler that a "fall back" is not possible, but the version
of gcc used in Ubuntu 22.04 has a bug and will instead see the
assertion as additional code that doesn't have a `break` after
and therefore trigger `-Wimplicit-fallthrough` warnings instead.

Update the job to use Ubuntu 24.04 that provides gcc 13.2 and
that doesn't have the bug anymore, and while at it update all
jobs to error on warnings so that failures will be more visible.
  • Loading branch information
carenas committed Sep 23, 2024
1 parent 3ae9771 commit cb04c63
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -16,10 +16,10 @@ jobs:
run: ./autogen.sh

- name: Configure
run: ./configure CPPFLAGS='-Wall -Wextra' --enable-jit --enable-pcre2-16 --enable-pcre2-32
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32

- name: Build
run: make -j2
run: make -j2 CPPFLAGS='-Wall -Wextra -Werror'

- name: Test (main test script)
run: ./RunTest
Expand Down Expand Up @@ -50,10 +50,10 @@ jobs:
run: ./autogen.sh

- name: Configure
run: ./configure CPPFLAGS='-Wall -Wextra' --enable-jit --enable-pcre2-16 --enable-pcre2-32
run: ./configure --enable-jit --enable-pcre2-16 --enable-pcre2-32

- name: Build
run: make -j2
run: make -j2 CPPFLAGS='-Wall -Wextra -Werror'

- name: Test (main test script)
run: ./RunTest
Expand All @@ -77,7 +77,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' -B build
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 -B build

- name: Build
run: cmake --build build
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
submodules: true

- name: Configure
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -B build -A Win32
run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -B build -A Win32

- name: Build
run: cmake --build build
Expand Down

0 comments on commit cb04c63

Please sign in to comment.