Suggestion: forcing Travis CI to render verbose build output

Pkg3 currently directs all output from the Pkg.build() process to a log file. That’s generally nice, as it keeps the terminal from filling up with tens of thousands of lines of autotools output, but it’s a hassle on Travis CI, where it results in builds being terminated early (because they don’t output anything for > 10 minutes) and makes build issues harder to debug.

There’s an open issue here: https://github.com/JuliaLang/Pkg.jl/issues/665 so I’m sure this will get fixed eventually, but I thought I’d post a useful workaround of my own (based on the suggestions from https://github.com/JuliaLang/Pkg.jl/issues/665#issuecomment-416904984 ).

If you want the full build log to be printed in your Travis CI build, just add the following to your .travis.yml:

before_script:
  # Every 30 seconds, look for the build log file. If it exists, then
  # start watching its contents and printing them to stdout as they
  # change. This has two effects:
  #   1. it avoids Travis timing out because the build outputs nothing
  #   2. it makes it more obvious what part of the build, if any, gets stuck
  - while sleep 30; do tail ~/build/JuliaPackaging/CMake.jl/deps/build.log -f ; done &

(replacing JuliaPackaging/CMake.jl with your particular repo).

I’m also open to suggestions if people have ways to make this workaround even better.

2 Likes

Did you make any progress on this?

I have a similar issue where I would like to see some feedback during builds that take a long time. I was wondering whether there is a way to enable verbose from within build.jl?

Verbosity of Pkg.build is default since Julia 1.0: https://github.com/travis-ci/travis-build/pull/1615.

1 Like