No description
Find a file
2022-11-05 08:23:20 -05:00
.github throw warnings if action_install.sh is used and repo does not have 'arduino-library' tag in its topic 2022-10-28 16:46:10 +07:00
assets Added doxygen badge to assets 2020-04-21 15:05:55 -04:00
examples/Blink Use arduino-cli built uf2 file if available 2022-02-10 13:13:38 -06:00
.travis.yml clean up 2021-05-04 23:56:57 +07:00
actions_install.sh don't warn that learn isn't a library 2022-11-05 08:18:35 -05:00
build_platform.py make scripts executable 2022-11-05 08:11:42 -05:00
doxy_gen_and_deploy.sh make scripts executable 2022-11-05 08:11:42 -05:00
doxy_index.html Add automagic doxygen generation and commitage 2018-01-15 00:55:43 -05:00
Doxyfile.default no src afterall 2022-01-25 17:05:39 -05:00
example_actions.yml prettier names for the individual steps 2022-05-01 20:22:48 +02:00
example_travis.yml Install required pip3 in travis example and update the example in README (#72) 2020-04-07 11:48:11 -04:00
install.sh pip without sudo 2021-05-04 23:45:57 +07:00
library_check.sh make scripts executable 2022-11-05 08:11:42 -05:00
LICENSE Initial commit 2015-07-15 12:56:10 -04:00
README.md readme update 2022-02-22 15:48:29 -08:00
run-clang-format.py specify python3; it's more compatible on linux 2022-11-05 08:23:20 -05:00

Arduino CI Scripts

This repos contains various scripts and tools related to running continuous integration (CI) checks on Arduino Library Repos.

There is an associated guide available here: https://learn.adafruit.com/the-well-automated-arduino-library/

Adding GitHub Actions to Repo

  • Create a folder named .github/worflows in the root of the repo.
  • Copy example_actions.yml into the above directory and rename it githubci.yml.
  • Edit githubci.yml and change PRETTYNAME to the library repo name.
  • Here's an example: Adafruit_BME280_Library
  • These actions will now run automatically on any pull, push, or dispatch.

Controlling Test Behavior

The build_platform.py script is used to test each .ino example in the repo for the selected build platforms. The ALL_PLATFORMS dictionary contains a listing of all available platforms. By default, main_platforms is used. Additionally, UF2 files of the compiled sketches can be generated for supported platforms. The behavior can be controlled using special hidden filenames. These are just empty files placed in the root folder:

  • .YOUR_PLATFORM_HERE.test.skip - Skip the specified platform. All others are tested.
  • .YOUR_PLATFORM_HERE.test.only - Test only the specfied platform. All others are skipped.
  • .YOUR_PLATFORM_HERE.generate - Generate UF2 of sketch for specified platform (if supported).

Replace YOUR_PLATFORM_HERE in the name with exact text from ALL_PLATFORMS.

Examples

  • To skip testing on ESP8266, add a file named .esp8266.test.skip
  • To test only the Arduino UNO, add a file named .uno.test.only
  • To skip all and test nothing, add a file named .none.test.only
  • To generate UF2s for PyPortal, add a file named .pyportal.generate

Formatting Check with Clang

The run-clang-format.py script is used to run ClangFormat and check file formatting. See the guide for details on installing clang-format to run formatting locally. Even a single extra white space can cause the CI to fail on formatting. You can typically just let clang do its thing and edit files in place using:

clang-format -i File_To_Format.cpp

Documentation with Doxygen

The doxy_gen_and_deploy.sh script uses Doxygen to generate and deploy documentation for the library. Any issues, like missing documentation, will cause the CI to fail. See the the guide for details on installing and running doxygen locally. The guide also has some tips on basic usage of doxygen markup within your code.