Winston on Travis

I am trying to build documentation on Travis with Literate.jl which contains figures made with Winston.jl. Locally everything works great, but when I build stuff on Travis I get precompilation error:

value = Failed to precompile Winston [bd07be1c-e76f-5ff0-9c0b-f51ef45303c6] to /home/travis/.julia/compiled/v1.1/Winston/TPedU.ji.

Looking on Winston.jl repo I see that it is tested with Travis thus I expected that my figure generation would work on Travis.

Are you on macOS? Travis/Cairo/macOS hasn’t worked for months…

The Travis builds for documentation are on Linux. Uses docker image to run Ubuntu 18.06.

Fixed the issue by looking into Winston recipe for Travis where xvfb-run is used. Thus my .travis.yml doc build:

jobs:
  include:
    - stage: "Documentation"
      julia: 1.1
      os: linux
      script:
        - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
        - if [[ `uname` = "Linux" ]]; then TESTCMD="xvfb-run julia"; else TESTCMD="julia"; fi
        - $TESTCMD --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
                                               Pkg.instantiate(); Pkg.build("Cairo")'
        - $TESTCMD --project=docs/ docs/make.jl
      after_success: skip