You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split up Cabal's Travis buildjobs into stages #4556
#4529 shows a problem we're starting to run into with cabal's heavy Travis jobs:
If a travis job gets killed due to timeout, it misses the opprotunity to write anything to the Travis cache.
However, there's a recently introduced staged jobs feature which should allow us to build & cache dependencies in an early stage, so that if a later stage runs into a timeout, we'd still have at least not lost the cached work, which could then be reused by a restarted job.
Moreover, this could allow us to split work into smaller logical workunits which travis could then schedule accordingly (as our current jobs seem rather unevenly distributed in terms of work-length).
So I sort of got this to work in #4560 (with help from @BanzaiMan), but there are following problems:
Travis build stages are a bit coarse-grained for our purposes. In principle, each "test" job depends only on one "precache" job, but with build stages all "precache" jobs must finish before we get to the "test" stage. Ideally we'd want a more expressive way to describe job graphs that'd allow to expose more parallelism.
new-build --only-dependencies builds more than is needed by "precache". We don't want to build the Cabal lib and hackage-security in the "precache" stage, since they will not be cached in the store (Cabal is a local package, and hackage-security depends on it), but --only-dependencies can't remove reverse dependencies of a target from the install plan:
$ cabal new-build --only-dependencies --enable-tests cabal-install cabal-tests Cabal --dry-run
cabal: Cannot select only the dependencies (as requested by the
'--only-dependencies' flag), the package Cabal-2.1.0.0 is required by a
dependency of one of the other targets.
new-build --only-dependencies builds more than is needed by "precache".
Btw, I've wanted to have a way to better control what is built (in this case you'd want only non-local deps built). In the case of matrix builder I would need the granularity of adressing to be able to select the build goal(s) by specifying the nix-hash (which I lookup in the plan.json file).
Could we do away with this nonsense with a bit of sponsorship for a real CI solution? The amount of time wasted on the "free tier" of Travis-CI is absurd. (Not that I expect paid Travis-CI to be much better. Their issue tracker tells quite a tale.)
(FWIW, if it helps the community, I'm willing to donate a bit of money[1] towards it... but I think the Haskell.org might also be willing to donate a bit for a project as critical as Cabal?)
[1] Actually, also time, if need be. If there are existing servers which could be recruited for CI, I'd be quite happy to help sysadmin them.
@BardurArantsson We talked with @gbaz about setting up a build farm for core projects like Cabal using haskell.org machines. Servers seem to be available, what's missing is developer/sysadmin time to make it happen.
@gbaz Is there some wiki page or something which describes the current infrastructure? I'd like to get an idea of whether it's similar enough to what I'm used to to see if I could meaningfully contribute...
EDIT: E.g. is it running docker containers, etc. etc?
Activity
phadej commentedon Jun 7, 2017
Seems a bit difficult: https://github.com/travis-ci/beta-features/issues/11#issuecomment-306770378
23Skidoo commentedon Jun 9, 2017
The announcement says that "build stages work as expected when combined with build matrix expansion".
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
2 remaining items
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
Experiment with Travis's build stages.
23Skidoo commentedon Jun 10, 2017
So I sort of got this to work in #4560 (with help from @BanzaiMan), but there are following problems:
new-build --only-dependenciesbuilds more than is needed by "precache". We don't want to build theCaballib andhackage-securityin the "precache" stage, since they will not be cached in the store (Cabalis a local package, andhackage-securitydepends on it), but--only-dependenciescan't remove reverse dependencies of a target from the install plan:hvr commentedon Jun 10, 2017
Btw, I've wanted to have a way to better control what is built (in this case you'd want only non-local deps built). In the case of matrix builder I would need the granularity of adressing to be able to select the build goal(s) by specifying the nix-hash (which I lookup in the
plan.jsonfile).BardurArantsson commentedon Jun 10, 2017
Could we do away with this nonsense with a bit of sponsorship for a real CI solution? The amount of time wasted on the "free tier" of Travis-CI is absurd. (Not that I expect paid Travis-CI to be much better. Their issue tracker tells quite a tale.)
(FWIW, if it helps the community, I'm willing to donate a bit of money[1] towards it... but I think the Haskell.org might also be willing to donate a bit for a project as critical as Cabal?)
[1] Actually, also time, if need be. If there are existing servers which could be recruited for CI, I'd be quite happy to help sysadmin them.
23Skidoo commentedon Jun 11, 2017
@BardurArantsson We talked with @gbaz about setting up a build farm for core projects like Cabal using haskell.org machines. Servers seem to be available, what's missing is developer/sysadmin time to make it happen.
BardurArantsson commentedon Jun 13, 2017
@gbaz Is there some wiki page or something which describes the current infrastructure? I'd like to get an idea of whether it's similar enough to what I'm used to to see if I could meaningfully contribute...
EDIT: E.g. is it running docker containers, etc. etc?
23Skidoo commentedon Jun 13, 2017
@BardurArantsson I've sent you an e-mail.
23Skidoo commentedon Jun 13, 2017
Closing the ticket, since enabling build stages doesn't seem to be worth it currently.