Skip to content

Commit 5cc0ee5

Browse files
authored
Merge pull request #117 from joto/update-some-stuff
Update some stuff
2 parents 2a739b1 + 16e41ee commit 5cc0ee5

File tree

8 files changed

+285
-194
lines changed

8 files changed

+285
-194
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
name: Install Prerequisites on Ubuntu
1+
name: Install apt packages on Ubuntu/Debian
22

33
runs:
44
using: composite
5-
65
steps:
76
- name: Install packages
87
run: |
9-
sudo apt-get update -q
8+
sudo apt-get update -qq
109
sudo apt-get install -yq \
1110
libprotobuf-dev \
1211
protobuf-compiler
13-
if [ "$CC" = clang-13 ]; then sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-13; fi
1412
shell: bash

.github/workflows/ci.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,26 @@ on: [ push, pull_request ]
55
jobs:
66
linux:
77
runs-on: ubuntu-latest
8+
timeout-minutes: 30
89
strategy:
910
fail-fast: false
1011
matrix:
1112
image:
12-
- "ubuntu:18.04" # gcc 7.5.0, clang 6.0.0, cmake 3.10.2
1313
- "ubuntu:20.04" # gcc 9.3.0, clang 10.0.0, cmake 3.16.3
14-
- "ubuntu:21.04" # gcc 10.3.0, clang 12.0.0, cmake 3.18.4
15-
- "ubuntu:21.10" # gcc 11.2.0, clang 13.0.0, cmake 3.18.4
16-
- "debian:stretch" # gcc 6.3.0, clang 3.8.1, cmake 3.7.2
14+
- "ubuntu:22.04" # gcc 12.2.0, clang 15.0.7, cmake 3.24.2
15+
- "ubuntu:24.04" # gcc 14.2.0, clang 18.1.3, cmake 3.28.3
1716
- "debian:buster" # gcc 8.3.0, clang 7.0.1, cmake 3.13.4
1817
- "debian:bullseye" # gcc 10.2.1, clang 11.0.1, cmake 3.18.4
19-
- "debian:testing" # gcc 10.3.0, clang 11.1.0, cmake 3.21.3
20-
- "debian:experimental" # gcc 11.0.0, clang 14.0.0, cmake 3.21.3
21-
- "fedora:34" # gcc 11.2.1, clang 12.0.1, cmake 3.20.5
22-
- "fedora:35" # gcc 11.2.1, clang 13.0.0, cmake 3.22.0
18+
- "debian:bookworm" # gcc 12.2.0, clang 15.0.6, cmake 3.25.1
19+
- "debian:testing"
20+
- "debian:experimental"
21+
- "fedora:39"
22+
- "fedora:40"
23+
- "fedora:41"
2324
build_type: [Debug]
2425
cpp_compiler: [g++]
25-
cpp_version: [11]
26+
cpp_version: [14]
2627
include:
27-
- image: "debian:bullseye"
28-
cpp_version: 14
2928
- image: "debian:bullseye"
3029
cpp_version: 17
3130
- image: "debian:bullseye"
@@ -58,12 +57,17 @@ jobs:
5857
# cpp_compiler: clang++
5958
# CXXFLAGS: "-fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer"
6059
# LDFLAGS: "-fsanitize=address,undefined,integer"
60+
- image: "debian:bookworm"
61+
c_compiler: clang
62+
cpp_compiler: clang++
6163
- image: "debian:testing"
6264
c_compiler: clang
6365
cpp_compiler: clang++
66+
CXXFLAGS: -Wno-c++20-extensions
6467
- image: "debian:experimental"
65-
c_compiler: clang-14
66-
cpp_compiler: clang++-14
68+
c_compiler: clang
69+
cpp_compiler: clang++
70+
CXXFLAGS: -Wno-c++20-extensions
6771
container:
6872
image: ${{ matrix.image }}
6973
env:
@@ -105,72 +109,69 @@ jobs:
105109
gcc-c++ \
106110
graphviz \
107111
make \
108-
protobuf-devel \
109-
protobuf-lite-static
110-
- uses: actions/checkout@v2
112+
protobuf-lite-devel \
113+
protobuf-lite
114+
- uses: actions/checkout@v4
111115
- uses: ./.github/actions/cmake
112116
- uses: ./.github/actions/build
113117
- uses: ./.github/actions/ctest
114118

115119
ubuntu-latest:
116-
runs-on: ubuntu-20.04
120+
runs-on: ubuntu-24.04
121+
timeout-minutes: 30
117122
env:
118-
CC: clang-13
119-
CXX: clang++-13
123+
CC: clang-18
124+
CXX: clang++-18
120125
BUILD_TYPE: Debug
121126
steps:
122-
- name: Install new clang
123-
run: |
124-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
125-
sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
126-
shell: bash
127-
- uses: actions/checkout@v2
127+
- uses: actions/checkout@v4
128128
- uses: ./.github/actions/install-ubuntu
129129
- uses: ./.github/actions/cmake
130130
- uses: ./.github/actions/build
131131
- uses: ./.github/actions/ctest
132132

133133
macos:
134+
runs-on: ${{ matrix.os }}
135+
timeout-minutes: 30
134136
strategy:
135137
fail-fast: false
136138
matrix:
137139
os:
138-
- "macos-10.15"
139-
- "macos-11.0"
140+
- macos-14
141+
- macos-15
140142
build_type: [Debug]
141143
include:
142-
- os: "macos-11.0"
144+
- os: macos-14
143145
build_type: Release
144-
runs-on: ${{ matrix.os }}
145146
env:
146147
CC: clang
147148
CXX: clang++
148149
BUILD_TYPE: ${{ matrix.build_type }}
149150
steps:
150151
- run: brew install protobuf
151-
- uses: actions/checkout@v2
152+
- uses: actions/checkout@v4
152153
- uses: ./.github/actions/cmake
153154
- uses: ./.github/actions/build
154155
- uses: ./.github/actions/ctest
155156

156157
windows:
158+
runs-on: ${{ matrix.os }}
159+
timeout-minutes: 30
157160
strategy:
158161
fail-fast: false
159162
matrix:
160163
os:
161164
- windows-2019
162165
- windows-2022
163-
runs-on: ${{ matrix.os }}
164166
steps:
165167
- run: |
166168
vcpkg install \
167169
protobuf:x64-windows \
168170
protobuf-c:x64-windows
169171
shell: bash
170-
- uses: actions/checkout@v2
172+
- uses: actions/checkout@v4
171173
with:
172174
submodules: true
173175
- uses: ./.github/actions/cmake-windows
174176
- uses: ./.github/actions/build-windows
175177
- uses: ./.github/actions/ctest-windows
176-

CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
#-----------------------------------------------------------------------------
88

9-
cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR)
9+
cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
1010

1111
#-----------------------------------------------------------------------------
1212

@@ -17,7 +17,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1717
#-----------------------------------------------------------------------------
1818

1919
if (NOT "${CMAKE_CXX_STANDARD}")
20-
set(CMAKE_CXX_STANDARD 11)
20+
set(CMAKE_CXX_STANDARD 14)
2121
endif()
2222
message(STATUS "Building in C++${CMAKE_CXX_STANDARD} mode")
2323
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -52,6 +52,14 @@ endif()
5252
#
5353
#-----------------------------------------------------------------------------
5454

55+
# This is needed for the protobuf_generate_cpp() function to work on newer
56+
# versions of the Protobuf CMake config.
57+
set(protobuf_MODULE_COMPATIBLE ON CACHE BOOL "")
58+
59+
# This is needed so that we pick up the (more modern) CONFIG mode cmake file
60+
# before the (older) MODULE mode cmake config file. Seems to be needed on macOS.
61+
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
62+
5563
find_package(Protobuf)
5664

5765

@@ -61,7 +69,7 @@ find_package(Protobuf)
6169
#
6270
#-----------------------------------------------------------------------------
6371
message(STATUS "Looking for clang-tidy")
64-
find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11)
72+
find_program(CLANG_TIDY NAMES clang-tidy-20 clang-tidy-19 clang-tidy-18 clang-tidy-17 clang-tidy-16 clang-tidy-15)
6573

6674
if(CLANG_TIDY AND PROTOBUF_FOUND)
6775
message(STATUS "Looking for clang-tidy - found ${CLANG_TIDY}")
@@ -95,7 +103,7 @@ if(CPPCHECK)
95103
message(STATUS "Looking for cppcheck - found")
96104
add_custom_target(cppcheck
97105
${CPPCHECK}
98-
-Uassert --std=c++11 --enable=all
106+
-Uassert --std=c++14 --enable=all
99107
${CMAKE_SOURCE_DIR}/include/protozero/*.hpp
100108
${CMAKE_SOURCE_DIR}/test/*.cpp
101109
${CMAKE_SOURCE_DIR}/test/include/*.hpp

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ the Google Protobufs `protoc` program.
1818

1919
## Depends
2020

21-
* C++11 compiler
21+
* C++14 compiler
2222
* CMake
2323
* Some tests depend on the Google Protobuf library, but use of Protozero
2424
doesn't need it

0 commit comments

Comments
 (0)