compile-sketches
compile-sketches copied to clipboard
Automatic Library Installation from `depends` field in `library.properties`
This PR addresses the limitation described by @per1234 in https://github.com/arduino-libraries/Arduino_UnifiedStorage/pull/30#pullrequestreview-1737436096
The addition of such a capability, where the action parses the library.properties file and then automatically installs the libraries found there, has been proposed but the feature was not implemented so far.
Currently, the compile-sketches action is unable to read dependancies from the depends field. I have documented this issue in https://github.com/arduino/compile-sketches/issues/204 .
- ๐ Identify if
library.propertiesis included in the sketch directory - โ๏ธ Extract the library names from the
dependskey usingre(limitation: only with ',' deliminator) - ๐ง Modified
install_libraries_from_library_manager()function to install identified libraries - ๐ With this PR, there should be no need to seperately specify libraries in the workflow
.ymlfile cc @sebromero
Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.
Comparison is base (
0e82bd5) 99.81% compared to head (1ec0bae) 99.75%.
| Files | Patch % | Lines |
|---|---|---|
| compilesketches/compilesketches.py | 94.44% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #205 +/- ##
==========================================
- Coverage 99.81% 99.75% -0.06%
==========================================
Files 2 2
Lines 1608 1665 +57
==========================================
+ Hits 1605 1661 +56
- Misses 3 4 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@per1234 Can you approve this PR?
- ๐งช Added unit tests
- For get_dependencies_from_properties_file ->
test_get_dependencies_from_properties_file_with_dependencies,test_get_dependencies_from_properties_file_without_dependenciesandtest_get_dependencies_from_properties_file_no_depends_key - For get_library_dependencies ->
test_get_library_dependencies_with_properties_fileandtest_get_library_dependencies_without_properties_file
- For get_dependencies_from_properties_file ->
- โ Linter and Formatting Approved by workflow
There is an error in one workflow, which I don't think is related to this PR.
[2024-02-06T13:41:02.366Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 503 - upstream connect error or disconnect/reset before headers. reset reason: connection failure
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255