8000 Add files needed to compile Ethernet library by jgfoster · Pull Request #180 · Arduino-CI/arduino_ci · GitHub
[go: up one dir, main page]

Skip to content

Add files needed to compile Ethernet library #180

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

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Try different install script to see if we can get the NetworkLib Samp…
…leProject to pass the test.
  • Loading branch information
James Foster committed Nov 8, 2020
commit 15f9c517a61247b7f6793c0da05311590347de14
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ script:
- bundle exec arduino_ci_remote.rb
- cd ../NetworkLib
- bundle install
- ./scripts/install.sh
- bundle exec arduino_ci_remote.rb
10 changes: 5 additions & 5 deletions SampleProjects/NetworkLib/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

cd "$( dirname "${BASH_SOURCE[0]}" )"
cd ../src
rm -rf Ethernet > /dev/null 2>&1
# get Ethernet library
git clone https://github.com/arduino-libraries/Ethernet.git
# if we don't have an Ethernet library, then get the standard one
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a bug in the core library, was it not able to fetch this by specifying a dependency in .arduino-ci.yml?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency in .arduino-ci.yml would bring in the officia 8000 l library (code here?). But for the purposes of this test in Arduino Ci, we'd like to test against our fork of the Ethernet library, since it is our fork that has arduino_ci support.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm missing something, this behavior of "install a standard library if a local one does not exist" is also implemented in the core library:
https://github.com/Arduino-CI/arduino_ci/blob/master/exe/arduino_ci.rb#L170-L173

In other words, if you manually install your own ethernet library locally, then listing a library of the same name in .arduino-ci.yml will not cause the CI runner to overwrite it. The check is simple directory existence: https://github.com/Arduino-CI/arduino_ci/blob/master/lib/arduino_ci/arduino_cmd.rb#L238-L240

So I think this entire script and the reference to it can be deleted

Copy link
Member Author
@jgfoster jgfoster Nov 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment does not do a good job of explaining what I want, so I've revised it.
When we are running the CI tests (on Travis, Appveyor, or GitHub Actions), we won't have the Ethernet library present at first. We don't want arduino_ci to install it because it will install the "standard" one and we want the "custom" one (my bad on the comment). But, I am running the CI tests on my development machine, I don't want it replacing my existing (development) Ethernet library. So, unless .arduino-ci.yml can specify a source (like a Gemfile), then I need the custom script. At least I think so! Does that make more sense?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the purpose was to use our custom Ethernet library (the reference to the "standard" library was a mistake), for purposes of validating that arduino_ci has the required pieces to compile the custom library it is probably sufficient to compile against the standard library, so the above comment can be ignored.

cd $(bundle exec arduino_library_location.rb)
if [ ! -d ./Ethernet ] ; then
git clone https://github.com/arduino-libraries/Ethernet.git
fi
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ test_script:
- bundle exec arduino_ci_remote.rb
- cd ../NetworkLib
- bundle install
- ./scripts/install.sh
- bundle exec arduino_ci_remote.rb
0