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
4 changes: 3 additions & 1 deletion .clangd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
CompileFlags:
Add: -ferror-limit=0
Add:
- -ferror-limit=0
- -Wall

---
Diagnostics:
Expand Down
44 changes: 43 additions & 1 deletion .cmake-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
format:
tab_size: 2
line_width: 100
line_width: 150
max_subgroups_hwrap: 10
separate_ctrl_name_with_space: true
separate_fn_name_with_space: false
Expand All @@ -20,3 +20,45 @@ markup:
fence_pattern: "^\\s*([`~]{3}[`~]*)(.*)$"
ruler_pattern: "^\\s*[^\\w\\s]{3}.*[^\\w\\s]{3}$"
enable_markup: true

parse:
additional_commands:
logger_set_max_level:
spelling: logger_set_max_level
pargs: 1
kwargs:
CHANNEL: 1
CONFIG: "*"
cpmaddpackage:
pargs:
nargs: '*'
flags: []
spelling: CPMAddPackage
kwargs: &cpmaddpackagekwargs
NAME: 1
FORCE: 1
VERSION: 1
GIT_TAG: 1
DOWNLOAD_ONLY: 1
GITHUB_REPOSITORY: 1
GITLAB_REPOSITORY: 1
GIT_REPOSITORY: 1
SVN_REPOSITORY: 1
SVN_REVISION: 1
SOURCE_DIR: 1
DOWNLOAD_COMMAND: 1
FIND_PACKAGE_ARGUMENTS: 1
NO_CACHE: 1
GIT_SHALLOW: 1
URL: 1
URL_HASH: 1
URL_MD5: 1
DOWNLOAD_NAME: 1
DOWNLOAD_NO_EXTRACT: 1
HTTP_USERNAME: 1
HTTP_PASSWORD: 1
EXCLUDE_FROM_ALL: 1
SYSTEM: 1
SOURCE_SUBDIR: 1
PATCHES: +
OPTIONS: +
25 changes: 0 additions & 25 deletions .cspell.yaml

This file was deleted.

36 changes: 36 additions & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
enabled: true
readonly: true
language: en
caseSensitive: false

useGitignore: false # ensures better compatibility when used in multiple projects

enabledFileTypes:
- cpp
- c
- markdown
- cmake
- json
- yaml

files: /**
ignorePaths:
- .clangd
- .clang-format
- .cmake-format
- .cspell.yml
- build/**

ignoreRegExpList:
- /-W(no)*[a-z]+/g # ignore compiler warning flags
- /-D[A-Z]+/g # ignore compiler define flags

words:
- argn
- bugprone
- codacy
- cxxflags
- destdir
- endforeach
- embetech
- nolintnextline
16 changes: 8 additions & 8 deletions .github/workflows/generate_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@ jobs:
- { toolchain: gcc, architecture: thumbv8m.base-none-eabi }
- { toolchain: gcc, architecture: thumbv8m.main-none-eabihf }
env:
preset: ${{ matrix.config.toolchain }}::${{ matrix.config.architecture }}
preset: ${{ matrix.config.toolchain }}-${{ matrix.config.architecture }}
steps:
- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@9e07ecdcee1b12e5037e42f410b67f03e2f626e1 # v4.2.1

- uses: actions/checkout@v4
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- uses: robinraju/release-downloader@v1
- uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # v1.12
with:
repository: embetech-official/cmake-presets
tag: v0.0.1
fileName: CMakeUserPresets.json

- uses: lukka/run-cmake@v10
- uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8
with:
configurePreset: ${{ env.preset }}
configurePresetAdditionalArgs: '["-DRING_BUFFER_TESTS=0", "-DRING_BUFFER_DOC=0", "-DRING_BUFFER_EXAMPLES=0"]'
buildPreset: ${{ env.preset }}::install
buildPreset: ${{ env.preset }}-install

- name: Upload library install directory
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: libring_buffer-${{ matrix.config.architecture }}
path: |
install/${{ env.preset }}/**
if-no-files-found: error
if-no-files-found: error
20 changes: 8 additions & 12 deletions .github/workflows/maintain_tags.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
name: 'Tags'

on:
release:
types: [published]
release:
types: [published]

jobs:
tags:
name: 'Tags'
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tags:
name: 'Tags'
runs-on: ubuntu-latest
steps:
- name: 'Update Tags'
uses: cssnr/update-version-tags-action@1ff20ac5555f024f5e72b7ccdf165b867878f953 # v2.0.0
20 changes: 10 additions & 10 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: On Push
name: CI Tests

on:
push:

workflow_dispatch:


schedule:
- cron: '15 10 * * 1' # Run at 10:15 every Monday

jobs:
build_all:
runs-on: [self-hosted, linux, x64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ssciwr/doxygen-install@v1
- uses: lukka/get-cmake@latest
- uses: lukka/run-cmake@v10
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ssciwr/doxygen-install@501e53b879da7648ab392ee226f5b90e42148449 # v1.6.4
- uses: lukka/get-cmake@9e07ecdcee1b12e5037e42f410b67f03e2f626e1 # v4.2.1
- uses: lukka/run-cmake@af1be47fd7c933593f687731bc6fdbee024d3ff4 # v10.8
with:
workflowPreset: 'default'
workflowPreset: 'native-gcc'

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.vscode
**/.cache
.cache
build
install
CMakeUserPresets.json
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.25)

