diff --git a/.github/workflows/cpp-linux.yml b/.github/workflows/cpp-linux.yml index b1b37d2..1425383 100644 --- a/.github/workflows/cpp-linux.yml +++ b/.github/workflows/cpp-linux.yml @@ -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: @@ -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: | diff --git a/.github/workflows/cpp-macos.yml b/.github/workflows/cpp-macos.yml index 742bcd2..d719776 100644 --- a/.github/workflows/cpp-macos.yml +++ b/.github/workflows/cpp-macos.yml @@ -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: diff --git a/.github/workflows/cpp-windows.yml b/.github/workflows/cpp-windows.yml index 3c9a676..51816d9 100644 --- a/.github/workflows/cpp-windows.yml +++ b/.github/workflows/cpp-windows.yml @@ -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 @@ -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: | diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml index 2085706..7179d05 100644 --- a/.github/workflows/cppcheck.yml +++ b/.github/workflows/cppcheck.yml @@ -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 diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f2a202d..2cd8f0b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -174,7 +174,7 @@ jobs: scan: name: "Trivy" - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 needs: build permissions: actions: read diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index c5ff69f..a125c41 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -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: diff --git a/.github/workflows/make-coverage-html.yml b/.github/workflows/make-coverage-html.yml index 319da88..12bf923 100644 --- a/.github/workflows/make-coverage-html.yml +++ b/.github/workflows/make-coverage-html.yml @@ -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 diff --git a/.github/workflows/markdown-lint.yml b/.github/workflows/markdown-lint.yml index a80dc93..4cc5157 100644 --- a/.github/workflows/markdown-lint.yml +++ b/.github/workflows/markdown-lint.yml @@ -15,7 +15,7 @@ permissions: jobs: markdownlint: name: Markdown Lint - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 strategy: matrix: diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 2f194a6..1eeab6f 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -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 diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml index bad6388..ff60197 100644 --- a/.github/workflows/yamllint.yml +++ b/.github/workflows/yamllint.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 3747aaf..df8e5a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/Makefile b/Makefile index e83ebf7..471b5b0 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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 @@ -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