Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
cdd5db5
drop RPC
pavel-kirienko Nov 26, 2025
83d6fe0
cleanup
pavel-kirienko Nov 26, 2025
8b43af8
cleanup
pavel-kirienko Nov 26, 2025
27c7e15
redesign the API for compatibility with the named topics
pavel-kirienko Nov 27, 2025
575d5a1
repair tests
pavel-kirienko Nov 27, 2025
4ac88b9
Provide deleter per fragment
pavel-kirienko Nov 27, 2025
94d3aa1
move udpard_fragment_free
pavel-kirienko Nov 27, 2025
c8a7fec
tx pipeline core
pavel-kirienko Nov 27, 2025
262cd10
complete the tx pipeline
pavel-kirienko Nov 28, 2025
d25f9f1
add intrusive tx test
pavel-kirienko Nov 28, 2025
dccdc8b
do not enqueue timed out transfers
pavel-kirienko Nov 28, 2025
a2b0c6d
rx basics
pavel-kirienko Nov 28, 2025
2e3fef0
reception WIP -- data structures
pavel-kirienko Nov 29, 2025
d74ff9c
add lists
pavel-kirienko Nov 29, 2025
781ba3c
implement list and the transfer-ID window
pavel-kirienko Nov 29, 2025
f9a52ce
partial CRC
pavel-kirienko Nov 29, 2025
451d584
remove the transfer-CRC, use prefix CRC instead to greatly simplify t…
pavel-kirienko Nov 29, 2025
88e00cd
fix tests
pavel-kirienko Nov 29, 2025
e3dea9b
simplify
pavel-kirienko Nov 29, 2025
821018e
tests
pavel-kirienko Nov 29, 2025
024b8d5
add fragment tree utils
pavel-kirienko Dec 3, 2025
5b3dc61
updates
pavel-kirienko Dec 3, 2025
dda3338
add rx_fragment_tree_update_covered_prefix
pavel-kirienko Dec 3, 2025
ded7475
misleading comment
pavel-kirienko Dec 3, 2025
df1f6e3
updates
pavel-kirienko Dec 4, 2025
0a877e7
acceptance WIP
pavel-kirienko Dec 4, 2025
fe12794
refactor rx_fragment_tree_update
pavel-kirienko Dec 4, 2025
5a4df9e
updates
pavel-kirienko Dec 4, 2025
03dcc2f
testing wip
pavel-kirienko Dec 5, 2025
c6a1a13
another test
pavel-kirienko Dec 5, 2025
e337e86
non-empty test
pavel-kirienko Dec 5, 2025
3261204
more test
pavel-kirienko Dec 5, 2025
7b5c198
add a more complex test
pavel-kirienko Dec 5, 2025
532c1f2
simplify the reassembler
pavel-kirienko Dec 5, 2025
69572a4
restructure the fragment acceptance logic
pavel-kirienko Dec 6, 2025
825f939
slight test adjustment
pavel-kirienko Dec 6, 2025
eb1d592
add test
pavel-kirienko Dec 6, 2025
54e87f0
add exhaustive fragmentation test
pavel-kirienko Dec 6, 2025
61956f9
add basic coverage
pavel-kirienko Dec 6, 2025
6a06693
use branch coverage
pavel-kirienko Dec 6, 2025
1b33b62
add text report
pavel-kirienko Dec 6, 2025
ca8735b
improve coverage measurement
pavel-kirienko Dec 6, 2025
ad64127
remove dead code
pavel-kirienko Dec 6, 2025
52a7377
remove partial CRCC32C; code salvaged in https://gist.github.com/pave…
pavel-kirienko Dec 6, 2025
11d98c7
add oom tests
pavel-kirienko Dec 6, 2025
5be2ab6
more coverage
pavel-kirienko Dec 6, 2025
f344ef1
report accepted/rejected
pavel-kirienko Dec 6, 2025
59777fc
copverage
pavel-kirienko Dec 7, 2025
af59fad
rx_fragment_tree_finalize
pavel-kirienko Dec 7, 2025
0bc84c3
update
pavel-kirienko Dec 7, 2025
1f825a2
coverage
pavel-kirienko Dec 7, 2025
a064b77
const
pavel-kirienko Dec 7, 2025
30abd87
add rx_slot_update
pavel-kirienko Dec 7, 2025
389ba21
add test
pavel-kirienko Dec 7, 2025
08618f5
docs
pavel-kirienko Dec 7, 2025
693314f
ci
pavel-kirienko Dec 7, 2025
a98c402
nits
pavel-kirienko Dec 8, 2025
95e01cf
rx session new/delete
pavel-kirienko Dec 8, 2025
eca55c3
add rx_session_update wip
pavel-kirienko Dec 9, 2025
6662da6
add test
pavel-kirienko Dec 9, 2025
85f50e8
rx_session_update wip
pavel-kirienko Dec 9, 2025
8d1bda4
wip
pavel-kirienko Dec 9, 2025
ce25980
wip
pavel-kirienko Dec 10, 2025
c98420e
check crc in the first frame
pavel-kirienko Dec 12, 2025
31a17d2
ordered session reception implemented; tests next
pavel-kirienko Dec 13, 2025
5c69a13
fixes
pavel-kirienko Dec 13, 2025
581e41d
fix
pavel-kirienko Dec 13, 2025
875b2f0
fixes
pavel-kirienko Dec 13, 2025
16a520d
512 transfer bits
pavel-kirienko Dec 13, 2025
2b2d580
increase the slot count
pavel-kirienko Dec 13, 2025
3111192
updates
pavel-kirienko Dec 14, 2025
1bcb219
fixes
pavel-kirienko Dec 14, 2025
2e80305
test wip
pavel-kirienko Dec 14, 2025
e56c6a5
test wip
pavel-kirienko Dec 14, 2025
d60e90c
test wip
pavel-kirienko Dec 14, 2025
59073fe
test wip
pavel-kirienko Dec 14, 2025
bf29d28
expand test coverage
pavel-kirienko Dec 14, 2025
7e85d3c
tests
pavel-kirienko Dec 14, 2025
531960b
expand test coverage
pavel-kirienko Dec 14, 2025
ee0f744
nits
pavel-kirienko Dec 14, 2025
801ad89
bug
pavel-kirienko Dec 14, 2025
77b5f81
ci
pavel-kirienko Dec 14, 2025
d8fe974
nits
pavel-kirienko Dec 14, 2025
0912ef3
add test public and migrate udpard fragment seek test there
pavel-kirienko Dec 15, 2025
e2f7301
coverage
pavel-kirienko Dec 15, 2025
f42ad57
nits
pavel-kirienko Dec 15, 2025
9ebb8dc
move things around
pavel-kirienko Dec 15, 2025
629a3b9
refactor
pavel-kirienko Dec 15, 2025
4befbea
logging
pavel-kirienko Dec 15, 2025
e6703be
refactor
pavel-kirienko Dec 15, 2025
b7552e2
coverage
pavel-kirienko Dec 15, 2025
fd07405
nits
pavel-kirienko Dec 15, 2025
f6ba55a
nits
pavel-kirienko Dec 15, 2025
2480c38
advance
pavel-kirienko Dec 15, 2025
2e9e4da
all rx functions implemented except port push
pavel-kirienko Dec 15, 2025
a90d0c6
udpard_fragment_gather
pavel-kirienko Dec 15, 2025
0ed1cdd
udpard_rx_port_push partial
pavel-kirienko Dec 16, 2025
7a6741a
only stateless is missing
pavel-kirienko Dec 16, 2025
71c53f2
implement acceptance fully
pavel-kirienko Dec 16, 2025
e42f628
fix
pavel-kirienko Dec 16, 2025
cae58b6
wip
pavel-kirienko Dec 16, 2025
708c30d
test port
pavel-kirienko Dec 16, 2025
130e5c6
coverage
pavel-kirienko Dec 16, 2025
97fb7bf
coverage
pavel-kirienko Dec 16, 2025
85e51be
coverage 100%
pavel-kirienko Dec 16, 2025
536db18
renaming
pavel-kirienko Dec 16, 2025
02f0c2f
simplify
pavel-kirienko Dec 16, 2025
64b3e86
doc review
pavel-kirienko Dec 16, 2025
8751e8e
doc review
pavel-kirienko Dec 16, 2025
005caec
simplify
pavel-kirienko Dec 16, 2025
9e258d3
docs
pavel-kirienko Dec 17, 2025
77864f5
docs
pavel-kirienko Dec 17, 2025
0876c02
remove p2p port from the rx instance; the tests are not updated yet
pavel-kirienko Dec 17, 2025
1a0c0ca
tests
pavel-kirienko Dec 17, 2025
872943b
add the history log
pavel-kirienko Dec 17, 2025
b4ce3f3
tests
pavel-kirienko Dec 17, 2025
577fb47
add a test that reveals an edge case; the tests are hence broken
pavel-kirienko Dec 17, 2025
12ebc16
simplify#
pavel-kirienko Dec 17, 2025
24c2f12
update tests
pavel-kirienko Dec 17, 2025
1725773
MORE COVERAGE
pavel-kirienko Dec 17, 2025
09c6a53
start on 2e2
pavel-kirienko Dec 18, 2025
ef7f333
e2e
pavel-kirienko Dec 18, 2025
d67b863
readme
pavel-kirienko Dec 18, 2025
11573ab
readme
pavel-kirienko Dec 18, 2025
081ea07
Remove hexdump.hpp
pavel-kirienko Dec 18, 2025
bf4772d
require non-negative timestamps
pavel-kirienko Dec 18, 2025
35d6248
udpard_is_valid_endpoint
pavel-kirienko Dec 18, 2025
5d71d60
update udpard_fragment_gather
pavel-kirienko Dec 18, 2025
c479834
nits
pavel-kirienko Dec 18, 2025
96ac7b5
update udpard_fragment_gather
pavel-kirienko Dec 19, 2025
5a24c0b
coverage
pavel-kirienko Dec 19, 2025
2e47d18
tests
pavel-kirienko Dec 19, 2025
e5dfb3b
more tests
pavel-kirienko Dec 19, 2025
365cae9
formatting
pavel-kirienko Dec 19, 2025
9b6c7c9
simplify the ejection tracking significantly, remove the bitmask windows
pavel-kirienko Dec 19, 2025
8a419c6
remarks
pavel-kirienko Dec 19, 2025
b92c423
add UDPARD_IPv4_SUBJECT_ID_MAX
pavel-kirienko Dec 20, 2025
a598ee8
per-port callbacks
pavel-kirienko Dec 21, 2025
0319d2e
udpard_rx_new does not need to return anything now
pavel-kirienko Dec 21, 2025
c36d2e6
style
pavel-kirienko Dec 21, 2025
9915a91
use new vtables; the tests are not yet updated
pavel-kirienko Dec 21, 2025
2f1ba83
update tests
pavel-kirienko Dec 21, 2025
03129f6
remove vtable fun typedefs
pavel-kirienko Dec 21, 2025
5e21508
Add reliable topics (#68)
pavel-kirienko Dec 28, 2025
50b128b
tests
pavel-kirienko Dec 29, 2025
cb5a0c2
nits
pavel-kirienko Dec 29, 2025
109371c
more tests
pavel-kirienko Dec 29, 2025
7463fd6
more tests
pavel-kirienko Dec 29, 2025
ef9eee8
more tests
pavel-kirienko Dec 29, 2025
3b4a1ed
warnings
pavel-kirienko Dec 29, 2025
ac8b38e
docs
pavel-kirienko Dec 29, 2025
fde548e
update cavl
pavel-kirienko Dec 29, 2025
474e7af
docs
pavel-kirienko Dec 29, 2025
379296b
udpard_tx_cancel
pavel-kirienko Dec 29, 2025
cc72ece
pre-deadline retry slack
pavel-kirienko Dec 29, 2025
76762f6
tests
pavel-kirienko Dec 29, 2025
2c932de
remark
pavel-kirienko Dec 31, 2025
166ec7a
P2P feedback carries the remote topic hash and transfer-ID
pavel-kirienko Dec 31, 2025
097d777
tests
pavel-kirienko Dec 31, 2025
6307e1e
udpard_user_context_t
pavel-kirienko Dec 31, 2025
a5fbb3a
lint
pavel-kirienko Dec 31, 2025
b6c1b69
modify the user context
pavel-kirienko Jan 1, 2026
ee9afe8
remarks
pavel-kirienko Jan 1, 2026
3a48b90
increase the context size up to 6 pointers
pavel-kirienko Jan 2, 2026
97b2c7c
pass ejection by pointer
pavel-kirienko Jan 3, 2026
a5f211f
Extend RX_TRANSFER_ORDERING_WINDOW
pavel-kirienko Jan 3, 2026
c6113b9
udpard_tx_pending_iface_mask
pavel-kirienko Jan 3, 2026
ec63c2d
remarks
pavel-kirienko Jan 3, 2026
4db8794
union
pavel-kirienko Jan 4, 2026
7086824
report the number of acknowledgements in the feedback struct
pavel-kirienko Jan 6, 2026
0d6ba26
tests
pavel-kirienko Jan 6, 2026
1dda7a0
16-bit ack counter
pavel-kirienko Jan 7, 2026
71a93ac
remarks
pavel-kirienko Jan 7, 2026
4cf4613
todo
pavel-kirienko Jan 9, 2026
cdd62d7
cmake
pavel-kirienko Jan 10, 2026
1752b61
nits
pavel-kirienko Jan 10, 2026
a6c5277
fix transfer fragment offset handling in p2p rx; tests will be added …
pavel-kirienko Jan 10, 2026
70bc9cf
cover the previous changeset with tests
pavel-kirienko Jan 10, 2026
1100c65
use vtables in memory resources too
pavel-kirienko Jan 10, 2026
dd7dd26
update the test suite
pavel-kirienko Jan 11, 2026
deb3d45
nits
pavel-kirienko Jan 12, 2026
7ee2bbc
udpard_make_deleter
pavel-kirienko Jan 12, 2026
8f56aef
udpard_fragment_free_all takes a deleter instead of mem resource
pavel-kirienko Jan 12, 2026
13fd72c
add udpard_tx_redirect() but without tests; I think there is a much b…
pavel-kirienko Jan 12, 2026
6721481
new ejection logic with delayed subject-ID derivation; the tests are …
pavel-kirienko Jan 12, 2026
47c6bf8
update the tests
pavel-kirienko Jan 13, 2026
f1e02b1
reduce UDPARD_USER_CONTEXT_PTR_COUNT
pavel-kirienko Jan 13, 2026
61c62f1
udpard_tx_cancel_all
pavel-kirienko Jan 13, 2026
23216e1
reduce context size
pavel-kirienko Jan 13, 2026
94fbebd
adjust the context size
pavel-kirienko Jan 14, 2026
1fd34e7
rearrange actions in tx_push
pavel-kirienko Jan 16, 2026
548f8f1
fix wrong assert
pavel-kirienko Jan 17, 2026
321d3af
udpard_tx_cancel_p2p
pavel-kirienko Jan 17, 2026
6b517d8
add out transfer ID for P2P
pavel-kirienko Jan 17, 2026
f4a875f
do not eject from push functions
pavel-kirienko Jan 17, 2026
f187562
tests
pavel-kirienko Jan 17, 2026
83a9dfd
minor renaming
pavel-kirienko Jan 17, 2026
7070a03
add reliable ordered delivery test
pavel-kirienko Jan 18, 2026
7eb603a
Experimental unordered (#69)
pavel-kirienko Jan 29, 2026
6ae1709
fix AVL ordering
pavel-kirienko Jan 30, 2026
1a4263a
Remove the P2P header (#70)
pavel-kirienko Jan 31, 2026
1fe8550
undo user context resize
pavel-kirienko Jan 31, 2026
8a4c474
minor doc correction
pavel-kirienko Jan 31, 2026
689bc35
remove dedicated cancel function for p2p; use udpard_tx_cancel() for …
pavel-kirienko Jan 31, 2026
91b4ae7
require incompatibility flags
pavel-kirienko Feb 1, 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
107 changes: 14 additions & 93 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,96 +1,17 @@
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
Language: Cpp
BasedOnStyle: Mozilla
IndentWidth: 4
ColumnLimit: 120
Standard: c++20
IndentExternBlock: NoIndent
AlwaysBreakAfterDefinitionReturnType: None
BreakAfterReturnType: None
AllowShortFunctionsOnASingleLine: All
AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignConsecutiveMacros: true
AlignConsecutiveShortCaseStatements: { Enabled: true }
AlignEscapedNewlines: LeftWithLastLine
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
AfterExternBlock: false # Keeps the contents un-indented.
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
# BreakInheritanceList: AfterColon
BreakStringLiterals: true
ColumnLimit: 120
CommentPragmas: '^ (coverity|pragma:)'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeBlocks: Preserve
IndentCaseLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 10000 # Raised intentionally; prefer breaking all
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 10000 # Raised intentionally because it hurts readability
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeCtorInitializerColon: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
...
SortIncludes: false
13 changes: 10 additions & 3 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ Checks: >-
-boost-use-ranges,
-hicpp-static-assert,
-misc-static-assert,
-modernize-macro-to-enum,
-cppcoreguidelines-macro-to-enum,
-bugprone-casting-through-void,
-*-macro-to-enum,
-*-macro-usage,
-*-enum-size,
-*-use-using,
-*-casting-through-void,
-misc-include-cleaner,
-cppcoreguidelines-avoid-do-while,
-*-magic-numbers,
-*-use-enum-class,
-*-use-trailing-return-type,
-*-deprecated-headers,
-*-avoid-c-arrays,
CheckOptions:
- key: readability-function-cognitive-complexity.Threshold
value: '99'
Expand Down
3 changes: 3 additions & 0 deletions .gdbinit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
skip make_frame_base
skip make_frame
skip cavl2_min
90 changes: 64 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
container: ghcr.io/opencyphal/toolshed:ts24.4.3
strategy:
matrix:
toolchain: [ 'clang', 'gcc' ]
toolchain: [ "clang", "gcc" ]
include:
- toolchain: gcc
c-compiler: gcc
Expand All @@ -24,23 +24,28 @@ jobs:
# language=bash
- run: >
cmake
-B ${{ github.workspace }}/build
-B $GITHUB_WORKSPACE/build
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER=${{ matrix.c-compiler }}
-DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }}
.
# language=bash
- run: |
cd ${{ github.workspace }}/build
cd $GITHUB_WORKSPACE/build
make VERBOSE=1 -j$(nproc)
make test ARGS="--verbose"
- name: Archive workspace
if: always()
run: |
cd $GITHUB_WORKSPACE
tar --use-compress-program="gzip -9" -cf $RUNNER_TEMP/workspace.tar.gz .
- uses: actions/upload-artifact@v4
if: always()
with:
# The matrix is shown for convenience but this is fragile because the values may not be string-convertible.
# Shall it break one day, feel free to remove the matrix from here.
name: ${{github.job}}-#${{strategy.job-index}}-${{job.status}}-${{join(matrix.*, ',')}}
path: ${{github.workspace}}/**/*
path: ${{runner.temp}}/workspace.tar.gz
retention-days: 2

optimizations:
Expand All @@ -49,13 +54,13 @@ jobs:
container: ghcr.io/opencyphal/toolshed:ts24.4.3
strategy:
matrix:
toolchain: [ 'clang', 'gcc' ]
toolchain: [ "clang", "gcc" ]
build_type: [ Release, MinSizeRel ]
include:
- toolchain: gcc
c-compiler: gcc
cxx-compiler: g++
cxx-flags: -fno-strict-aliasing # GCC in MinSizeRel C++20 mode misoptimizes the Cavl test.
cxx-flags: ""
- toolchain: clang
c-compiler: clang
cxx-compiler: clang++
Expand All @@ -66,7 +71,7 @@ jobs:
# language=bash
- run: >
cmake
-B ${{ github.workspace }}/build
-B $GITHUB_WORKSPACE/build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_C_COMPILER=${{ matrix.c-compiler }}
-DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }}
Expand All @@ -75,35 +80,68 @@ jobs:
.
# language=bash
- run: |
cd ${{ github.workspace }}/build
cd $GITHUB_WORKSPACE/build
make VERBOSE=1 -j$(nproc)
make test ARGS="--verbose"
- name: Archive workspace
if: always()
run: |
cd $GITHUB_WORKSPACE
tar --use-compress-program="gzip -9" -cf $RUNNER_TEMP/workspace.tar.gz .
- uses: actions/upload-artifact@v4
if: always()
with:
# The matrix is shown for convenience but this is fragile because the values may not be string-convertible.
# Shall it break one day, feel free to remove the matrix from here.
name: ${{github.job}}-#${{strategy.job-index}}-${{job.status}}-${{join(matrix.*, ',')}}
path: ${{github.workspace}}/**/*
path: ${{runner.temp}}/workspace.tar.gz
retention-days: 2

avr:
coverage:
if: github.event_name == 'push'
runs-on: ubuntu-latest
env:
mcu: at90can64
flags: -Wall -Wextra -Werror -pedantic -Wconversion -Wtype-limits
strategy:
matrix:
std: [ 'c99', 'c11', 'gnu99', 'gnu11' ]
container: ghcr.io/opencyphal/toolshed:ts24.4.3
steps:
- uses: actions/checkout@v4
with:
submodules: true
# language=bash
- run: >
cmake -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=Debug -DNO_STATIC_ANALYSIS=ON -DENABLE_COVERAGE=ON .
# language=bash
- run: |
sudo apt update -y && sudo apt upgrade -y
sudo apt install gcc-avr avr-libc
avr-gcc --version
- run: avr-gcc libudpard/*.c -c -std=${{matrix.std}} -mmcu=${{env.mcu}} ${{env.flags}}
cd $GITHUB_WORKSPACE/build
make -j$(nproc) && make test && make coverage
- name: Archive workspace
if: always()
run: |
cd $GITHUB_WORKSPACE
tar --use-compress-program="gzip -9" -cf $RUNNER_TEMP/workspace.tar.gz .
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{github.job}}-#${{strategy.job-index}}-${{job.status}}
path: ${{runner.temp}}/workspace.tar.gz
retention-days: 30

# TODO: re-enable this
# avr:
# if: github.event_name == 'push'
# runs-on: ubuntu-latest
# env:
# mcu: at90can64
# flags: -Wall -Wextra -Werror -pedantic -Wconversion -Wtype-limits
# strategy:
# matrix:
# std: [ 'c99', 'c11', 'gnu99', 'gnu11' ]
# steps:
# - uses: actions/checkout@v4
# # language=bash
# - run: |
# sudo apt update -y && sudo apt upgrade -y
# sudo apt install gcc-avr avr-libc
# avr-gcc --version
# - run: avr-gcc -Ilib/cavl/ libudpard/*.c -c -std=${{matrix.std}} -mmcu=${{env.mcu}} ${{env.flags}}

arm:
if: github.event_name == 'push'
Expand All @@ -112,14 +150,14 @@ jobs:
flags: -Wall -Wextra -Werror -pedantic -Wconversion -Wtype-limits -Wcast-align -Wfatal-errors
strategy:
matrix:
std: [ 'c99', 'c11', 'gnu99', 'gnu11' ]
std: [ "c99", "c11", "gnu99", "gnu11" ]
steps:
- uses: actions/checkout@v4
# language=bash
- run: |
sudo apt update -y && sudo apt upgrade -y
sudo apt-get install -y gcc-arm-none-eabi
- run: arm-none-eabi-gcc libudpard/*.c -c -std=${{matrix.std}} ${{ env.flags }}
- run: arm-none-eabi-gcc -Ilib/cavl/ libudpard/*.c -c -std=${{matrix.std}} ${{ env.flags }}

sonar:
runs-on: ubuntu-latest
Expand All @@ -138,12 +176,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
distribution: "zulu"
# language=bash
- run: |
clang --version
Expand Down Expand Up @@ -178,6 +216,6 @@ jobs:
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.20
with:
source: './libudpard ./tests'
extensions: 'c,h,cpp,hpp'
source: "./libudpard ./tests"
extensions: "c,h,cpp,hpp"
clangFormatVersion: ${{ env.LLVM_VERSION }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@
*.hex
*.dSYM/
*build/
build*/
cmake-build-*/
build-avr/
.cache/
.metadata
.settings
.project
.cproject
.pydevproject
.gdbinit
.scannerwork/
.vscode/
.sisyphus/
**/.idea/*
!**/.idea/dictionaries
!**/.idea/dictionaries/*
Expand Down
24 changes: 24 additions & 0 deletions .idea/dictionaries/project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading