Skip to content

Commit b3e64c7

Browse files
author
liubw
committed
Run installer success and failure matrix on isolated Linux distributions
1 parent ab37baf commit b3e64c7

2 files changed

Lines changed: 59 additions & 2 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Installer distro matrix
2+
on:
3+
push:
4+
branches: [codex/music-development]
5+
paths: [install.sh, packaging/**, .github/workflows/installer-matrix.yml]
6+
workflow_dispatch:
7+
permissions:
8+
contents: read
9+
jobs:
10+
install:
11+
name: ${{ matrix.name }}
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 45
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- name: Arch Linux
19+
image: archlinux:base
20+
- name: Ubuntu 26.04
21+
image: ubuntu:26.04
22+
- name: Debian 13
23+
image: debian:13
24+
- name: Ubuntu 24.04 dependency rejection
25+
image: ubuntu:24.04
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
30+
- uses: actions/checkout@v4
31+
with:
32+
repository: NextKde/NextKde
33+
ref: 71a2671f20165bc680e52a69af8abcf1feba5ab4
34+
path: kos-tests
35+
persist-credentials: false
36+
sparse-checkout: tests/app-store
37+
- name: Run real installation and failure cases inside isolated distro
38+
env:
39+
IMAGE: ${{ matrix.image }}
40+
REVISION: ${{ github.sha }}
41+
run: |
42+
mkdir -p results
43+
docker pull "$IMAGE"
44+
docker image inspect "$IMAGE" > results/container-image.json
45+
docker run --rm -v "$PWD:/source:ro" -v "$PWD/results:/results" "$IMAGE" \
46+
bash /source/kos-tests/tests/app-store/run-kmusic-container.sh \
47+
/source "$REVISION" /source/kos-tests/tests/app-store /results
48+
- name: Preserve complete evidence, including failures
49+
if: always()
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: installer-${{ strategy.job-index }}
53+
path: results
54+
retention-days: 14

‎packaging/installer.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def version(tool, required, args):
9595
qmake = qf.read_text()
9696
qml = pathlib.Path(run([qmake,'-query','QT_INSTALL_QML']))
9797
plugins = pathlib.Path(run([qmake,'-query','QT_INSTALL_PLUGINS']))
98-
for module in ['QtQuick/Effects','Qt5Compat/GraphicalEffects','QtQuick/Controls','QtQuick/Dialogs','QtCore']:
98+
for module in ['QtQuick','QtQuick/Effects','Qt5Compat/GraphicalEffects','QtQuick/Controls','QtQuick/Dialogs','QtQuick/Layouts','QtQuick/Window','QtQuick/Templates','QtQml/WorkerScript','QtCore']:
9999
if not (qml/module/'qmldir').is_file(): add('QML:'+module, 'present')
100100
for pattern in ['sqldrivers/libqsqlite.so','imageformats/libqsvg.so']:
101101
if not (plugins/pattern).exists(): add('Qt plugin:'+pattern,'present')
@@ -197,7 +197,7 @@ def xdg(name, fallback):
197197
raise
198198
emit(success=True,code='INSTALLED',version=revision,changed=True,desktopId='kmusic.desktop',logPath=log_path)
199199

200-
if __name__ == '__main__':
200+
def entrypoint():
201201
def interrupted(signum, frame):
202202
raise KeyboardInterrupt()
203203
signal.signal(signal.SIGTERM, interrupted)
@@ -210,3 +210,6 @@ def interrupted(signum, frame):
210210
code = 'PERMISSION_DENIED' if isinstance(e, PermissionError) else ('UNINSTALL_FAILED' if action=='uninstall' else 'INSTALL_FAILED' if stage=='install' else 'INTERNAL_ERROR')
211211
if log: log.write(repr(e)+'\n'); log.flush()
212212
emit(success=False,code=code,stage=stage,message='Operation failed; see the log.',logPath=log_path); sys.exit(CODES[code])
213+
214+
if __name__ == '__main__':
215+
entrypoint()

0 commit comments

Comments
 (0)