Repository navigation
157 lines (144 loc) · 6.28 KB
/
Copy pathLinux-overlay-on-screen.yml
File metadata and controls
157 lines (144 loc) · 6.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI Linux overlay on screen
# The one overlay test that looks at the screen. It builds a real
# retroarch with X11 and OpenGL, runs it under Xvfb on Mesa's software
# rasteriser with an input overlay enabled, threaded video off and then
# on, grabs the screen and checks the overlay is where its config puts
# it and nowhere else. It then checks the menu's mouse cursor with an
# overlay up: a page of "nul" buttons (an LED overlay) must leave the
# cursor to the menu, a page that takes input must not. Last, with the
# overlay LED driver on, it checks that only LED images are hidden and
# that a hidden one stays hidden while its button is held.
#
# Every stubbed overlay test passed while an enabled overlay covered the
# whole screen (2026-09-19). Nothing that stubs the driver, or builds
# the pack by hand, can see that; this can.
on:
push:
branches:
- master
paths:
- 'input/input_driver.c'
- 'input/input_overlay*'
- 'tasks/task_overlay.c'
- 'led/drivers/led_overlay.c'
- 'gfx/gfx_surface.*'
- 'gfx/video_driver.c'
- 'gfx/video_thread_wrapper.*'
- 'gfx/drivers/gl2.c'
- 'menu/menu_driver.c'
- 'input/drivers/x11_input.c'
- 'samples/input/overlay_on_screen/**'
- '.github/workflows/Linux-overlay-on-screen.yml'
pull_request:
paths:
- 'input/input_driver.c'
- 'input/input_overlay*'
- 'tasks/task_overlay.c'
- 'led/drivers/led_overlay.c'
- 'gfx/gfx_surface.*'
- 'gfx/video_driver.c'
- 'gfx/video_thread_wrapper.*'
- 'gfx/drivers/gl2.c'
- 'menu/menu_driver.c'
- 'input/drivers/x11_input.c'
- 'samples/input/overlay_on_screen/**'
- '.github/workflows/Linux-overlay-on-screen.yml'
workflow_dispatch:
permissions:
contents: read
# Only pull requests cancel a superseded run. On master every push
# gets its own group (keyed by the commit), so a burst of pushes queues
# instead of cancelling the run for the commit before it.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
overlay-on-screen:
name: Run retroarch under Xvfb and look at the overlay
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Install dependencies
timeout-minutes: 5
run: |
for i in 1 2 3; do
sudo timeout 90 apt-get update -y \
-o Acquire::Retries=3 -o Acquire::http::Timeout=30 && break
echo "apt-get update failed (attempt $i); retrying in 10s"
sleep 10
done
sudo apt-get install -y \
-o Acquire::Retries=3 -o Acquire::http::Timeout=30 \
build-essential zlib1g-dev ccache python3 \
xvfb x11-apps libgl1-mesa-dri \
libx11-dev libx11-xcb-dev libxcb1-dev libxext-dev libxtst6 \
libxxf86vm-dev libxrandr-dev libxinerama-dev \
libgl-dev libegl-dev
- name: Checkout
uses: actions/checkout@v5
- name: Restore ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-
- name: Enable ccache
run: |
set -eu
export CCACHE_DIR="$HOME/.ccache"
echo "CCACHE_DIR=$CCACHE_DIR" >> "$GITHUB_ENV"
echo "/usr/lib/ccache" >> "$GITHUB_PATH"
ccache -M 500M
ccache -z
- name: Build RetroArch (X11 + OpenGL, the rest off)
shell: bash
run: |
set -eu
# What draws the overlay has to be real: X11, the gl driver,
# the menu, threads. Everything else is build time.
./configure --disable-qt --disable-wayland --disable-sdl \
--disable-sdl2 --disable-ffmpeg --disable-vulkan \
--disable-pulse --disable-discord \
--disable-networking --disable-cheevos \
--disable-glslang --disable-slang \
--disable-spirv_cross --disable-xmb \
--disable-materialui --disable-ozone \
--disable-7zip --disable-flac \
--disable-audiomixer --disable-translate \
--disable-accessibility --disable-crtswitchres \
--disable-langextra --disable-libretrodb \
--disable-video_filter --disable-dsp_filter
make -j$(nproc)
ccache -s
- name: Run overlay_on_screen_test (threaded video off, then on)
shell: bash
run: |
set -eu
# Two solid magenta squares on a full-screen page. Each must
# be where the config puts it, the middle of the screen must
# not be overlay, and the overlay must cover about the area of
# its two squares. With "does this desc have an image" asked
# of pixels that had just been released, no desc's geometry
# was set and the overlay covered 100% of the screen, in both
# modes.
timeout 180 python3 samples/input/overlay_on_screen/overlay_on_screen_test.py ./retroarch
- name: Run overlay_menu_mouse_test (display and input packs, threaded off and on)
shell: bash
run: |
set -eu
# The menu switched its mouse off whenever any overlay was
# alive, so an LED overlay - nothing on it to press - left a
# fullscreen desktop user with no menu cursor. A pack of
# "nul" buttons must now show the cursor where the pointer is
# moved; the same pack bound to "a" must still not.
timeout 180 python3 samples/input/overlay_on_screen/overlay_menu_mouse_test.py ./retroarch
- name: Run overlay_led_hidden_test (mapped and named LED packs, threaded off and on)
shell: bash
run: |
set -eu
# With the overlay LED driver on and Up held through XTEST: an
# image at a ledN_map slot, "nul" or a control, stays hidden,
# as does one named with _led, and a pack that names its LEDs
# is not mapped.
timeout 300 python3 samples/input/overlay_on_screen/overlay_led_hidden_test.py ./retroarch