Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/workflows/cpp-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ jobs:
name: C/C++ CMake CI Test
strategy:
matrix:
os: ["ubuntu-24.04"]
os:
- "ubuntu-24.04"
- "ubuntu-24.04-arm"
- "ubuntu-26.04"
- "ubuntu-26.04-arm"
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -24,16 +28,7 @@ jobs:
- name: Install
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install vcpkg
git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
export VCPKG_ROOT="$HOME/vcpkg"
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "Linux" ]; then
echo "VCPKG_ROOT=/usr/local/share/vcpkg" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "Windows" ]; then
echo "VCPKG_ROOT=C:/vcpkg" >> $GITHUB_ENV
fi
echo "VCPKG_ROOT=/usr/local/share/vcpkg" >> $GITHUB_ENV

- name: Check Tools
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/cpp-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ jobs:
name: C/C++ CMake CI Test
strategy:
matrix:
os: ["macos-14"]
os:
- "macos-14"
- "macos-15"
- "macos-15-intel"
- "macos-26"
- "macos-26-intel"
runs-on: ${{ matrix.os }}

steps:
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/cpp-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
name: C/C++ CMake CI Test
strategy:
matrix:
os: ["windows-2022"]
os:
- "windows-2022"
- "windows-2025"
arch:
- amd64
- amd64_x86
Expand All @@ -29,16 +31,7 @@ jobs:
- name: Install
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install vcpkg
git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
export VCPKG_ROOT="$HOME/vcpkg"
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "Linux" ]; then
echo "VCPKG_ROOT=/usr/local/share/vcpkg" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "Windows" ]; then
echo "VCPKG_ROOT=C:/vcpkg" >> $GITHUB_ENV
fi
echo "VCPKG_ROOT=C:/vcpkg" >> $GITHUB_ENV

- name: Check Tools
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy
jobs:
lint:
name: CppCheck Lint
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04

steps:
- name: Checkout repository
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

build:
name: "Build Docker images"
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:

lint:
name: "Run in docker: LINT"
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
needs: build
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
Expand All @@ -98,7 +98,7 @@ jobs:

test:
name: "Run in docker: TEST"
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
needs: build
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
Expand All @@ -125,7 +125,7 @@ jobs:
# yamllint disable rule:line-length
# security:
# name: "Snyk Container"
# runs-on: ubuntu-24.04
# runs-on: ubuntu-26.04
# needs: build
# permissions:
# actions: read
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:

scan:
name: "Trivy"
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
needs: build
permissions:
actions: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on: # yamllint disable-line rule:truthy
jobs:
scan:
name: gitleaks
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v6.0.3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-coverage-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on: # yamllint disable-line rule:truthy
jobs:
make-coverage-html:
name: "Run make coverage/html and verify coverage HTML"
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
jobs:
markdownlint:
name: Markdown Lint
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on: # yamllint disable-line rule:truthy
jobs:
build:
name: SonarCloud build and run sonar-scanner
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
env:
# Directory where build-wrapper output will be placed
BUILD_WRAPPER_OUT_DIR: build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy
jobs:
lint:
name: YAML lint
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
Expand Down
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

SET(GCC_COVERAGE_COMPILE_FLAGS "-fsanitize=address -fprofile-arcs -ftest-coverage -g -O0")
SET(GCC_COVERAGE_LINK_FLAGS "--coverage")
# -fsanitize=address causes SIGILL on macOS (Clang 17 + macOS 26 Intel) due to
# ASan runtime incompatibility. Coverage instrumentation still works without it.
if(APPLE)
SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage -g -O0 -save-temps")
SET(GCC_COVERAGE_LINK_FLAGS "--coverage")
else()
SET(GCC_COVERAGE_COMPILE_FLAGS "-fsanitize=address -fprofile-arcs -ftest-coverage -g -O0 -save-temps")
SET(GCC_COVERAGE_LINK_FLAGS "--coverage")
endif()

if (CMAKE_GENERATOR MATCHES "Unix Makefiles")

Expand Down
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ FILES := $(shell find $(SRC_DIR) -name '*.cpp' -o -name '*.c' -o -name '*.h' -o
.PHONY: all clean dependencies help list test outdated
.EXPORT_ALL_VARIABLES: # (2)

define crono
@start=$$(date +%s); \
$(1); \
end=$$(date +%s); \
diff=$$((end - start)); \
printf "Total time: %02d:%02d:%02d\n" $$((diff/3600)) $$((diff%3600/60)) $$((diff%60))
endef

help: list

list:
Expand Down Expand Up @@ -99,7 +107,11 @@ test: env dependencies build clean/test
cd build && make test

coverage: test
lcov ${COVERAGE_TOOL_OPTS} -o coverage/lcov.info --no-external --capture --exclude "build/vcpkg_installed" --exclude "test.cpp" --directory .
lcov ${COVERAGE_TOOL_OPTS} -o coverage/lcov.info \
--no-external --capture \
--exclude "build/vcpkg_installed" \
--exclude "tests/*" \
--directory .

coverage/html: coverage
genhtml ${COVERAGE_TOOL_OPTS} -o coverage/ --show-details --legend coverage/lcov.info
Expand Down Expand Up @@ -149,7 +161,8 @@ compose/run: compose/build

compose/all: compose/rebuild compose/test compose/lint

all: env dependencies test lint
all:
$(call crono, make clean; make dependencies; make build; make test; make lint; make coverage/html)

run:
ls -alh
Loading