-
Notifications
You must be signed in to change notification settings - Fork 34
Provide instruction to test libraries / sketches with dependencies #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here's how you'd enable unit tests with a dependent library (via https://github.com/ianfixes/arduino_ci/blob/master/REFERENCE.md): unittest:
libraries:
- "abc123"
- "def456"
platforms:
- mega2560 That will cause the library manager to download For unregistered libraries, I have to leave it to the developer to put the appropriate download commands into their build scripts such that the dependent libs end up in the Arduino library directories. Whether that means My personal opinion is that Arduino needs a package manager on par with NPM (NodeJS), bundler (Ruby), or Cargo (Rust) that can handle all those download sources, semver, recursive dependencies, etc. I won't have time to build such a thing and do it correctly. |
Is there a specific thing you'd like to see worded differently in the documentation about dependent libraries? It also occurs to me that I'm very unlikely to be compiling dependent libraries properly. Getting the list of files in the right order is something I'm not sure how to tackle. |
Maybe you might show at least a |
I did https://github.com/scls19fr/mwe_arduino_ci/blob/539938a292459be41981ce2f4dd8391ac857dd27/.travis.yml |
Looks good now with the following
https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97514947 If it was managed by an other script, user will not have to take care about that. |
What I have in #92 should allow you to do this: sudo: false
language: ruby
script:
- bundle install
- bundle exec ensure_arduino_installation.rb
- echo "Arduino library directory:"
- bundle exec arduino_library_location.rb
- wget https://github.com/itead/ITEADLIB_Arduino_Nextion/archive/master.zip
- unzip -o master.zip
- mv ITEADLIB_Arduino_Nextion-master $(bundle exec arduino_library_location.rb)
- bundle exec arduino_ci_remote.rb These lines aren't strictly necessary: - bundle exec ensure_arduino_installation.rb
- echo "Arduino library directory:"
- bundle exec arduino_library_location.rb They will just make the output a bit easier to understand. Can you give that branch a try? The only thing I haven't tested is whether the subshell syntax (wrapping a |
Made a mistake while pushing things up, the ref you want is 6dcc33e |
maybe result should be stored in an environment variable to be reused in
|
OK, looks like I had some minor formatting bugs in there (these dots, not being on the same line) which I just fixed. I'll merge that when the latest tests complete. |
Thanks @ianfixes |
Hello,
I think it should be useful to provide information in doc to test libraries / sketches with dependencies.
I see 2 kind of dependencies:
registered Arduino libraries
unregistered libraries
available from a HTTP server
(like https://github.com/itead/ITEADLIB_Arduino_Nextion/archive/v0.7.0.zip or https://github.com/itead/ITEADLIB_Arduino_Nextion/archive/master.zip )
git repository
My opinion is that arduino-cli should manage this... (instead of everyone doing its own script)
I opened several issues related to this problem.
arduino-cli
A more general issue (that I didn't opened)
Library manager: Library dependencies arduino/Arduino#5795
The concept of environments could help to have several versions of a same library installed without hassle arduino/arduino-cli#108 ... but that's an other story.
What's you opinion about this @ianfixes?
What actions can be done?
Kind regards
The text was updated successfully, but these errors were encountered: