How to use a headless display - Windows

Bane Sullivan's Avatar

Bane Sullivan

17 Apr, 2019 05:49 PM

How do you set up a headless display on AppVeyor for Windows builds? This process is straightforward for Linux on all other CI services but I am having no luck implementing a solution for this on AppVeyor with windows.

On linux with Travis, its as simple as:

addons:
  apt:
    packages:
      - xvfb

before_script: # configure a headless display to test plot generation
  - export DISPLAY=:99.0
  - which Xvfb
  - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
  # - ls -l /etc/init.d/
  # - sh -e /etc/init.d/xvfb start
  - sleep 3 # give xvfb some time to start

What would be an equivalent for windows?

Particularly, I want to get the open-source library vtki https://github.com/vtkiorg/vtki running in this way. Currently, we skip over half the library's test on windows because we haven't been able to figure this out.

Any help would be greatly appreciated!

  1. 1 Posted by Bane Sullivan on 18 Apr, 2019 04:47 PM

    Bane Sullivan's Avatar

    Fix it. See this repo of helpers: https://github.com/vtkiorg/ci-helpers/tree/master

    Add these two lines to the install script and it works!

    install:  
        - "git clone --depth 1 git://github.com/vtkiorg/ci-helpers.git"
        - "powershell ci-helpers/appveyor/install_opengl.ps1"
    <pre><code></code>
    </pre>
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac