Giter Site home page Giter Site logo

Comments (12)

ianfixes avatar ianfixes commented on July 22, 2024

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 cloneing 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.

ianfixes avatar ianfixes commented on July 22, 2024

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.

scls19fr avatar scls19fr commented on July 22, 2024

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.

scls19fr avatar scls19fr commented on July 22, 2024

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.

scls19fr avatar scls19fr commented on July 22, 2024

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.

ianfixes avatar ianfixes commented on July 22, 2024

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.

ianfixes avatar ianfixes commented on July 22, 2024

Made a mistake while pushing things up, the ref you want is 6dcc33e

from arduino_ci.

scls19fr avatar scls19fr commented on July 22, 2024
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.

scls19fr avatar scls19fr commented on July 22, 2024

Tested in https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97533698

from arduino_ci.

ianfixes avatar ianfixes commented on July 22, 2024

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.

scls19fr avatar scls19fr commented on July 22, 2024

https://travis-ci.com/scls19fr/mwe_arduino_ci/builds/97540536

from arduino_ci.

scls19fr avatar scls19fr commented on July 22, 2024

Thanks @ianfixes

from arduino_ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.