-
Notifications
You must be signed in to change notification settings - Fork 146
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
Use Travis CI for automated testing #36
Comments
Let's do everything except the code formatting checks (maybe will want to add them in later and mass-format the code, but I forsee this slowing development with failures due to code formatting that don't bear on functionality, and/or compromising the usefulness of the travis builds because they'd be erroring because of code formatting instead of revealing failures) |
Question: In #33 (comment) you mentioned compiling BareMinimum for each board. Usually for the compilation tests I compile all the example sketches of the libraries bundled with the core. Do you want me to:
Since the time I set up Travis CI for ATTinyCore, I learned how to efficiently configure it so that the formatting checks are done in a separate job from the compilation tests. That means that a formatting problem will not cause the compilation test jobs to fail. It will cause the formatting check job to fail, and thus will still fail the CI build as a whole, but if you look at the Travis CI job list view, you can quickly see which jobs passed and which jobs failed to identify the general cause of the build failure before you even start looking at the job logs. |
That's wonderful re: separating the formatting checks into a separate job! |
Compilation of some of the library examples fail for the 4xx chips with this error:
Is this expected (and therefore I should exclude those compilations from the CI build), or does it indicate a bug (and therefor I should leave the compilations in the CI build)? |
I'm going to say I think that is a.... particularly gross manifestation of the code not fitting in flash. |
OK, I'll exclude them. The Wire library examples with friendly error messages:
Are showing an SRAM shortage. |
Leave the Wire ones without enough SRAM in for the 4k chips (which have 256 bytes of SRAM). The buffer is grotesquely oversized and that's a bug. |
The examples that use Tone should fail on everything except 1616 and 3216 - these are due to pieces of the core not being done yet and should fail. |
And that's another thing - are the Basics, Digital and Analog examples being compiled? They definitely should be in the list - they're probably the most important examples to be testing with. |
I'm currently only compiling BareMinimum and the examples for the bundled libraries. I'll add compilations for those and any additional sketches you want. The only limitation is that Travis CI allows a maximum of 200 jobs per build. I can recursively compile an entire folder of sketches and only add one job per board configuration, but if some of the sketches from a folder must be excluded then I need to break it down into one job per sketch for that folder. We're currently nowhere near 200 jobs, but as more custom menu options are added, the total number of board configurations multiplies. It has been a struggle keeping ATTinyCore under 200. I'm not sure if the same issue will happen in this project. Of course, more compilations inevitably result in a longer CI build duration. |
Do let me know which ones are being excluded. I'm wondering if maybe these examples should be replaced with ones that demonstrate the same thing without needing to be excluded. |
Will the travis configuration need to be adjusted when more boards and more menu options are added, or does that happen automagically? |
Good idea! Current exclusions: EEPROM library:
SoftwareSerial library
SPI library
Wire library
|
It needs to be manually adjusted every time. There is a tool that could maybe eventually be used to automatically update the Travis CI build according to changes to boards.txt, but I haven't investigated the possibility at all: |
None of the "03.Analog" examples bundled with the Arduino IDE are going to compile for the boards that use the You can always add your own sketches to the core that are written specifically for Travis CI testing. Somewhere like |
It turns out An pin names are used in some of the "01.Basics" and "02.Digital" sketches as well, so I'll need to do a single job for each of those sketches for each board configuration. |
You know what? Leave the sketches that fail to compile due to An pin names in, and failing. I will put An defines back in, in some form, so that code which uses them can be made to compile. I think it will cause more problems than it's worth to not support the An notation. |
Uhm.... you're uh, probably going to want to pull current master and work over it with the formatting scripts again >.> I've been busy today. All the planned variants are in now. i would skip testing the 2k parts altogether, or just test like, bare minimum on them. They're all identical to larger variants, and the flash is so constrained that almost no examples will compile on them. |
In terms of board menu options, presently the one coming that will need to be tested is the clock speed options. |
It will probably be quite a while before I have more volunteer time to work on this. I was really hoping it would get merged while there were no conflicts.
Doing a compilation tests whether boards.txt is set up correctly. Usually I'm able to set Travis CI up so it tests these too without adding any additional jobs, since the clock menu has more options than any other custom menu. |
I was hoping to get it merged back before there were merge conflicts too - but I couldn't keep my hands off it yesterday - had energy, nothing else to do, and am excited about the core. And besides, since the boards needed to be added to the travis configuration, I realized I needed to add those boards and variant files anyway for travis to run on those. |
Travis was enabled and reporting set up. |
So, I really need to get automated testing on this core.... There's a $25 cash or $50 in free stuff from my Tindie store bounty on this. |
I'm working on it. |
I'd be happy to set up Travis CI on this repository when you're ready for it. Here is the list of tests I can add:
My preference would be to all of the above, but you are welcome to pick and chose whichever ones you like.
Required infrastructure:
megaTinyCore
branch in https://github.com/SpenceKonde/CI-Reports.REPORT_GITHUB_TOKEN
in the "Name" field.public_repo
to give it the necessary permissions.The text was updated successfully, but these errors were encountered: