Validate release RPM installs and GUI startup on target distributions

This commit is contained in:
Codex committed 2026-11-29 20:47:54 +01:00
1 parent 9bbc3950e1
commit 152a4ac5f6
2 files changed
+151

No files matched your search

+86
View File
@@ -0,0 +1,86 @@
name: Release RPM smoke
on:
workflow_dispatch:
inputs:
run-id:
description: Release workflow run containing the RPM artifacts (empty selects latest release branch run)
type: string
default: ""
pull_request:
paths:
- .github/workflows/release-rpm-smoke.yml
- .github/scripts/release-rpm-smoke.py
permissions:
contents: read
actions: read
jobs:
smoke:
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
platform:
- {arch: x86_64, runner: ubuntu-24.04}
- {arch: aarch64, runner: ubuntu-24.04-arm}
distro: [fedora, rocky, opensuse]
runs-on: ${{ matrix.platform.runner }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Download the release packages
env:
GH_TOKEN: ${{ github.token }}
RUN_ID: ${{ inputs.run-id }}
ARCH: ${{ matrix.platform.arch }}
run: |
if [ -z "$RUN_ID" ]; then
RUN_ID=$(gh run list --workflow release.yml --branch release --limit 1 --json databaseId --jq '.[0].databaseId')
fi
[[ "$RUN_ID" =~ ^[0-9]+$ ]]
mkdir -p packages results
gh run view "$RUN_ID" --json headSha,url > results/source.json
gh run download "$RUN_ID" --name "release-linux-$ARCH" --dir packages
sha256sum packages/*.rpm > results/rpm-sha256.txt
- name: Install and start the RPM on the target distribution
env:
DISTRO: ${{ matrix.distro }}
run: |
sudo apt-get update -qq
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1440x900x24 -ac -nolisten tcp > results/xvfb.log 2>&1 &
for attempt in {1..20}; do
[ -S /tmp/.X11-unix/X99 ] && break
sleep 1
done
case "$DISTRO" in
fedora) image=fedora:latest ;;
rocky) image=rockylinux:10 ;;
opensuse) image=opensuse/tumbleweed:latest ;;
esac
docker pull "$image"
docker image inspect "$image" --format '{{json .RepoDigests}}' > results/container-digest.json
docker run --rm --name rpm-smoke -e DISTRO -e DISPLAY=:99 -e LIBGL_ALWAYS_SOFTWARE=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro -v "$PWD/packages:/packages:ro" \
-v "$PWD/results:/results" -v "$PWD/.github/scripts:/checks:ro" "$image" bash -euc '
cat /etc/os-release > /results/os-release.txt
if [ "$DISTRO" = opensuse ]; then
zypper --non-interactive refresh
zypper --non-interactive install python3 Mesa-dri Mesa-libEGL1 libX11-6 libXcursor1 libXi6 libXrandr2 libxkbcommon0
zypper --non-interactive --no-gpg-checks install /packages/*.rpm
else
dnf -y install python3 mesa-dri-drivers mesa-libEGL libX11 libXcursor libXi libXrandr libxkbcommon
dnf -y --nogpgcheck install /packages/*.rpm
fi
rpm -qp --requires /packages/*.rpm > /results/rpm-requires.txt
python3 /checks/release-rpm-smoke.py
'
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
if: always()
with:
name: rpm-smoke-${{ matrix.distro }}-${{ matrix.platform.arch }}
path: results/
if-no-files-found: error