Skip to content

Commit

Permalink
Merge pull request #392 from evo-lua/ci-enable-xvfb
Browse files Browse the repository at this point in the history
Enable xvfb for automated tests in the Linux build workflow
  • Loading branch information
rdw-software authored Dec 24, 2023
2 parents 77636c9 + 4846e17 commit 13134d7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ jobs:
run: evo Tests/snapshot-test.lua

- name: Run unit tests
run: evo Tests/unit-test.lua
run: xvfb-run evo Tests/unit-test.lua

- name: Run integration tests
run: evo Tests/integration-test.lua
run: xvfb-run evo Tests/integration-test.lua

- name: Prepare artifacts
run: cp evo evo-linux-x64
Expand Down
5 changes: 3 additions & 2 deletions Tests/Integration/glfw-cursor-image.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ local ffi = require("ffi")
local glfw = require("glfw")
local stbi = require("stbi")

local isWindows = (ffi.os == "Windows")
if not isWindows then
local isMacOS = (ffi.os == "OSX")
if isMacOS then
-- CI runner gets stuck after the window closes. See https://github.com/glfw/glfw/issues/1766
return
end

Expand Down
5 changes: 3 additions & 2 deletions Tests/Integration/glfw-cursor-position.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
local ffi = require("ffi")
local glfw = require("glfw")

local isWindows = (ffi.os == "Windows")
if not isWindows then
local isMacOS = (ffi.os == "OSX")
if isMacOS then
-- CI runner gets stuck after the window closes. See https://github.com/glfw/glfw/issues/1766
return
end

Expand Down
5 changes: 3 additions & 2 deletions Tests/Integration/glfw-poll-button-state.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
local ffi = require("ffi")
local glfw = require("glfw")

local isWindows = (ffi.os == "Windows")
if not isWindows then
local isMacOS = (ffi.os == "OSX")
if isMacOS then
-- CI runner gets stuck after the window closes. See https://github.com/glfw/glfw/issues/1766
return
end

Expand Down
9 changes: 3 additions & 6 deletions Tests/Integration/glfw-webgpu-surface.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ local ffi = require("ffi")
local glfw = require("glfw")
local webgpu = require("webgpu")

local isWindows = (ffi.os == "Windows")
if not isWindows then
local transform = require("transform")
-- GitHub's Unix runners can't request adapters (might not have a "real" GPU or at least it isn't exposed)
-- On OSX, the issue is, presumably, that WebView and GLFW both try to manage the shared app delegate
print(transform.yellow("Skipping WebGPU/GLFW surface test (currently only works on Windows runners)"))
local isMacOS = (ffi.os == "OSX")
if isMacOS then
-- CI runner gets stuck after the window closes. See https://github.com/glfw/glfw/issues/1766
return
end

Expand Down
5 changes: 3 additions & 2 deletions Tests/Integration/glfw-window-size.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
local ffi = require("ffi")
local glfw = require("glfw")

local isWindows = (ffi.os == "Windows")
if not isWindows then
local isMacOS = (ffi.os == "OSX")
if isMacOS then
-- CI runner gets stuck after the window closes. See https://github.com/glfw/glfw/issues/1766
return
end

Expand Down

0 comments on commit 13134d7

Please sign in to comment.