file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" PROJECT_VERSION)
project(ring_buffer VERSION ${PROJECT_VERSION})
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" PROJECT_VERSION)
project(ring_buffer VERSION ${PROJECT_VERSION})

option(RING_BUFFER_TESTS "Configure unit tests target" ${PROJECT_IS_TOP_LEVEL})
option(RING_BUFFER_DOC "Configure documentation target" ${PROJECT_IS_TOP_LEVEL})
Expand Down
53 changes: 30 additions & 23 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"version": 6,
"version": 8,
"configurePresets": [
{
"name": "gcc-native",
"description": "Use any available GNU compiler",
"name": "native-gcc",
"displayName": "Native GCC Compiler",
"description": "First available GCC compiler",
"generator": "Ninja Multi-Config",
"binaryDir": "${sourceDir}/build/${presetName}",
"installDir": "${sourceDir}/install/${presetName}",
Expand All @@ -18,28 +19,30 @@
},
"environment": {
"CFLAGS": "-Wall -Wextra -Wpedantic -Wunused-parameter -Winit-self -Wcast-align -Wconversion -Wnull-dereference -Wduplicated-cond -Wsign-conversion -Wlogical-op",
"CXXFLAGS": "-Wall -Wextra -Wpedantic -Wunused-parameter -Winit-self -Wcast-align -Wconversion -Wnull-dereference -Wduplicated-cond -Wsign-conversion -Wlogical-op"
"CXXFLAGS": "-Wall -Wextra"
}
}
],
"buildPresets": [
{
"name": "all-release",
"displayName": "all [Release]",
"configurePreset": "gcc-native",
"configuration": "Release"
},
{
"name": "all-debug",
"name": "native-gcc-all-debug",
"displayName": "all [Debug]",
"configurePreset": "gcc-native",
"description": "Build all targets in Debug configuration",
"configurePreset": "native-gcc",
"configuration": "Debug"
},
{
"name": "install",
"displayName": "Install",
"configurePreset": "gcc-native",
"configuration": "Debug",
"name": "native-gcc-all-release",
"displayName": "all [Release]",
"description": "Build all targets in Release configuration",
"configurePreset": "native-gcc",
"configuration": "Release"
},
{
"name": "native-gcc-install",
"displayName": "Install [Debug + Release]",
"description": "Install all targets (Release + Debug)",
"configurePreset": "native-gcc",
"targets": [
"install:Release",
"install:Debug"
Expand All @@ -48,8 +51,10 @@
],
"testPresets": [
{
"name": "ut",
"configurePreset": "gcc-native",
"name": "native-gcc",
"displayName": "Run Tests [Debug]",
"description": "Run all tests in Debug configuration",
"configurePreset": "native-gcc",
"configuration": "Debug",
"output": {
"outputOnFailure": true
Expand All @@ -62,23 +67,25 @@
],
"workflowPresets": [
{
"name": "default",
"name": "native-gcc",
"displayName": "Native GCC Compiler Workflow",
"description": "Configure, Build all [Debug], Run Tests, Install",
"steps": [
{
"type": "configure",
"name": "gcc-native"
"name": "native-gcc"
},
{
"type": "build",
"name": "all-debug"
"name": "native-gcc-all-debug"
},
{
"type": "test",
"name": "ut"
"name": "native-gcc"
},
{
"type": "build",
"name": "install"
"name": "native-gcc-install"
}
]
}
Expand Down
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Embetech

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading