-
Notifications
You must be signed in to change notification settings - Fork 42
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
Allow setting os, dist, and language keys and defaults for them #62
base: master
Are you sure you want to change the base?
Conversation
@seankelly, thanks for your PR! By analyzing the history of the files in this pull request, we identified @Jc2k, @tardyp and @rodrigc to be potential reviewers. |
d2986dc
to
01e50d5
Compare
I would like to have a README paragraph about this in order to better understand how this is supposed to work |
thanks for documenting it. I missed the job_options feature, which I like. os and dist are imho not fitting very well to the matrix concept. people might want to select different images based on other criterias.
so I think it would make more sense to have something like: automatic_properties:
image:
- criterias:
dist: linux_debian_7
langage: c
db: mysql
value: debian_mysql_gcc
- # default
value: default_builder
os:
- criterias:
dist: windows
value: windows
- value: linux obviously this makes the implementation much more complicated than the 4 lines you have :-} |
win + debian_7 wouldn't be possible because it's hierarchical. The debian_7 would only appear under linux. A more complete example:
Definitely can't handle looking up based on other criteria however, such as database. Might be able to do something without too much code. Perhaps select the criteria with the most parts that match, with the first to have that many matches winning. |
This PR sort of does two things:
I've updated my internal version such that the second option is no longer needed. Because of that, if I remove that, would it be possible to merge this? I still need the dist, os, and language properties set. |
I dont see update in the code? did you forget to push? |
I haven't updated the code yet, it was a hypothetical question. |
8f5be81
to
a4fc549
Compare
Did the code change anyway. I think I removed the |
Save the Travis configuration so the builders can get options that are to be added. The defaults matrix will have the option to be overriden but it needs to be overriden somewhere and that needs to be available when triggering jobs.
TravisYml needs to have the configuration so it can override its defaults when parsing the .travis.yml file.
The default matrix lists all of the options for the thing that is being built. The default os and dist match what Travis-CI does, with os set to "linux" and dist set to "precise". The default matrix also sets the keys to search for in the .travis.yml file to expand the build matrix. Each language has different keys about what versions to use. Many use only one, the name of the language, but others have a differently named key or have multiple keys. Support the common, simple case by allowing a language to point to a list or tuple to list the versions to run by default.
Expand the overall matrix to build with the given os and dist options from the config.
Now everything testing the matrix needs the os and dist keys set.
a4fc549
to
1faa09a
Compare
Rebased to fix conflicts. |
@tardyp What do you think of this, does it need further updates to be mergeable? |
I like a lot of what I see here and am prepared to give is a try or even help out. Regarding Another thing that's worth adding, which is also supported on Travis since not too long, is Looking back at #32, I think @vdsbenoit's idea to add the possibility to specify working combinations for the workers, no matter what form (I think that the possibility is sorely lacking for "native" Workers (i.e. not DockerWorker or HyperWorker)). Yes, I understand that there is a way to specify an image using DockerWorker, but doesn't that assume that all workers are able to run all desired images? That's hardly workable with multiple worker platforms, for example... |
This is a fix for #32. I've been running it branched off 0.3 for months and rebased it off master and submitted. No idea yet if tests pass.
The gist is the master-side Travis config can set options for the os, dist, and language keys such as properties for the build to inherit. Defaults are also possible to set so dist can be something other than precise.