.github: ubuntu: fix apt cache
Some checks are pending
Build X servers / ubuntu-fetch-pkg (push) Waiting to run
Build X servers / xserver-build-ubuntu-no-gbm (push) Blocked by required conditions
Build X servers / xserver-build-ubuntu (push) Blocked by required conditions
Build X servers / drivers-prepare-ubuntu (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-elographics:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-evdev:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-joystick:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-keyboard:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-libinput:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-mouse:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-synaptics:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-vmmouse:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-void:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (input-wacom:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-amdgpu:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-apm:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-ark:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-ast:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-ati:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-chips:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-cirrus:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-dummy:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-fbdev:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-freedreno:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-geode:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-i128:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-i740:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-intel:25.0.1) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-mach64:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-mga:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-neomagic:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-nested:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-nouveau:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-nv:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-omap:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-qxl:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-r128:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-rendition:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-s3virge:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-savage:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-siliconmotion:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-sis:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-sisusb:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-suncg14:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-suncg3:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-suncg6:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-sunffb:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-sunleo:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-suntcx:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-tdfx:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-trident:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-v4l:25.0.1) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-vbox:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-vesa:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-vmware:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-voodoo:25.0.0) (push) Blocked by required conditions
Build X servers / drivers-build-ubuntu (video-xgi:25.0.0) (push) Blocked by required conditions
Build X servers / xserver-build-mingw32-ubuntu (push) Blocked by required conditions
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / xserver-build-freebsd (push) Waiting to run
Build X servers / xserver-build-dragonflybsd (push) Waiting to run
Build X servers / xserver-build-netbsd (push) Waiting to run
Build X servers / xserver-build-cygwin (push) Waiting to run
Build X servers / xserver-build-arch (push) Waiting to run
Build X servers / Check Signed-Off-By (push) Waiting to run
Build X servers / Release pushed tag (push) Blocked by required conditions
check PRs for merge conflicts / notify (push) Waiting to run

The previous approach flooded the repository with new caches,
thus leading to unnecessary eviction of other caches. Previously
had splitted restore and save, but that required using separate
keys, and github doesn't report partial cache hits (prefix-only),
thus no chance of skipping unnecessary cache saves.

Instead now moving out populating the cache into a separate job,
which is run before all those who need the cache. This also allows
us skipping `apt-get update` in the individual jobs, thus saving
a bit more time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2026-05-21 18:54:22 +02:00 • committed by Enrico Weigelt
commit 1ef0db61c3
5 changed files with 133 additions and 23 deletions

103
.github/scripts/ubuntu/fetch-pkg.sh vendored Executable file
View file

@ -0,0 +1,103 @@
#!/bin/bash
# NOTE: don't forget to update both fetch-pkg and install-pkg and change cache name
set -e
# Packages which are needed by this script, but not for the xserver build
EPHEMERAL="
libexpat-dev
libgles2-mesa-dev
libxkbcommon-dev
x11-utils
x11-xserver-utils
xauth
xvfb
"
apt-get update
apt-get install -d -y \
$EPHEMERAL \
autoconf \
automake \
build-essential \
ca-certificates \
libaudit-dev \
libbsd-dev \
libcairo2-dev \
libdbus-1-dev \
libdrm-dev \
libegl1-mesa-dev \
libepoxy-dev \
libevdev2 \
libexpat1 \
libffi-dev \
libgbm-dev \
libgcrypt-dev \
libgl1-mesa-dev \
libgles2 \
libglx-mesa0 \
libinput10 \
libinput-dev \
libnvidia-egl-wayland-dev \
libpciaccess-dev \
libpixman-1-dev \
libspice-protocol-dev \
libsystemd-dev \
libtool \
libudev-dev \
libunwind-dev \
libx11-dev \
libx11-xcb-dev \
libxau-dev \
libxaw7-dev \
libxcb-glx0-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-render-util0-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-shm0-dev \
libxcb-util0-dev \
libxcb-xf86dri0-dev \
libxcb-xkb-dev \
libxcb-xv0-dev \
libxcb1-dev \
libxdmcp-dev \
libxext-dev \
libxfixes-dev \
libxfont-dev \
libxi-dev \
libxinerama-dev \
libxkbcommon0 \
libxkbfile-dev \
libxmu-dev \
libxmuu-dev \
libxpm-dev \
libxrandr-dev \
libxrender-dev \
libxres-dev \
libxshmfence-dev \
libxt-dev \
libxtst-dev \
libxv-dev \
mesa-common-dev \
meson \
nettle-dev \
libpango1.0-dev \
pkg-config \
x11-xkb-utils \
xfonts-utils \
xkb-data \
xutils-dev \
libxaw7-dev \
python3-mako \
libxcvt-dev \
git \
sudo
# only pull them into apt cache -- for mingw32 build
apt-get install -d -y mingw-w64-tools gcc-mingw-w64 gcc-mingw-w64-i686 libz-mingw-w64-dev

View file

@ -13,8 +13,6 @@ EPHEMERAL="
xvfb
"
apt-get update
apt-get install -y \
$EPHEMERAL \
autoconf \
@ -96,6 +94,3 @@ apt-get install -y \
libxcvt-dev \
git \
sudo
# only pull them into apt cache -- for mingw32 build
apt-get install -d -y mingw-w64-tools gcc-mingw-w64 gcc-mingw-w64-i686 libz-mingw-w64-dev