Comments (12)
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 abc123
and def456
if they aren't already.
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 curl
or wget
a URL and unzipping it, or git clone
ing something, that's currently the user's responsibility, and it's documented at https://github.com/ianfixes/arduino_ci/blob/master/REFERENCE.md#custom-versions-of-external-arduino-libraries
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.
from arduino_ci.
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.
from arduino_ci.
Maybe you might show at least a .travis.yml
example showing how to download a zip file using wget
or curl
, unzip this file, create Arduino directory and move lib in this directory.
from arduino_ci.
I did https://github.com/scls19fr/mwe_arduino_ci/blob/539938a292459be41981ce2f4dd8391ac857dd27/.travis.yml
Here is my build job https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97511900
It's failing ... I don't understand why I'm downloading a bad zip file
from arduino_ci.
Looks good now with the following .travis.yml
sudo: false
language: ruby
before_install:
- wget https://github.com/itead/ITEADLIB_Arduino_Nextion/archive/master.zip
- unzip -o master.zip
- mkdir -p ~/Arduino/libraries/
- mv ITEADLIB_Arduino_Nextion-master ~/Arduino/libraries/
script:
- bundle install
- bundle exec arduino_ci_remote.rb
https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97514947
but on Linux, Arduino libraries are in ~/Arduino/libraries
, on OS X it's ~/Documents/Arduino/libraries
If it was managed by an other script, user will not have to take care about that.
from arduino_ci.
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 command
in $( command )
) works in Travis.
from arduino_ci.
Made a mistake while pushing things up, the ref you want is 6dcc33e
from arduino_ci.
bundle exec arduino_library_location.rb
maybe result should be stored in an environment variable to be reused in
mv ITEADLIB_Arduino_Nextion-master $(bundle exec arduino_library_location.rb)
from arduino_ci.
Tested in https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97533698
from arduino_ci.
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.
from arduino_ci.
https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97540536
from arduino_ci.
Thanks @ianfixes
from arduino_ci.
Related Issues (20)
- Output errors to stderr HOT 11
- Empty examples folder causes build to fail HOT 2
- arduino_ci.rb fails to report compile error
- The build-CI does not support setWireTimeout(). HOT 1
- Can RP2040 build environment be supported? HOT 10
- compiling unit tests uses arduino platform specific code HOT 6
- running in gitlab CI HOT 3
- Platform.io Support HOT 3
- Improve factorization of "unused space"
- Running "bundle install --path vendor/bundle" generates deprecated warning HOT 1
- Use temporary directories for unit test artifacts
- ESP32 failing to install in CI build HOT 2
- Update documentation to recommend version pinning
- ESP32 flags unused function as error (should be warning) HOT 9
- libraries: "SoftwareSerial" does not work. HOT 11
- "Bad file descriptor" error when installing HOT 2
- Implement Wire.h slave device mock support
- 1.6.0 error: undefined method `library_of_name' for nil:NilClass (NoMethodError) HOT 5
- Show differences lined up and in quotes
- Unable to find library location on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino_ci.