Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
106e2ab
feat: expand platform and distribution readiness
TheusHen Aug 1, 2026
4011a67
fix: validate packed PlatformIO examples
TheusHen Aug 1, 2026
0e01fd8
fix: consume Linux signal write result
TheusHen Aug 1, 2026
9a71638
feat: add qualification and stress evidence
TheusHen Aug 2, 2026
f4f8602
fix: install Renode test dependencies
TheusHen Aug 2, 2026
5685665
fix: close Cortex-M emulator scenario dispatch
TheusHen Aug 2, 2026
24b14e1
fix: report QEMU faults from thread mode
TheusHen Aug 2, 2026
b193219
fix: enhance fault handling in ls_cortex_m_fault_from_saved function
TheusHen Aug 2, 2026
891e094
Merge branch 'prod' into theus/platform-and-tooling-readiness
TheusHen Aug 7, 2026
d80721b
feat: harden Latch for production-grade embedded and commercial AUV o…
TheusHen Aug 7, 2026
bc89a56
Potential fix for pull request finding 'CodeQL / Workflow does not co…
TheusHen Aug 7, 2026
260e548
Potential fix for pull request finding 'CodeQL / Workflow does not co…
TheusHen Aug 7, 2026
505d413
Potential fix for pull request finding 'CodeQL / Time-of-check time-o…
TheusHen Aug 7, 2026
b6b48e3
Potential fix for pull request finding 'CodeQL / Time-of-check time-o…
TheusHen Aug 7, 2026
9bb142f
Potential fix for pull request finding 'CodeQL / Workflow does not co…
TheusHen Aug 7, 2026
0164680
docs: update AUV integration readiness document for clarity and matur…
TheusHen Aug 7, 2026
9698bf1
Refactor test cases for improved readability and consistency
TheusHen Aug 8, 2026
4a41b8c
Resolve merge conflicts: keep local changes (ours) for tests/test_fil…
TheusHen Aug 8, 2026
16ca26b
fix: correct CRC calculation and remove duplicate file descriptor che…
TheusHen Aug 8, 2026
a901398
Potential fix for pull request finding 'CodeQL / Time-of-check time-o…
TheusHen Aug 8, 2026
99254a7
style: format LS_FILE_STORAGE_INITIALIZER macro for consistency
TheusHen Aug 8, 2026
1840332
Merge branch 'theus/platform-and-tooling-readiness' of https://github…
TheusHen Aug 8, 2026
1e15a50
style: adjust formatting of LS_FILE_STORAGE_INITIALIZER macro for con…
TheusHen Aug 8, 2026
6e9d1f2
style: adjust formatting of LS_FILE_STORAGE_INITIALIZER macro for con…
TheusHen Aug 8, 2026
3ff6a6d
style: fix clang-format violation in file_backend.h
TheusHen Aug 8, 2026
d469341
style: fix spacing in file_backend.h macro for clang-format
TheusHen Aug 8, 2026
874e7cc
style: fix clang-format by aligning multiline macro to col 100
TheusHen Aug 8, 2026
83e8d71
style: fix clang-format by adding space after cast in mbedtls_transpo…
TheusHen Aug 8, 2026
c9c134b
style: fix clang-format ambiguity by wrapping unary minus in parens
TheusHen Aug 8, 2026
f12e3ce
style: fix all instances of unary minus ambiguity for clang-format
TheusHen Aug 8, 2026
2596d26
style: fix remaining cast+unary operator ambiguity for clang-format
TheusHen Aug 8, 2026
f51ee8a
style: fix formatting of LS_FILE_STORAGE_INITIALIZER macro
TheusHen Aug 8, 2026
7d52589
Fix embedded Linux storage initializer formatting
TheusHen Aug 8, 2026
bdef142
Apply clang-format to file storage initializer
TheusHen Aug 8, 2026
fba0446
Align file storage initializer macro
TheusHen Aug 8, 2026
2d51d01
Match legacy clang-format initializer style
TheusHen Aug 8, 2026
446d055
Format native test sources for CI
TheusHen Aug 8, 2026
274220e
Use CI clang-format layout for Cortex-M test
TheusHen Aug 8, 2026
377dbd6
fix: preserve blackbox ordering across sequence wrap
TheusHen Aug 8, 2026
53a066b
docs: remove stale validation reports
TheusHen Aug 8, 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
id: version
attributes:
label: Latch version or commit
placeholder: v0.2.0 or a full commit SHA
placeholder: v0.5.0 or a full commit SHA
validations:
required: true
- type: textarea
Expand Down
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ Describe power-loss, compatibility, security, memory-footprint or hardware risks
## Hardware evidence

Name the exact board, revision, SDK/toolchain, and scenario tested, or write `not hardware-tested`.

## Backport

Write `not a backport`, or name the source commit, target `stable/<major>.x`
branch, affected released versions, and stable-branch tests rerun. New features
must not be backported.
17 changes: 17 additions & 0 deletions .github/workflows/api-compat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Public API Compatibility
on:
pull_request:
push:
branches: [main, prod]
workflow_call:
permissions:
contents: read
jobs:
api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: '3.13'
- run: python tools/check_public_api.py
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build_mode }}
- if: matrix.language == 'c-cpp'
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLS_BUILD_TESTS=ON && cmake --build build --parallel
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLS_BUILD_TESTS=ON -DLS_BUILD_LINUX=ON && cmake --build build --parallel
- uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
with:
category: /language:${{ matrix.language }}
12 changes: 9 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches: [prod]
pull_request:
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
Expand All @@ -14,10 +15,13 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: sudo apt-get update && sudo apt-get install -y lcov ninja-build
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLS_BUILD_TESTS=ON -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLS_BUILD_TESTS=ON -DLS_BUILD_LINUX=ON -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage
- run: cmake --build build --parallel
- run: ctest --test-dir build --output-on-failure
- run: lcov --capture --directory build --rc lcov_branch_coverage=1 --output-file coverage.info --ignore-errors mismatch && lcov --remove coverage.info '*/tests/*' '*/build/*' --rc lcov_branch_coverage=1 --output-file coverage.info --ignore-errors unused
- name: Enforce production runtime coverage gate
run: python tools/check_gcov_coverage.py --build build --min-line 93 --min-branch 80 --json coverage-summary.json --show-files
- run: lcov --capture --directory build --rc lcov_branch_coverage=1 --output-file coverage.raw.info --ignore-errors mismatch
- run: lcov --extract coverage.raw.info '*/src/*' '*/arch/*' '*/ports/*' --rc lcov_branch_coverage=1 --output-file coverage.info --ignore-errors unused
- run: lcov --summary coverage.info --rc lcov_branch_coverage=1
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
if: env.CODECOV_TOKEN != ''
Expand All @@ -28,4 +32,6 @@ jobs:
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: coverage
path: coverage.info
path: |
coverage.info
coverage-summary.json
33 changes: 33 additions & 0 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,46 @@ jobs:
- run: cmake --preset arm-cortex-m4
- run: cmake --build --preset arm-cortex-m4 --parallel
- run: python tools/check_size.py build/arm-cortex-m4/liblatch.a
- name: Measure default and constrained Cortex-M4 source profiles
run: |
mkdir -p build/footprints
python tools/measure_footprint.py build/arm-cortex-m4/liblatch.a \
--tool arm-none-eabi-size --label cortex-m4-default-static-archive \
--format json --output build/footprints/cortex-m4-default.json
cmake -S . -B build/arm-cortex-m4-small -G Ninja \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/arm-none-eabi.cmake \
-DLS_BUILD_TESTS=OFF -DLS_CONSTRAINED_PROFILE=1 -DLS_STORE_STRINGS=0 \
-DLS_ENABLE_BREADCRUMBS=0 -DLS_ENABLE_METRICS=0 -DLS_ENABLE_LOGS=0 \
-DLS_ENABLE_POWER_SAMPLES=0 -DLS_ENABLE_PERFORMANCE=0 \
-DLS_ENABLE_DUMPS=0 -DLS_ENABLE_ASSERTS=0 -DLS_ENABLE_STACK_SNAPSHOT=0 \
-DLS_MAX_EVENT_SIZE=768 -DLS_BREADCRUMB_CAPACITY=1 -DLS_METRIC_CAPACITY=1 \
-DLS_POWER_SAMPLE_CAPACITY=1 -DLS_HEALTH_CAPACITY=1 -DLS_SPAN_CAPACITY=1 \
-DLS_MAX_TRANSPORTS=1 -DLS_MAX_DUMP_REGIONS=1 -DLS_MAX_REDACTIONS=1 \
-DLS_SPOOL_MAX_RECORDS=1 -DLS_POLICY_CAPACITY=1 -DLS_DEDUP_CAPACITY=1
cmake --build build/arm-cortex-m4-small --target latch --parallel
python tools/measure_footprint.py build/arm-cortex-m4-small/liblatch.a \
--tool arm-none-eabi-size --label cortex-m4-small-static-archive \
--format json --output build/footprints/cortex-m4-small.json
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: cortex-m4-footprints
path: build/footprints/*.json
if-no-files-found: error
riscv32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: sudo apt-get update && sudo apt-get install -y gcc-riscv64-unknown-elf ninja-build
- run: cmake --preset riscv32
- run: cmake --build --preset riscv32 --parallel
riscv64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: sudo apt-get update && sudo apt-get install -y gcc-riscv64-unknown-elf ninja-build
- run: cmake --preset riscv64
- run: cmake --build --preset riscv64 --parallel
compile-profiles:
runs-on: ubuntu-latest
strategy:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Documentation
on:
pull_request:
paths: ['**/*.md', '.github/workflows/**']
paths: ['**/*.md', 'hil/qualification-matrix.json', 'tools/check_hil_matrix.py', '.github/workflows/**']
push:
branches: [prod]
paths: ['**/*.md', '.github/workflows/**']
paths: ['**/*.md', 'hil/qualification-matrix.json', 'tools/check_hil_matrix.py', '.github/workflows/**']
permissions:
contents: read
jobs:
Expand All @@ -16,4 +16,5 @@ jobs:
with:
python-version: '3.13'
- run: python tools/check_docs.py
- run: python tools/check_hil_matrix.py
- run: python tools/check_test_vector.py
70 changes: 70 additions & 0 deletions .github/workflows/emulator-stress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Emulator fault injection
on:
pull_request:
paths:
- 'tests/emulator/**'
- '.github/workflows/emulator-stress.yml'
- 'arch/**'
- 'src/capture/**'
push:
branches: [prod]
schedule:
- cron: '41 3 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
cortex-m-qemu:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi qemu-system-arm
- name: Build and inject Cortex-M faults
shell: bash
run: |
set -euo pipefail
mkdir -p build/emulator
for scenario in HARDFAULT WATCHDOG_MODEL STACK_CANARY; do
arm-none-eabi-gcc tests/emulator/cortex_m_fault.c arch/cortex-m/cortex_m_fault.S \
-DLS_EMULATOR_${scenario}=1 -mcpu=cortex-m3 -mthumb -Os \
-ffreestanding -fno-builtin -nostdlib \
-Wl,--gc-sections,-T,tests/emulator/cortex_m.ld \
-o build/emulator/cortex-m-${scenario}.elf
timeout 15 qemu-system-arm -M mps2-an385 -nographic \
-semihosting-config enable=on,target=native \
-kernel build/emulator/cortex-m-${scenario}.elf
done
rv32-renode:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: '3.12'
- run: sudo apt-get update && sudo apt-get install -y gcc-riscv64-unknown-elf
- name: Build RV32 trap fixture
shell: bash
run: |
set -euo pipefail
mkdir -p build/emulator
riscv64-unknown-elf-gcc tests/emulator/rv32_fault.c \
-march=rv32imac_zicsr -mabi=ilp32 -Os -ffreestanding -fno-builtin -nostdlib \
-Wl,--gc-sections,-T,tests/emulator/rv32.ld \
-o build/emulator/latch-renode-rv32.elf
- name: Install pinned Renode 1.16.1
shell: bash
run: |
set -euo pipefail
archive=build/renode.tar.gz
curl --fail --location --retry 3 \
https://github.com/renode/renode/releases/download/v1.16.1/renode-1.16.1.linux-portable.tar.gz \
--output "$archive"
echo '1a532d4b5b82de0dd154970c401e0c7b0e498d17304b2cecc007e306c8f9617c build/renode.tar.gz' | sha256sum --check
mkdir -p build/renode
tar -xzf "$archive" -C build/renode --strip-components=1
python -m pip install --disable-pip-version-check \
--requirement build/renode/tests/requirements.txt
- name: Inject RV32 illegal-instruction trap
run: build/renode/renode-test tests/emulator/rv32_fault.robot
20 changes: 16 additions & 4 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Fuzz
on:
schedule:
- cron: '17 3 * * *'
- cron: '47 4 * * 0'
workflow_dispatch:
pull_request:
paths: ['src/envelope/**', 'src/security/**', 'src/transport/stream.c', 'include/laststate/envelope.h', 'include/laststate/security.h', 'include/laststate/compression.h', 'include/laststate/stream_transport.h', 'fuzz/**', 'tests/vectors/**', 'tools/seed_fuzz_corpora.py', 'CMakeLists.txt']
Expand All @@ -21,10 +22,21 @@ jobs:
- run: cmake --build build --parallel
- run: python tools/seed_fuzz_corpora.py --output corpus
- run: mkdir -p artifacts
- run: build/fuzz-lep corpus/lep -artifact_prefix=artifacts/ -max_total_time=120 -timeout=5
- run: build/fuzz-compression corpus/compression -artifact_prefix=artifacts/ -max_total_time=120 -timeout=5
- run: build/fuzz-aead corpus/aead -artifact_prefix=artifacts/ -max_total_time=180 -timeout=5
- run: build/fuzz-stream corpus/stream -artifact_prefix=artifacts/ -max_total_time=120 -timeout=5
- name: Select fuzzing budget
run: |
if [ "${{ github.event.schedule }}" = "47 4 * * 0" ]; then
echo "FUZZ_SECONDS=3600" >> "$GITHUB_ENV"
elif [ "${{ github.event_name }}" = "schedule" ]; then
echo "FUZZ_SECONDS=900" >> "$GITHUB_ENV"
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "FUZZ_SECONDS=600" >> "$GITHUB_ENV"
else
echo "FUZZ_SECONDS=120" >> "$GITHUB_ENV"
fi
- run: build/fuzz-lep corpus/lep -artifact_prefix=artifacts/ -max_total_time="${FUZZ_SECONDS}" -timeout=5
- run: build/fuzz-compression corpus/compression -artifact_prefix=artifacts/ -max_total_time="${FUZZ_SECONDS}" -timeout=5
- run: build/fuzz-aead corpus/aead -artifact_prefix=artifacts/ -max_total_time="${FUZZ_SECONDS}" -timeout=5
- run: build/fuzz-stream corpus/stream -artifact_prefix=artifacts/ -max_total_time="${FUZZ_SECONDS}" -timeout=5
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
default: C:\latch-hil\stm32u5.json
scenario:
type: choice
options: [brownout, watchdog, mpu, trustzone, fpu-lazy, flash, reset-registers]
options: [brownout, hardfault, watchdog, stack-canary, mpu, trustzone, fpu-lazy, flash, reset-registers]
required: true
permissions:
contents: read
Expand All @@ -29,4 +29,14 @@ jobs:
python -m pip install --disable-pip-version-check --only-binary=:all:
--require-hashes --requirement hil/requirements.txt
- name: Run physical fault scenario
run: python hil/runner.py --board "${{ inputs.board_config }}" --scenario "${{ inputs.scenario }}"
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path hil-evidence | Out-Null
python hil/runner.py --board "${{ inputs.board_config }}" --scenario "${{ inputs.scenario }}" `
--commit "${{ github.sha }}" --evidence-out "hil-evidence/${{ inputs.scenario }}.json"
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
name: hil-${{ inputs.scenario }}-${{ github.sha }}
path: hil-evidence
if-no-files-found: warn
30 changes: 30 additions & 0 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Mutation assurance
on:
pull_request:
paths: ['src/**','tests/**','tools/mutation_*.py','.github/workflows/mutation.yml']
push:
branches: [prod]
schedule:
- cron: '17 3 * * 0'
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: sudo apt-get update && sudo apt-get install -y ninja-build
- run: python tools/mutation_smoke.py --build build/mutation-smoke
critical-campaign:
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: sudo apt-get update && sudo apt-get install -y ninja-build
- run: python tools/mutation_campaign.py --build build/mutation-campaign --minimum-score 85 --report artifacts/mutation-report.json
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
name: mutation-report
path: artifacts/mutation-report.json
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
1 change: 1 addition & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- run: ctest --test-dir build --output-on-failure --repeat until-pass:3 --timeout 120
- run: valgrind --error-exitcode=1 --leak-check=full build/latch-tests
- run: valgrind --error-exitcode=1 --leak-check=full build/latch-envelope-fuzz-tests
- run: valgrind --error-exitcode=1 --leak-check=full build/latch-spool-stress-tests
- run: build/latch-benchmark > benchmark.json
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/project-readiness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Project Readiness
on:
pull_request:
push:
branches: [main, prod]
workflow_call:
permissions:
contents: read
jobs:
readiness:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: '3.13'
- run: python tools/check_project_readiness.py
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
10 changes: 6 additions & 4 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches: [prod]
pull_request:
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
Expand All @@ -16,25 +17,26 @@ jobs:
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLS_BUILD_TESTS=ON -DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLS_BUILD_TESTS=ON -DLS_BUILD_LINUX=ON -DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
- run: cmake --build build --parallel
- run: ctest --test-dir build --output-on-failure --timeout 60
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: sudo apt-get update && sudo apt-get install -y clang-tidy cppcheck ninja-build
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLS_BUILD_TESTS=ON
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLS_BUILD_TESTS=ON -DLS_BUILD_LINUX=ON
- run: cppcheck --error-exitcode=1 --enable=warning,performance,portability --inline-suppr -I include src arch ports
- run: find src -name '*.c' -print0 | xargs -0 -n1 clang-tidy -p build --warnings-as-errors='clang-analyzer-*'
- run: python tools/run_clang_tidy.py --build build --warnings-as-errors='clang-analyzer-*'
- run: python tools/check_safety_c.py
warnings-as-errors:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc, clang]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLS_BUILD_TESTS=ON -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror
- run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLS_BUILD_TESTS=ON -DLS_BUILD_LINUX=ON -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}
Expand Down
Loading
Loading