Commit graph

15 commits

Author SHA1 Message Date
Jan Gromeš
e86fb27649
[CI] Measure code coverage after unit test (#1417)
* [CI] Measure code coverage after unit test

* [CI] Update workflow

* [CI] Fix indentation

* [CI] Ignore geninfo errors

* [CI] Force gcov 11

* [CI] Install gcc 11

* [CI] Revert gcc-11

* Use ubuntu 22.04 as unit test runner

* Deploy coverage report to github pages

* Add coverage link

---------

Co-authored-by: jgromes <jan.gromes>
2025-02-10 08:35:52 +01:00
jgromes
bedab1a66d [CI] Add unit test for SPIsetRegValue 2025-01-19 21:48:39 +01:00
jgromes
c4ac0ac68b [CI] Add artificial delay to unit test emulated SPI 2025-01-19 21:46:00 +01:00
jgromes
3e146c891e [CI] Fix SPI log wipe 2025-01-19 21:45:32 +01:00
jgromes
6733847186 [CI] Suppress unused variable warnings for unimplemented functions 2025-01-17 20:24:10 +01:00
jgromes
5efdfb342a [CI] Always test from clean 2025-01-17 20:00:59 +01:00
Jan Gromeš
cbb8d419d1
[CI] Unit test (#1373)
* [CI] Add basic unit testing

* [CI] Add gitignore

* [CI] Install libfmt

---------

Co-authored-by: jgromes <jan.gromes>
2025-01-05 17:23:13 +01:00
Jan Gromeš
bd4ede2fb7
[CI] Add size metrics (#1367)
* [CI] Add CI scripts, save metrics on build

* Fix token name

* Fix path

* Pass size files via artifacts

* Fix path to artifacts

* Fix git hash in artifact filename

* Fix git hash

* Fix artifact name

* Fix artifact path

* Avoid filenames with colons

* Fix artifact paths

* Remove incorrect cd

* Add missing cd

* Fix paths in second repo

* More path fixing

* Fix artifacts repo name

* Remove path from example filename in output

* Add hash to commit message

* Fix typo

* Fix artifact commit message

* Move git hash

* Use GITHUB_SHA variable

* Drop markdown format

---------

Co-authored-by: jgromes <jan.gromes>
2025-01-01 14:14:08 +01:00
Elizabeth Myers
205031550b
Use RadioLibTime_t (aka unsigned long) when dealing with millis() and micros() (#1075)
* Use unsigned long when dealing with millis() and micros().

Although sizeof(uint32_t) == sizeof(unsigned long) on Arduino, this is
not the case on 64-bit Linux, where sizeof(unsigned long) ==
sizeof(uint64_t).

Most timestamp arithmetic and comparisons have been left alone, to
reduce code churn. This is fine, as uint32_t is perfectly wide to store
most timestamp deltas this library will deal with, and C will promote
the integer rather than do a narrowing conversion. The real problem
arises with narrowing conversions being done by assuming timestamps are
32-bit.

No functional changes intended for platforms where sizeof(uint32_t) ==
sizeof(unsigned long) (so most 8/16/32-bit platforms).

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

* Change most timestamps to use RadioLibTime_t.

This makes it obvious what is and isn't a timestamp.

Not everything has been converted; anything dealing with protocol and
chip-level timestamps has been left alone on purpose, to make it clear
that these functions do require 32-bit timestamps.

No functional changes intended on platforms where sizeof(uint32_t) ==
sizeof(unsigned long).

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

* Use uint32_t internally in getTimeOnAir.

We need to not overflow the integers with the shifts and
multiplications, so this is correct behaviour.

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>

---------

Signed-off-by: Elizabeth Myers <elizabeth.jennifer.myers@gmail.com>
2024-04-25 21:50:58 +02:00
jgromes
a4dbae03a3 [MOD] Fixed missing cast (#776) 2023-06-26 19:41:12 +02:00
jgromes
397bd9ab04 [CI] Fix lib include path 2023-05-18 21:59:45 +02:00
jgromes
a97baa6fc2 [CI] Updated SX1261 autotest 2023-05-18 21:57:24 +02:00
jgromes
54c1b30959 Added cleanup to test 2023-05-07 07:40:12 +01:00
jgromes
2a265251b1 Made test scripts executable 2023-05-07 07:23:25 +01:00
jgromes
9ce2581942 Added CI autotest file 2023-05-07 08:19:14 +02:00