# GLMakie with github CI

**URL:** https://discourse.julialang.org/t/glmakie-with-github-ci/106440
**Category:** General Usage
**Tags:** question, package, makie
**Created:** [November 19, 2023, 3:16pm UTC](https://discourse.julialang.org/t/glmakie-with-github-ci/106440 "2023-11-19T15:16:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rwillcox](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@rwillcox](https://discourse.julialang.org/u/rwillcox)
#### Post date: [November 19, 2023, 3:16pm UTC](https://discourse.julialang.org/t/glmakie-with-github-ci/106440/1 "2023-11-19T15:16:38Z")

</div>

Hi new Julia user here, hoping this is the right community to help answer my question.

I’m having issues with GLMakie and my github CI yaml. I’m aware there’s a bit of discussion about this elsewhere online, but haven’t been able to get the existing solutions to work for me. I’ve copied my CI.yml at the bottom.

When I push it up to gh, I get

```julia
...
✗ GLMakie
  344 dependencies successfully precompiled in 256 seconds
  2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages
Run # The Julia command that will be executed
┌ Warning: OpenGL/GLFW wasn't loaded correctly or couldn't be initialized.
│ This likely means, you're on a headless server without having OpenGL support setup correctly.
│ Have a look at the troubleshooting section in the readme:
│ https://github.com/MakieOrg/Makie.jl/tree/master/GLMakie#troubleshooting-opengl.
└ @ GLMakie ~/.julia/packages/GLMakie/F1fQC/src/gl_backend.jl:4
ERROR: LoadError: InitError: Exception[GLFW.GLFWError(GLFW.PLATFORM_ERROR, "X11: The DISPLAY environment variable is missing"), ErrorException("glfwInit failed")]

```

I’ve followed the suggested link and tried to incorporate the changes there, but haven’t been able to make it work.  
I’ve tried adding `DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24'` in front of any julia calls, as well as `sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-d ev libxext-dev xsettingsd x11-xserver-utils` before `uses` commands that run julia-actions. I’m also new to github CI, so that could be part of the problem.

My CI.yml:

```julia
name: CI
 on:
   push:
     branches:
       - main
     tags: ['*']
   pull_request:
 concurrency:
   # Skip intermediate builds: always.
   # Cancel intermediate builds: only if it is a pull request build.
   group: ${{ github.workflow }}-${{ github.ref }}
   cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
 jobs:
   docs:
     name: Documentation
     runs-on: ubuntu-latest
     permissions:
       contents: write
       statuses: write
     steps:
       - uses: actions/checkout@v3
       - uses: julia-actions/setup-julia@v1
         with:
           version: '1' 
       - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-d
       - name: Configure doc environment
         run: |
           DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=docs/ -e '
             using Pkg
             Pkg.develop(PackageSpec(path=pwd()))
             Pkg.instantiate()' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV
       - uses: julia-actions/julia-buildpkg@v1
       - name: Install Julia dependencies
         shell: julia --project=docs/ {0} 
         run: |
           DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=docs/ -e '
           using Pkg;
           # dev mono repo versions
           pkg"dev . ./MakieCore ./GLMakie"' # ./ReferenceTests"
       - uses: julia-actions/julia-docdeploy@v1
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
       - name: Run Doctest
         run: |
           DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=docs -e '
             using Documenter: DocMeta, doctest
             using Jems
             DocMeta.setdocmeta!(Jems, :DocTestSetup, :(using Jems); recursive=true)
             doctest(Jems)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV

```

Does anyone know what I’m missing?

---

<div class="post-metadata">

### Author: ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)
#### Post date: [June 27, 2024, 5:46pm UTC](https://discourse.julialang.org/t/glmakie-with-github-ci/106440/2 "2024-06-27T17:46:38Z")

</div>

Me too! I was about to post something similar. I have a Documenter.jl script that does some 3D rendering that don’t look quite right in CairoMakie or WGLMakie. I’d love to use GLMakie, but so far it is not able to pass that error.

---

<div class="post-metadata">

### Author: ![Niall](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/niall/32/22517_2.png) [@Niall](https://discourse.julialang.org/u/Niall)
#### Post date: [October 13, 2024, 11:29am UTC](https://discourse.julialang.org/t/glmakie-with-github-ci/106440/3 "2024-10-13T11:29:40Z")

</div>

I have the same issue. Does anyone have any solutions? Or are people moving to Cairo?

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [October 13, 2024, 12:40pm UTC](https://discourse.julialang.org/t/glmakie-with-github-ci/106440/4 "2024-10-13T12:40:57Z")

</div>

The glmakie CI runs on GitHub ci without problems so it should be just a matter of correctly taking over those steps from there.

---

<div class="post-metadata">

### Author: ![Niall](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/niall/32/22517_2.png) [@Niall](https://discourse.julialang.org/u/Niall)
#### Post date: [October 30, 2024, 10:42am UTC](https://discourse.julialang.org/t/glmakie-with-github-ci/106440/5 "2024-10-30T10:42:15Z")

</div>

Thanks very much, @sdanisch, and I’m sorry I took so long responding. Your idea worked out fine. 😀 Best wishes.
