Closed ocramz closed 8 years ago
Here are some things that probably help to automate builds:
install_petsc.sh
or similar, so that you can install PETSc without any interaction on Travis@bkaestner what do you mean by caching the PETSc installation?
Sorry for the late answer. Travis provides a caching mechanism that enables you to keep certain files (for example a fully compiled PETSc suite). Since all Travis containers run on the same underlying machine, it should be possible to cache the PETSc install directory without problems.
That will keep the build times low (except for the first build, that has to download and compile PETSc).
Thank you; I'm figuring out how to achieve custom Cabal builds using hooks ( #2 ), and once that works I'll focus on CI.
The referenced Travis build matrix by hvr : https://github.com/hvr/multi-ghc-travis
It seems like dependency caching on travis-ci is only possible for private repos and the "new" (docker-based, no sudo commands possible).
Without this, the fetching + building time is around 12 minutes. :/
container-based build as of https://github.com/ocramz/petsc-hs/commit/03af1ca174586f6bda1c5ac09dc93463a097c06e
.cabal cleaned up, stack-based installation and Travis script up and running ; the build is reproducible, at least on OSX and Linux (see README.md).
However it appears that stack path
is not aware of some build directories, so stack exec
on the test executable chokes. The problem seems to be when selecting a specific Stackage resolver, rather than leaving it to stack to decide.
/home/travis/build/ocramz/petsc-hs/.stack-work/install/x86_64-linux/lts-3.15/7.10.2/bin /home/travis/build/ocramz/petsc-hs/.stack-work/install/x86_64-linux/lts-3.16/7.10.2/bin /home/travis/build/ocramz/petsc-hs/.stack-work/install/x86_64-linux/nightly-2015-11-30/7.10.2/bin
Currently, testing petsc-hs relies on the user having installed PETSc and the environment variables.
I only commit working installations but I'd like to add a Travis CI build script that checks this for me.