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
15 changes: 9 additions & 6 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on: # yamllint disable-line rule:truthy
jobs:
lint:
name: clang-format style check
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04

steps:
- name: Checkout repository
Expand All @@ -21,12 +21,15 @@ jobs:
- name: Install dependencies
# yamllint disable rule:line-length
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key \
| sudo gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/resolute/ llvm-toolchain-resolute-22 main" \
| sudo tee /etc/apt/sources.list.d/llvm.list && \
sudo apt-get -y update
sudo apt-get -y install --no-install-recommends --no-install-suggests clang-format-19
sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-19) 100
sudo update-alternatives --set clang-format $(update-alternatives --list clang-format | grep clang-format-19)
sudo apt-get -y install --no-install-recommends --no-install-suggests clang-format-22
sudo update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-22) 100
sudo update-alternatives --set clang-format $(update-alternatives --list clang-format | grep clang-format-22)
# yamllint enable rule:line-length

- name: Check Tools
Expand Down
38 changes: 14 additions & 24 deletions .github/workflows/cpp-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: C++ CI Coverage
name: C/C++ CI Coverage

on: # yamllint disable-line rule:truthy
push:
Expand All @@ -11,35 +11,27 @@ on: # yamllint disable-line rule:truthy

jobs:
coverage:
name: C++ CMake CI Coverage
runs-on: macos-15
name: C/C++ CMake CI Coverage
runs-on: ubuntu-26.04

steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Install Tools
- name: Install/Adjust VCPKG
shell: bash
run: |
# Install vcpkg
export VCPKG_VERSION=2025.02.14
git clone \
--depth 1 \
--branch $VCPKG_VERSION \
https://github.com/microsoft/vcpkg.git \
--single-branch \
"$HOME/vcpkg"
export VCPKG_ROOT="$HOME/vcpkg"
echo "$VCPKG_ROOT" >> $GITHUB_PATH
sh $VCPKG_ROOT/bootstrap-vcpkg.sh
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
# lcov is available via homebrew
brew install lcov
echo "VCPKG_ROOT=/usr/local/share/vcpkg" >> $GITHUB_ENV

- name: Install Tools
run: |
sudo apt-get update
sudo apt-get install lcov

- name: Check Tools
run: |
echo "-----------"
c++ --version
g++ --version
echo "-----------"
make --version
echo "-----------"
Expand All @@ -53,21 +45,19 @@ jobs:
run: |
make dependencies

# yamllint disable rule:line-length
- name: Build
run: |
export VCPKG_ROOT=/usr/local/share/vcpkg
make build
# yamllint enable rule:line-length

- name: Test / Coverage
run: make coverage

# yamllint disable rule:line-length
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
# yamllint enable rule:line-length
with:
directory: ./coverage
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
# yamllint enable rule:line-length
27 changes: 19 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE_VERSION=ubuntu:noble-20260509.1
ARG BASE_IMAGE_VERSION=ubuntu:26.04
FROM ${BASE_IMAGE_VERSION} AS init

ENV WORKDIR=/app
Expand All @@ -16,10 +16,11 @@ ENV TZ=Etc/UTC

# build tools
RUN apt-get update \
&& apt-get -y install --no-install-recommends --no-install-suggests build-essential cmake g++ make pkg-config \
&& apt-get -y install --no-install-recommends --no-install-suggests build-essential cmake g++ gcc make pkg-config \
&& rm -rf /var/lib/apt/lists/* \
&& make --version \
&& cmake --version \
&& gcc --version \
&& g++ --version

# vcpkg Package Manager
Expand All @@ -33,7 +34,7 @@ RUN apt-get -y update && \
ca-certificates curl git ninja-build unzip zip && \
rm -rf /var/lib/apt/lists/* && \
mkdir /opt/vcpkg && \
git clone --branch ${VCPKG_VERSION} https://github.com/microsoft/vcpkg "${VCPKG_ROOT}" && \
git clone --branch "${VCPKG_VERSION}" https://github.com/microsoft/vcpkg "${VCPKG_ROOT}" && \
/opt/vcpkg/bootstrap-vcpkg.sh && \
ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && \
rm -rf /var/lib/apt/lists/* && \
Expand Down Expand Up @@ -68,11 +69,15 @@ FROM builder AS lint
RUN apt-get update && \
apt-get -y install --no-install-recommends --no-install-suggests gnupg software-properties-common && \
rm -rf /var/lib/apt/lists/*
ADD https://apt.llvm.org/llvm-snapshot.gpg.key llvm-snapshot.gpg.key
RUN apt-key add llvm-snapshot.gpg.key && \
apt-add-repository -y "deb https://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" && \

RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/llvm-snapshot.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] http://apt.llvm.org/resolute/ llvm-toolchain-resolute-22 main" \
| tee /etc/apt/sources.list.d/llvm.list && \
apt-get -y update && \
apt-get -y install --no-install-recommends --no-install-suggests clang-format && \
apt-get -y install --no-install-recommends --no-install-suggests clang-format-22 && \
update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-22) 100 && \
rm -rf /var/lib/apt/lists/*

ADD https://deb.nodesource.com/setup_22.x nodesource_setup.sh
Expand All @@ -81,10 +86,16 @@ RUN bash nodesource_setup.sh && \
npm install -g --ignore-scripts markdownlint-cli@0.47.0 && \
apt-get -y install --no-install-recommends --no-install-suggests python3-minimal python3-pip && \
rm /usr/lib/python3.*/EXTERNALLY-MANAGED && \
pip install --no-cache-dir yamllint && \
apt-get -y install --no-install-recommends --no-install-suggests yamllint && \
apt-get -y install --no-install-recommends --no-install-suggests cppcheck && \
rm -rf /var/lib/apt/lists/*

# Tooling test
RUN clang-format --version && \
markdownlint --version && \
yamllint --version && \
cppcheck --version

# Code source
COPY ./src ${WORKDIR}/src
COPY ./vcpkg.json ${WORKDIR}/vcpkg.json
Expand Down
Loading