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
added .travis.yml #2
Conversation
- PORTAGE=2.2.15 CATEGORY=xfce-extra | ||
|
||
before_script: | ||
- sudo chmod 777 /etc/passwd /etc/group /etc /usr /usr/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whaaaat?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just convenience as we have to modify stuff in these files/directories below, we could also prefix all commands with sudo
though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that but 777
?! How about a+rwX
instead? Won't make stuff executable.
But in general, a great idea. Full repoman scan is something that should be done often before committing, but it's not because it's too heavy on resources. If we can outsource that to travis, I'd open pull requests to myself just to see the result :). |
That is what I am doing for the science overlay ;-) |
Hmm, does travis re-do all that preparation (portage install etc.) for every task or just once for host doing the work? I wonder if the performance could be improved if we passed a few categories at a time. Maybe even used some globbing to reduce the list :). |
[a-de][dg-z]* type of thing :D |
- cd /usr/portage | ||
|
||
script: | ||
- cd /usr/portage/${CATEGORY} && repoman full -d -v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and i should have some doubt about using -d
. It will kinda add errors for which most of developers don't check, so users will see earlier developer mistakes…
I'm going to fork this and experiment a bit. |
May I suggest using http://docs.travis-ci.com/user/pull-requests/ check for the changed directories in the pull request and just run repoman on these dirs? Then we should get quick results for pull-requests, for the main tree there's already autorepoman that does a great job. |
@junghans, I'm going back to your initial approach. Having too many categories in one job severely increases the risk of timeout :). @mrueg, Kinda the point is to check the whole tree. AutoRepoMan is post-factum. Like, I want to remove package X. I push it here so that travis checks for me if I break something :P. |
Well travis has a maximum run time of 1h, autorepoman (which is parallelized) checks take around 135min iirc. I'm not sure if you can run repoman on the whole tree in under 1h. |
Ok, I did some hacking and testing and here's my ultra-optimal version: https://github.com/mgorny/gentoo-portage-rsync-mirror/blob/travis/.travis.yml :P Highlights:
|
The test run is here; https://travis-ci.org/mgorny/gentoo-portage-rsync-mirror |
Looks good, I took it! |
before_script: | ||
- sudo chmod a+rwX /etc/passwd /etc/group /etc /usr /usr/bin | ||
- echo "portage:x:250:250:portage:/var/tmp/portage:/bin/false" >> /etc/passwd | ||
- echo "portage::250:portage,travis" >> /etc/group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% if these two lines are actually necessary!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
portage: 'portage' user or group missing.
For the defaults, line 1 goes into passwd, and 2 into group.
portage:x:250:250:portage:/var/tmp/portage:/bin/false
portage::250:portage
*** WARNING *** For security reasons, only system administrators should be
*** WARNING *** allowed in the portage group. Untrusted users or processes
*** WARNING *** can potentially exploit the portage group for attacks such as
*** WARNING *** local privilege escalation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So necessary, right? :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting the warning multiple times would be a bit annoying!
Just FYI, packages which make travis fail:
Not bad at all! |
But @junghans, do you consider this ready to merge? It's kinda a goal to avoid changing much in the git ;). In fact, we could commit .travis.yml to CVS instead… it is suitable for use with CVS checkout after all, isn't it? |
I think so! I fixed |
If you want to add something to the top-level in cvs, please discuss this on the mailing lists first. |
I know, @mrueg. The lovely mailing list which will love the idea. Their precious inodes! |
@swegener, can we get this cherry-picked into the git, please? :) |
I did another rebase, now So I guess this testing is really useful ;-) |
BTW, did somebody enable travis for this repo? |
Ok, that's going to be harder. I need someone from masters to give me admin access to the repo since I revoked it from all developers :D. |
Enabled now. |
Ok, we have a problem. Travis doesn't handle the load. I've just noticed there were 8 tests queued, and I cancelled them to get fresh output :). However, it looks like we would use a way to avoid testing every push :). |
@mgorny, is guess you could increase the number of concurrent builds in the travis settings. @henrikhodne, is there a way to only have one build at the time and then skip to the latest commit? |
That settings is already set to 0 = unlimited (I asked them). Looks like things are even worse today. I just canceled a lot of builds since it got stuck since ~12. Either travis is overloaded or they lowered out priority :). |
I disabled checking pushes and left travis for pull requests. We can re-enable them for a while from time to time to get tree-wide check updated. However, we need to look for a more permanent solution. For a start, Patrick has suggested that pcheck is doing tree-wide dependency checks well. We may look into using it. Maybe tree-wide pcheck + repoman full in changed directories. |
No description provided.