Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
2a04600
feat(platform): add no-heap static allocation PAL backend for lockste…
vtz Jun 11, 2026
a33acfd
refactor(platform): remove #ifdef SOMEIP_STATIC_ALLOC from message.h/cpp
vtz Jun 12, 2026
71c63b0
fix(platform): address merge-readiness review findings
vtz Jun 12, 2026
95e99cd
fix(platform): resolve clang-tidy warnings from intrusive ptr changes
vtz Jun 12, 2026
34ffd73
fix(platform): add message_ptr_impl.h to all PAL backend directories
vtz Jun 12, 2026
2a32a98
feat(platform): add follow-up safety hardening for static-alloc backend
vtz Jun 12, 2026
e354267
feat(platform): add container conformance tests and fix doc traceability
vtz Jun 12, 2026
69bbeda
docs: align FMEA and architecture with implementation
vtz Jun 13, 2026
ce164e3
fix(platform): add CI coverage, fix traceability, guard double-release
vtz Jun 13, 2026
1dc6696
fix(platform): mark malloc_trap operator new as noexcept
vtz Jun 13, 2026
4539753
fix(platform): make malloc_trap armable for test compatibility
vtz Jun 13, 2026
9794ef0
fix(platform): add missing <new> include for std::bad_alloc
vtz Jun 13, 2026
75f24dc
feat(platform): migrate core protocol types to PAL abstractions
vtz Jun 19, 2026
1d4bf1c
fix: resolve CI failures across static-alloc, clang-tidy, and Zephyr
vtz Jun 19, 2026
4dd19e6
fix: use pointer+size deserialize overload in UDP transport
vtz Jun 19, 2026
f9e07fe
fix: resolve remaining clang-tidy and static-alloc build issues
vtz Jun 19, 2026
64bb20c
fix: add erase() and iterator-pair ctor to static ByteBuffer
vtz Jun 19, 2026
db0c4a6
fix: cast char iterators to uint8_t for ByteBuffer insert
vtz Jun 19, 2026
1ceeb51
fix: cast uint8_t* to char* for config string deserialization
vtz Jun 19, 2026
c32ab56
fix: resolve ETL string compatibility in SD subsystem
vtz Jun 19, 2026
3994a98
fix: migrate event_subscriber maps and string concat for ETL
vtz Jun 19, 2026
e0a6947
fix: suppress redundant-string-cstr for ETL dual-backend compat
vtz Jun 19, 2026
2e3d7f0
fix: migrate test_serialization.cpp to platform types
vtz Jun 19, 2026
7dc9b15
fix: use c_str()-only ctor for String in serialize_array
vtz Jun 19, 2026
3820c2c
fix: migrate all test files to platform:: types for ETL compat
vtz Jun 19, 2026
842b6a6
ci: disable examples in static-alloc CI job
vtz Jun 19, 2026
2f6a67e
fix: static-alloc test failures — capacity and pool exhaustion
vtz Jun 19, 2026
0cfbe26
fix: prevent segfault on pool exhaustion in UDP receive loop
vtz Jun 19, 2026
f84dd7e
fix: address review findings — overflow, heap-free, and robustness
vtz Jul 1, 2026
a8d68bd
fix: field-request key mismatch and deserializer capacity check
vtz Jul 1, 2026
d0d662e
fix: replace snprintf with MISRA-compliant uint16_to_str
vtz Jul 1, 2026
1200f6c
fix: resolve remaining clang-tidy warnings in uint16_to_str
vtz Jul 1, 2026
6313569
fix: add missing cstddef include for size_t
vtz Jul 1, 2026
68fc7df
ci: fix Windows build and FreeRTOS Renode job timeout
vtz Jul 1, 2026
d0f1092
fix: address all deferred review items
vtz Jul 1, 2026
e962326
fix: use PAL-compatible capacity check instead of #ifdef guard
vtz Jul 1, 2026
3c1493a
fix: revert Actions SHA pinning to tag refs (bad SHAs broke CI)
vtz Jul 1, 2026
c9f1f88
fix: clean stale FetchContent subbuilds on Windows
vtz Jul 1, 2026
5ddced4
fix: complete no-heap static allocation migration
vtz Jul 2, 2026
46f3bc5
fix: add explicit move ctors for SD variant types (GCC -Wmaybe-uninit…
vtz Jul 2, 2026
1b677d6
fix: suppress GCC variant false-positive and clang-tidy include-cleaner
vtz Jul 2, 2026
581a7d5
fix: proper move ctors for SD variant types (GCC + clang-tidy clean)
vtz Jul 2, 2026
a1758dc
fix: resolve all clang-tidy and GCC warnings from static-alloc migration
vtz Jul 2, 2026
ce97490
fix: use NOLINTBEGIN/END for bugprone-use-after-move in SD move ctors
vtz Jul 2, 2026
85b7f6e
refactor(sd): use defaulted Rule of Five, drop hand-written move ctors
vtz Jul 24, 2026
47430ac
feat(static): add message pool double-release safety + ETL error handler
vtz Jul 24, 2026
cce6764
fix(static): add capacity checks before bounded container inserts
vtz Jul 24, 2026
6f57ecc
fix(session): thread-safe get_session + capacity guard
vtz Jul 24, 2026
3d05e38
perf(static): reduce EventPublisherImpl from 680KiB to 33KiB
vtz Jul 24, 2026
a41ede5
fix: sync budget script defaults + eliminate SyncState heap alloc
vtz Jul 24, 2026
f250f31
feat: add PayloadView span-like type for zero-copy payload access
vtz Jul 24, 2026
e2b499b
refactor(static): replace shared_ptr<UdpTransport> with by-value storage
vtz Jul 24, 2026
abb60b3
test: add API pimpl construction tests under malloc trap
vtz Jul 24, 2026
7a32ab3
ci: add static-alloc Renode presets and CI jobs
vtz Jul 24, 2026
743d486
docs: fix traceability tags for ETL error handler and malloc trap
vtz Jul 24, 2026
5fff076
docs: regenerate traceability matrices after static-alloc additions
vtz Jul 24, 2026
0832ed5
fix: guard malloc trap build for hosted platforms only
vtz Jul 24, 2026
afc434e
fix: resolve clang-tidy warnings and FreeRTOS static-alloc build
vtz Jul 24, 2026
9df7464
fix: add zero-arg store_callable overload for FreeRTOS thread
vtz Jul 24, 2026
dd02739
fix: harden static-alloc for Renode CI and host tests
vtz Jul 25, 2026
4594c25
fix: add --build-dir to Renode scripts, suppress char8_t -Wc++20-compat
vtz Jul 25, 2026
11df56e
fix: resolve clang-tidy warnings in tp_types.h and tp_segmenter.cpp
vtz Jul 25, 2026
d824948
fix: make init_static_allocator / init_buffer_pool idempotent
vtz Jul 25, 2026
1024e55
fix: harden SD, event publisher, PayloadView; add changelog & integra…
vtz Jul 30, 2026
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
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
freertos: ${{ steps.filter.outputs.freertos }}
threadx: ${{ steps.filter.outputs.threadx }}
zephyr: ${{ steps.filter.outputs.zephyr }}
static_alloc: ${{ steps.filter.outputs.static_alloc }}
python: ${{ steps.filter.outputs.python }}
requirements: ${{ steps.filter.outputs.requirements }}
rpm: ${{ steps.filter.outputs.rpm }}
Expand Down Expand Up @@ -109,6 +110,15 @@ jobs:
- '.github/workflows/threadx.yml'
- 'scripts/run_threadx_renode_test.sh'
- 'scripts/run_renode_test.sh'
static_alloc:
- 'src/platform/static/**'
- 'include/platform/static/**'
- 'tests/test_static_alloc*.cpp'
- 'tests/test_buffer_pool.cpp'
- 'tests/test_static_message_pool.cpp'
- 'tests/test_platform_containers.cpp'
- 'tests/test_etl_error_handler.cpp'
- '.github/workflows/host.yml'
Comment on lines +113 to +121

@coderabbitai coderabbitai Bot Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n -C4 'needs\.changes\.outputs\.static_alloc|static_alloc:' .github/workflows

Repository: vtz/opensomeip

Length of output: 1515


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow file size =="
wc -l .github/workflows/ci.yml

echo "== jobs outline/key regions =="
rg -n '^\w+:|if:|needs:|outputs:|runs-on:|static_alloc|host:|changes:|fail-safe|checkout|run:' .github/workflows/ci.yml

Repository: vtz/opensomeip

Length of output: 1399


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== 250-330 =="
sed -n '250,330p' .github/workflows/ci.yml

echo "== fail-safe definitions =="
rg -n -C3 "fail-safe|fail_safe|fail|if:|STATIC_ALLOC|static_alloc|changes.outputs" .github/workflows/ci.yml

Repository: vtz/opensomeip

Length of output: 6872


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re
text = Path(".github/workflows/ci.yml").read_text()
lines = text.splitlines()

# Extract job ids by matching top-level lines and their indentation block via simple parser.
jobs = {}
current = None
indent = None
for i,line in enumerate(lines, start=1):
    if not line.startswith(" "):
        continue
    m = re.match(r"^  ([A-Za-z_][A-Za-z0-9_-]*):\s*$", line)
    if m:
        current = m.group(1)
        indent = 2
        jobs[current] = {"name": current, "if": None, "uses": None, "needs": None, "static_alloc_consumer": False, "line": i}
    elif current and current != "changes":
        stripped = line.lstrip()
        prefix = indent * 4
        if len(line) - len(stripped) == prefix:
            if re.match(r"^if:\s*===", stripped):
                # multi-line if continuation
                jobs[current]["if"] = "\n" + "\n".join(stripped for stripped in stripped.splitlines())
                continue
            m2 = re.match(r"^if:\s*$", stripped)
            if m2:
                jobs[current]["if"] = ""
                continue
            jobs[current].setdefault("if", "")
            jobs[current]["if"] += stripped + "\n"
            if "needs.changes.outputs.static_alloc" in stripped:
                jobs[current]["static_alloc_consumer"] = True
        elif stripped.startswith("if:"):
            jobs[current]["if"] = stripped[4:].strip()
            if "needs.changes.outputs.static_alloc" in stripped:
                jobs[current]["static_alloc_consumer"] = True
        elif stripped.startswith("uses:"):
            jobs[current]["uses"] = stripped[5:].strip()
        elif stripped.startswith("needs:"):
            jobs[current]["needs"] = stripped[5:].strip()

print("jobs:", list(jobs))
print("static_alloc_consumer jobs:", [j for j,v in jobs.items() if v.get("static_alloc_consumer")])
print("all non-changes jobs gated only by static_alloc output? no jobs gated solely by static_alloc:", all(not v.get("if") or "needs.changes.outputs.static_alloc" not in v.get("if") else True for _,v in jobs.items()))
PY

echo "== host workflow references to static_alloc =="
rg -n "static_alloc|STATIC_ALLOC|static_alloc" .github/workflows/host.yml src include tests 2>/dev/null || true

Repository: vtz/opensomeip

Length of output: 619


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re
text = Path(".github/workflows/ci.yml").read_text()
lines = text.splitlines()

jobs = {}
current = None
indent = None
for i,line in enumerate(lines, start=1):
    if not line.startswith(" "):
        continue
    m = re.match(r"^  ([A-Za-z_][A-Za-z0-9_-]*):\s*$", line)
    if m:
        current = m.group(1)
        indent = 2
        jobs[current] = {
            "name": current,
            "if": None,
            "uses": None,
            "needs": None,
            "static_alloc_consumer": False,
            "line": i,
        }
    elif current and current != "changes":
        stripped = line.lstrip()
        prefix = indent * 4
        if len(line) - len(stripped) == prefix:
            m2 = re.match(r"^if:.*$", stripped)
            jobs[current].setdefault("if", "")
            if m2:
                jobs[current]["if"] += stripped + "\n"
                if "needs.changes.outputs.static_alloc" in stripped:
                    jobs[current]["static_alloc_consumer"] = True
            elif stripped.startswith("uses:"):
                jobs[current]["uses"] = stripped[5:].strip()
            elif stripped.startswith("needs:"):
                jobs[current]["needs"] = stripped[5:].strip()

print("jobs:", list(jobs))
print("static_alloc consumers:", [j for j,v in jobs.items() if v.get("static_alloc_consumer")])
print("static_alloc only conditions:", [(j, v["if"]) for j in jobs if "needs.changes.outputs.static_alloc" in (v.get("if") or "")])
PY

echo "== host/static alloc references =="
rg -n "static_alloc|STATIC_ALLOC" .github/workflows/host.yml src include tests 2>/dev/null || true

echo "== ci.yml change detection definition =="
sed -n '20,130p' .github/workflows/ci.yml

Repository: vtz/opensomeip

Length of output: 459


Gate a CI job with static_alloc.

static_alloc is emitted from changes, but no job after that consumes it, and .github/workflows/host.yml does not use STATIC_ALLOC. Changes limited to src/platform/static/**, include/platform/static/**, or the listed static allocation tests can pass the fail-safe without running static/host validation. Add a consumer job or include this output in the relevant job condition.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 113 - 121, Connect the
changes.static_alloc output to a CI consumer so static-allocation changes cannot
bypass validation. Update the relevant static/host validation job condition to
run when static_alloc is true, or add a dedicated consumer job if none exists;
do not rely on host.yml unless it explicitly consumes this output.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. The static_alloc change detection filter in CI is intentionally broad to capture all static-alloc-related paths. Narrowing the filter is a valid optimization but not blocking.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vtz, thanks for clarifying. The finding is not about narrowing the filter: its breadth is fine.

The issue is that static_alloc currently only affects the fail-safe check; no downstream job condition consumes it. Consequently, a change matching only this category can still skip host/static validation. Please add needs.changes.outputs.static_alloc == 'true' to the appropriate validation job condition (likely host) to ensure those changes run CI.

You are interacting with an AI system.

zephyr:
- 'src/platform/zephyr/**'
- 'include/platform/zephyr/**'
Expand Down Expand Up @@ -196,6 +206,7 @@ jobs:
FREERTOS: ${{ steps.filter.outputs.freertos }}
THREADX: ${{ steps.filter.outputs.threadx }}
ZEPHYR: ${{ steps.filter.outputs.zephyr }}
STATIC_ALLOC: ${{ steps.filter.outputs.static_alloc }}
PYTHON: ${{ steps.filter.outputs.python }}
REQUIREMENTS: ${{ steps.filter.outputs.requirements }}
RPM: ${{ steps.filter.outputs.rpm }}
Expand All @@ -208,6 +219,7 @@ jobs:
echo " freertos=$FREERTOS"
echo " threadx=$THREADX"
echo " zephyr=$ZEPHYR"
echo " static_alloc=$STATIC_ALLOC"
echo " python=$PYTHON"
echo " requirements=$REQUIREMENTS"
echo " rpm=$RPM"
Expand All @@ -219,6 +231,7 @@ jobs:
"$FREERTOS" == "false" && \
"$THREADX" == "false" && \
"$ZEPHYR" == "false" && \
"$STATIC_ALLOC" == "false" && \
"$PYTHON" == "false" && \
"$REQUIREMENTS" == "false" && \
"$RPM" == "false" && \
Expand Down
80 changes: 79 additions & 1 deletion .github/workflows/freertos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ jobs:
name: FreeRTOS Cortex-M4 Renode Tests
if: inputs.rtos_paths_changed || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RENODE_VERSION: "1.15.3"
steps:
Expand Down Expand Up @@ -329,10 +330,87 @@ jobs:
path: /tmp/freertos_renode_junit.xml
retention-days: 14

renode-cortexm4-static:
name: FreeRTOS Cortex-M4 Renode Tests (Static Alloc)
if: inputs.rtos_paths_changed || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RENODE_VERSION: "1.15.3"
steps:
- uses: actions/checkout@v4

- name: Install ccache
run: sudo apt-get update -qq && sudo apt-get install -y ccache

- name: Cache ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ runner.os }}-freertos-renode-cortexm4-static-${{ github.sha }}
restore-keys: |
ccache-${{ runner.os }}-freertos-renode-cortexm4-static-

- name: Cache ARM toolchain apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-arm-toolchain-${{ runner.os }}

- name: Install ARM toolchain
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi

- name: Cache CMake FetchContent
uses: actions/cache@v4
with:
path: build/freertos-cortexm4-renode-static/_deps
key: fetchcontent-freertos-renode-static-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
fetchcontent-freertos-renode-static-

- name: Cache Renode
id: renode-cache
uses: actions/cache@v4
with:
path: /opt/renode
key: renode-${{ env.RENODE_VERSION }}-linux

- name: Install Renode
if: steps.renode-cache.outputs.cache-hit != 'true'
run: |
wget -q "https://github.com/renode/renode/releases/download/v${RENODE_VERSION}/renode-${RENODE_VERSION}.linux-portable.tar.gz"
sudo mkdir -p /opt/renode
sudo tar xzf "renode-${RENODE_VERSION}.linux-portable.tar.gz" -C /opt/renode --strip-components=1

- name: Add Renode to PATH
run: sudo ln -sf /opt/renode/renode /usr/local/bin/renode

- name: Build & run FreeRTOS static-alloc tests on Renode
run: |
cmake --preset freertos-cortexm4-renode-static -S "$GITHUB_WORKSPACE" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build "$GITHUB_WORKSPACE/build/freertos-cortexm4-renode-static" -j"$(nproc)"
./scripts/run_freertos_renode_test.sh \
--skip-build \
--build-dir build/freertos-cortexm4-renode-static \
--timeout 60 \
--junit-output /tmp/freertos_renode_static_junit.xml

- name: Upload Renode test results
uses: actions/upload-artifact@v4
Comment on lines +341 to +403

@coderabbitai coderabbitai Bot Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -nP '^\s*uses:\s+actions/(checkout|cache|upload-artifact)@(?![0-9a-f]{40}\b)' \
  .github/workflows/freertos.yml .github/workflows/threadx.yml
# Expected: no output for the newly added static Renode jobs.

Repository: vtz/opensomeip

Length of output: 3386


Pin the static CI actions to immutable commit hashes.

The new FreeRTOS and ThreadX static Renode jobs still use mutable GitHub Action tags for actions/checkout, actions/cache, and actions/upload-artifact; pin these occurrences to reviewed full SHAs to avoid code changes through tag rewrites.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 341-341: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 341-341: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 347-347: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 355-355: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 366-366: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 375-375: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 403-403: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

📍 Affects 2 files
  • .github/workflows/freertos.yml#L341-L403 (this comment)
  • .github/workflows/threadx.yml#L340-L402
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/freertos.yml around lines 341 - 403, Pin every
actions/checkout, actions/cache, and actions/upload-artifact reference in the
static Renode jobs to reviewed immutable full commit SHAs, replacing the mutable
version tags while preserving each action’s existing configuration. Apply this
change in .github/workflows/freertos.yml lines 341-403 and
.github/workflows/threadx.yml lines 340-402.

Source: Linters/SAST tools

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. GitHub Actions pinning to SHA hashes is a repo-wide CI hardening concern unrelated to this PR's static allocation scope. Tracked separately.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vtz, acknowledged. Since this is tracked separately and outside the static-allocation rollout’s scope, I’ll leave it as a non-blocking follow-up rather than requiring changes in this PR.

You are interacting with an AI system.

if: always()
with:
name: test-results-freertos-renode-static
path: /tmp/freertos_renode_static_junit.xml
retention-days: 14

publish-test-results:
name: Publish Test Results
runs-on: ubuntu-latest
needs: [runtime-tests, memory-checks, renode-cortexm4]
needs: [runtime-tests, memory-checks, renode-cortexm4, renode-cortexm4-static]
if: always()
permissions:
checks: write
Expand Down
80 changes: 79 additions & 1 deletion .github/workflows/host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,24 @@ jobs:
restore-keys: |
fetchcontent-${{ runner.os }}-${{ matrix.c_compiler }}-

- name: Install Ninja (Windows)
if: matrix.c_compiler == 'cl'
run: choco install ninja -y

- name: Set up MSVC dev environment
if: matrix.c_compiler == 'cl'
uses: ilammy/msvc-dev-cmd@v1

- name: Clean stale FetchContent subbuilds (Windows)
if: matrix.c_compiler == 'cl'
shell: bash
run: rm -rf "${{ steps.strings.outputs.build-output-dir }}/_deps/"*-subbuild || true

- name: Configure CMake (MSVC)
if: matrix.c_compiler == 'cl'
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-G Ninja
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DENABLE_WERROR=ON
-S ${{ github.workspace }}
Expand Down Expand Up @@ -171,6 +185,70 @@ jobs:
path: ${{ github.workspace }}/gtest_results/
retention-days: 14

build-static:
name: Static allocation (no-heap)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install ccache
run: sudo apt-get update -qq && sudo apt-get install -y ccache

- name: Cache ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ runner.os }}-static-alloc-${{ github.sha }}
restore-keys: |
ccache-${{ runner.os }}-static-alloc-

- name: Cache CMake FetchContent
uses: actions/cache@v4
with:
path: build/_deps
key: fetchcontent-${{ runner.os }}-static-alloc-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
fetchcontent-${{ runner.os }}-static-alloc-

- name: Configure CMake (static allocation)
run: >
cmake -B build
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_C_COMPILER=gcc
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=Release
-DSOMEIP_USE_STATIC_ALLOC=ON
-DBUILD_EXAMPLES=OFF
-DENABLE_WERROR=ON

- name: Build
run: cmake --build build --config Release

- name: Test
working-directory: build
run: |
mkdir -p "$GITHUB_WORKSPACE/gtest_results"
export GTEST_OUTPUT="xml:$GITHUB_WORKSPACE/gtest_results/"
ctest --build-config Release --output-on-failure --timeout 30 --no-tests=error --output-junit junit_results.xml

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-host-static-alloc
path: build/junit_results.xml
retention-days: 14

- name: Upload GTest detailed results
uses: actions/upload-artifact@v4
if: always()
with:
name: gtest-results-host-static-alloc
path: ${{ github.workspace }}/gtest_results/
retention-days: 14

coverage:
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -360,7 +438,7 @@ jobs:
publish-test-results:
name: Publish Test Results
runs-on: ubuntu-latest
needs: [build, build-fedora, coverage, sanitizers]
needs: [build, build-fedora, build-static, coverage, sanitizers]
if: always()
permissions:
checks: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/preset-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
preset:
- host-linux
- host-linux-tests
- static-alloc-linux-tests
- freertos-compile-check
- threadx-compile-check
steps:
Expand Down
79 changes: 78 additions & 1 deletion .github/workflows/threadx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,87 @@ jobs:
path: /tmp/threadx_renode_junit.xml
retention-days: 14

renode-cortexm4-static:
name: ThreadX Cortex-M4 Renode Tests (Static Alloc)
if: inputs.rtos_paths_changed || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RENODE_VERSION: "1.15.3"
steps:
- uses: actions/checkout@v4

- name: Install ccache
run: sudo apt-get update -qq && sudo apt-get install -y ccache

- name: Cache ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ runner.os }}-threadx-renode-cortexm4-static-${{ github.sha }}
restore-keys: |
ccache-${{ runner.os }}-threadx-renode-cortexm4-static-

- name: Cache ARM toolchain apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-arm-toolchain-${{ runner.os }}

- name: Install ARM toolchain
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi

- name: Cache CMake FetchContent
uses: actions/cache@v4
with:
path: build/threadx-cortexm4-renode-static/_deps
key: fetchcontent-threadx-renode-static-${{ hashFiles('CMakeLists.txt') }}
restore-keys: |
fetchcontent-threadx-renode-static-

- name: Cache Renode
id: renode-cache
uses: actions/cache@v4
with:
path: /opt/renode
key: renode-${{ env.RENODE_VERSION }}-linux

- name: Install Renode
if: steps.renode-cache.outputs.cache-hit != 'true'
run: |
wget -q "https://github.com/renode/renode/releases/download/v${RENODE_VERSION}/renode-${RENODE_VERSION}.linux-portable.tar.gz"
sudo mkdir -p /opt/renode
sudo tar xzf "renode-${RENODE_VERSION}.linux-portable.tar.gz" -C /opt/renode --strip-components=1

- name: Add Renode to PATH
run: sudo ln -sf /opt/renode/renode /usr/local/bin/renode

- name: Build & run ThreadX static-alloc tests on Renode
run: |
cmake --preset threadx-cortexm4-renode-static -S "$GITHUB_WORKSPACE" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build "$GITHUB_WORKSPACE/build/threadx-cortexm4-renode-static" -j"$(nproc)"
./scripts/run_threadx_renode_test.sh \
--skip-build \
--build-dir build/threadx-cortexm4-renode-static \
--timeout 60 \
--junit-output /tmp/threadx_renode_static_junit.xml

- name: Upload Renode test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-threadx-renode-static
path: /tmp/threadx_renode_static_junit.xml
retention-days: 14

publish-test-results:
name: Publish Test Results
runs-on: ubuntu-latest
needs: [runtime-tests, memory-checks, renode-cortexm4]
needs: [runtime-tests, memory-checks, renode-cortexm4, renode-cortexm4-static]
if: always()
permissions:
checks: write
Expand Down
Loading
Loading