Add Travis CI config#88
Conversation
You can flip the switch (enable testing) for your fork on your Travis account page. Then Travis will run the tests for you. |
I know, I was just lazy and mentally ignored the option 😉 I'll go do that and see what happens. |
|
Well... good news is it ran. Bad news is we have some missing https://travis-ci.org/WasabiFan/ev3dev.github.io/builds/99493798 |
|
@dlech Should I continue and fix these reported issues to get a clean build? I want to make sure I don't put much more effort into it if you don't want the changes. If so, we'll also need to fix the BOMs, some of which you have already fixed in your branch. That means that it would create merge conflicts, so we need to sync up on that. |
|
1039 errors. That's not so bad is it? Seriously though, wait for me to merge #86 and then try again before fixing anything. |
The majority of them are duplicated on pretty much every page because they are from the header, so it should actually be pretty easy. Although some of them might require some path fiddling...
Will-do. And honestly, I don't really have any other choice at the moment 😉 |
|
Yeah, it looks like if you add an |
da469eb to
434dd78
Compare
|
OK, most of the issues are now fixed. I expect that once I fix relative link resolution it'll be happy. https://travis-ci.org/WasabiFan/ev3dev.github.io/builds/99527585 |
|
@dlech Any ideas how I can get the URLs to resolve properly? This is an issue we've been needing to address for a while, so we should get a permanent solution if possible. The issue is that all our paths reference If we put that logic into the |
|
Can we make our own plugin that provides |
This is a tough question to answer because there are different answers depending on how you meant the question. GitHub already publishes a plugin called GitHub-metadata that makes the same information that is available on GH Pages servers available on dev machines. We could write a plugin to put our own data there to fake whatever we need, but that prevents us from using their official plugin to supply other repo metadata, which is something that I would rather not do. We might be able to write a plugin (maybe fork theirs?) that sets just the URL and forwards the other GitHub data, or maybe it would overwrite just the URL; those are both options, but do require a significant effort. |
|
So what exactly about GitHub-metadata would need to be changed? It sounds like exactly what we need. The readme says it has |
|
If we enable the real metadata, because we use |
|
I think I might have a viable solution. I will try tomorrow and see. |
|
As far as I can tell, the only item left to be done on this is to merge a finished version of #91 and add the requisite option to that new script to set the base URL for the CI server. |
|
OK, you should be able to modify this using something like this This should be run with ev3dev.github.io as the current working directory. You must run jekyll before this so that |
|
OK, I should be able to get it to work using this. Will try later today. Thanks! |
|
@dlech It doesn't look like the publish script is executable. Can you add execute permissions or explain what I'm doing wrong? |
|
It is executable. You could run |
|
Also, I don't think byte order marks are a problem unless they are in an include file which causes them to end up in the middle of a file instead of at the beginning. |
According to the Jekyll docs, they have been known to cause issues -- I think that is reason enough to just remove all of them, regardless of our thoughts on the issue. There's no reason to have them, as far as I know. Plus, if we wanted to be selective, we would need to remove them from all content files, layouts that aren't |
|
@dlech Should links that previously pointed to |
|
Unfortunately, at this point I think I have done all I can to fix the broken external links. The rest are all kernel documentation and Ubuntu release notes, which I can't re-locate myself without adequate understanding. After that, HTML validation should be easy to fix by myself, if there are any issues at all. |
|
I just enabled HTML verification and started fixing those issues. It found a few errors in various docs pages, a few in index pages, and some other misc stuff. Most of it was just typos and/or not understanding the types of elements that can go in I am seeing parser errors on one of the pages -- I can't quire tell what the issue is, but the error is occurring on both a We're close! P.S. After all this is done, you'll need to go through the diff and make sure that I didn't modify any pages that I wasn't supposed to (i.e. pages that were autogened). But it isn't time for that quite yet. |
|
I just pushed another round of link fixes. One thing I learned you might find useful is that jekyll does not have an html escape function. However, I used the |
|
The most recent build just finished. Only a few more issues left (14 in total). A few of them are very easy to fix, but It'll be an hour or so before I can get to fixing any of the links or other errors. |
|
OK, I'll give it another go. |
|
http://processors.wiki.ti.com seems to be having server issues, so we will have to ignore those for now. |
|
Is there a way to tell the link checker to ignore certain pages, like the example project page? I've pushed more changes (and apparently caused another merge conflict). |
Yes, there is! Although I think you were asking about ignoring pages on our site, I think the best option is to ignore specific destination URLs. Our test command currently looks like this: That You should be able to add more items so that we also ignore the fake GitHub project on the example page and the ti.com ones. The repo for the lib that we use is here, so you can see what they support. But unfortunately most of the docs are for the Ruby interface, so you have to figure out how to translate what would normally be an array onto the CLI. It might just be |
|
Good to know. Hopefully the ti links are just temporary. I think they were working earlier today. I don't think we want to add them to the list because we might forget to remove it. |
|
I don't think we're going to get this green today. I think we are close enough on the links for now other than ignoring the github link on the example project page. I can fix the rest later and hopefully the ti wiki will come back online. Let me know when you are ready to merge. |
I agree, although I can probably make some progress later today.
I'm not sure I understand... you're saying you want to merge but not enable Travis on the main repo? That would make sense. In that case, I don't think there is anything else that I feel I need to do. If, however, you want to then enable the CI server, I would recommend that you instead wait until the build passes so that people opening PRs aren't yelled at for no fault of their own. |
|
Earlier, you said...
So I got the impression that you had some more changes you wanted to make before I merge this. If not, I'll go ahead and merge no, otherwise I'll wait for you to say when. |
I do have more changes that I want to make before we actually enable the CI server on the main repo. But I have no issue with you merging now, assuming that I haven't made any changes that would be lost when you update drivers. And given that I have fixed loads of links and HTML syntax, merging without enabling the server will still provide benefit. |
|
I'm going to go ahead and merge then. It's not going to hurt if I enable CI is it? We know it's just going to fail, but so what? |
|
By the way, thanks very much for this. It's going to be very useful when I do kernel releases to make sure I got all of my links right. |
It will hurt if someone opens a PR against the repo. It will tell them that their code is broken, even though it isn't -- and they won't know why. And every time you push a commit it will send you an email telling you about it. On the flip side, why would we want to enable it? If you want to check to see if you broke anything between now and when we fix the rest of the issues, you can just run the
That's my hope! And it already fixed a bunch of issues that we hadn't (and probably wouldn't have) noticed without it. |
This is my 10-minute attempt to write some CI scripts for this repo. I have tested most of it, but as I don't have a Linux machine easily accessible I can't make any promises until it runs on a real server. If you want it, enable Travis and we can test; if not, feel free to close the PR without merging.
Current functionality:
Interesting note: This build will currently fail because we have BOMs in multiple files in master. I'd estimate around 70% of our files are plain ASCII, the rest are binary or UTF-8. Current list of files with BOMs:
I see an interesting pattern when you correlate the files that I made and the files that show up in that list 😉
.sodependencies so I can't test it.