Skip to content

Commit

Permalink
ci: fix visual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Nov 22, 2023
1 parent 400be66 commit 9154965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci_visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
DISPLAY: :99
LIBGL_ALWAYS_SOFTWARE: true
SDL2_VERSION: 2.28.2
SHY_CI_VISUAL_TEST: 1
steps:
- name: Checkout V
uses: actions/checkout@v2
Expand Down Expand Up @@ -90,7 +91,7 @@ jobs:
id: compare
continue-on-error: true
run: |
Xvfb $DISPLAY -dpi 96 -screen 0 1280x1024x24 &
Xvfb $DISPLAY -dpi 96 -screen 0 960x614x24 &
sleep 1 # give xvfb time to start
v gret -r ~/.vmodules/shy -t ./shy-visual-tests/vgret.shy_examples.toml -v ./fresh-examples ./shy-visual-tests
v gret -r ~/.vmodules/shy -t ./shy-visual-tests/vgret.shy_visual_tests.toml -v ./fresh-visual-tests ./shy-visual-tests
Expand Down
5 changes: 5 additions & 0 deletions lib/wm.sdl.v
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ fn (mut wm WM) new_window(config WindowConfig) !&Window {
window_flags = window_flags | u32(sdl.WindowFlags.resizable)
}

// NOTE this is a specialcase for Shy's visual tests
if os.getenv('SHY_CI_VISUAL_TEST').len > 0 {
window_flags = window_flags | u32(sdl.WindowFlags.fullscreen)
}

// $if opengl ? {
window_flags = window_flags | u32(sdl.WindowFlags.opengl) | u32(sdl.WindowFlags.allow_highdpi)
// }
Expand Down

0 comments on commit 9154965

Please sign in to comment.