libMy
|
Search and replace all occurrences (in files and file names) of
libMy
(complete name of the library)libmy
(folder name of the library)my
(C++ namespace matching folder name)At a minimum:
cicd/platformio.ini
adding the library dependencies of libMylibmy/library.json
at the dependencies
keyslibmy/examples/sdkconfig.defaults
and tests/sdkconfig.defaults
. libmy/examples/platformio.ini
and tests/platformio.ini.sample
to have the correct configuration for running tests and compiling your library. They will be identical to cicd/platformio.ini
except some CI-specific options (e.g. pins of the test machine)libmy/{include, src}/my
in terms of folder and file content.libmy/library.json
with the correct URLs and author information.../../libmy
at tests/lib/libmy
,tests/src/main.cpp
.gitlab-ci.yml
with the correct PIO_LIB_FOLDER
variablePLATFORMIO_ORG
variable for publishingdocs/src/*.md
.gitlab-ci.yml
, if you do not have actual unit tests or examples.Good luck!
Important folders:
libmy/
libmy/{include, src, examples}/my/
libmy/examples/sdkconfig.defaults
tests/
tests/lib/libmy/
libmy/
, to allow the unit tests to pick up the local library foldertests/test/.keep
Secondary folders:
cicd/
Helper files needed by CI/CDdocs/
Doxygen config and additional doxygen sourcesmisc/
Helper files needed for setting up development, logos, non-source material.tests/platformio.ini
. You can, for exampletests/platformio.ini.sample
to your board and setup, orcicd/platformio.ini
, the file used by CI/CD.clang-format
file to format the source, e.g. by Note on the test project structure. We set up the unit test project in such a way that we can use both pio run
and pio test
to run the unit tests. The two commands are similar but different enough that some commands are available for one and not the other (for example, the compilation database is generated for pio run
but not pio test
). We work around this by providing a test transport (similar to the one provided by pio test
), our own app_main()
function and building sources and tests together.
0. Make sure you have setup your tests/platformio.ini
as above.
pio test
or pio run
, as follows: ./docs/_build/html/index.html
.