-
Notifications
You must be signed in to change notification settings - Fork 522
Improve Travis Builds (inc. additional warnings) #376
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
Conversation
Workaround for Arduino mDNS output noise using IPTABLES. See https://forum.arduino.cc/index.php?topic=469428.0 See per1234/arduino-ci-script#1 Arduino IDE adds a lot of noise caused by network traffic (mDNS?), because it's listening for network-attached devices. Firewall it in the TravisCI environment to cleanup logs. Allow jobs with all warnings enabled to fail. This enables the build to occur, and review of warnings, without requiring these builds to be clean of warnings. Also, only outputs the error logs (not full build logs) for these build options. This is a critical step towards getting to 100% warning-free builds, without interrupting current processes.
When skipping a sketch, would previously show the build output from the prior sketch. This may also have caused a build error if the first sketch was skipped (unverified).
ooh the DNS thing has been a thorn in my side. we should add it to our generic arduino library travis.yml - this is my reminder! |
@ladyada -- Yes! Me too! But please be careful! The commands look to me like a big hammer / quick fix. I've not tested if this impacts other network traffic... so be extra careful before expecting other network functionality (updates, downloads) to work after those commands are used. It probably better would be to block only mDNS traffic, or at least limit only traffic from the Arduino process. But I haven't the time to dig into what ports / protocols / etc. are used, for example, and thus just used the solution from the URIs I included in the |
Odd, same commit worked in my TravisCI build. TravisCI appears to have had a transient error, but I can't request the build to restart? |
hmm you're using travis.org but i think that site has been deprecated? |
? It's unclear why this failed ? I believe this is a transient error, but don't seem to have a button that allows me to request the build restart.... |
i kicked it - yeek at 2 hour runtime. thats so looong |
The 2 hours is only total compute time. Each job should take ~30 minutes. The same error … but not for any reason that I can fathom, unless TravisCI.com allows the iptables changes from one build to affect another build (which would be a major bug, imho). I don't know what to say about that error, other than to note that Commit 157ac15 built successfully on TravisCI.org, just before I submitted this PR. TravisCI.org is still the primary site for free/OSS projects. While there is a beta to enable having both OSS + private projects accessible via TravisCI.com, it's not only unclear what the benefits would be, doing so may be a downgrade: TravisCI.com says it will limit free/OSS projects to 3 simultaneous jobs, while currently TravisCI.org allows more simultaneous jobs (I've seen six running). Based on this, I may keep at TravisCI.org for as long as I can.... |
The installation command is failing without any apparent reason for feather 52832:
From the above, it appears that a successful task would have a line similar to the following:
While the failing build has the following output line, just before crashing with a null de-ref:
Walking backwards, the download failed at line 478. This is definitely a bug in Arduino, as it should NOT crash simply because it failed to download a file. https://travis-ci.com/adafruit/Adafruit_nRF52_Arduino/jobs/253218220#L455 |
This modification reduces the IPTABLES rules to the minimum needed. Specifically, it does NOT create default rules, or edit any existing rules. Instead, it only adds rules to drop mDNS at 5353/udp, and to drop all incoming traffic that's addressed to the mDNS multicast IP address.
The evidence showed the the prior failures to be an arduino bug. In any case, they were unrelated to my changes as they occurred prior to any commands I had added (and the same build with all warnings enabled got past that point). However, I wanted a narrower, more focused set of @ladyada , As requested, I've submitted this PR to enable you to build with additional warnings. The build will still take ~35 minutes, but will now also have builds with additional warnings enabled and only outputs the error lines, allowing focused review of the remaining issues, without causing any CI builds to fail. |
Thank you very much @henrygab for your great work again !! I really like a warning-free complication as possible as well. Ideally we should just run only All Warnings job but warnings can come from other library that we have no control over. I am happy with the current solution. @ladyada If you are also happy with the PR, we could merge it :) |
@hathach yes sounds good! |
This includes a few improvements. Summarized:
Details follow, with line numbers referring to new line numbers.
In file
.travis.yml
:In file
tools/build_all.py
: