When CONSERVE_MEMORY=ON and gcc is being used, we provide additional
command line options that will minimize the amount of memory used by gcc
when compiling Lean.
This is an attempt to fix the "out-of-memory" failures when building
Lean at Travis.
At https://bitcointalk.org/index.php?topic=304389.0, people suggest
that the failure
g++-4.8: internal compiler error: Killed (program cc1plus)
usually happens when the system does not have enough free memory.
A possible workaround is to disable parallel build, and compile file by
file. I added the option `-j1` to Ninja.
"If you have a command that doesn't produce output for
more than 10 minutes, you can prefix it with travis_wait,
a function that's exported by our build environment."
http://docs.travis-ci.com/user/build-timeouts/
Problem
=======
For efficiency, travis-ci uses shallow clone by doing
git clone --depth=50 ...
which checks out recent 50 commits from the repo.
However, recent changes on bitbucket side rejects a shallow clone of a
repository.
Solution
========
We do
git fetch --unshallow;
before we push to other repositories.
Travis-ci[1] supports encryption key feature[2]. The caveat is that
plain-texts are encrypted and decrypted using repository's public and
private keys. That is, if we migrate our blessed repo to another one, we
need to re-encrypt and update our secure keys in .travis.yml file:
- GH_TOKEN : to push to OSX/Windows repositories
(Github token for account "soonhokong")
- DROPBOX_KEY : to push compiled binaries to DROPBOX
(DROPBOX_KEY=access token)
- REPO : encrypt "BLESSED". If travis-ci is running on another
repository, REPO variable is not decrypted to "BLESSED" because it
will use a different private key. Many actions (i.e. upload to
Dropbox, trigger OSX/Windows Builds) are protected by this
condition.
- COVERALLS_REPO_TOKEN: to push to https://coveralls.io
(https://coveralls.io/r/leanprover/lean)
[1]: http://travis-ci.com
[2]: http://docs.travis-ci.com/user/encryption-keys/
- have build name is in the form of
"<BRANCH>_<CXX_COMPILER>_<BUILD_TYPE>(_TC)?"
to have consistency over time.
- have "Generator" field in cdash XMLs which is in the form of
"<GIT_COMMIT>###<GIT_SUBJECT>"
it will be displayed as a small mouseover-text.