mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Capture all themes with native Qt on each desktop platform
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
name: UI screenshots
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
capture:
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
platform: xcb
|
||||
- os: macos-latest
|
||||
platform: cocoa
|
||||
- os: windows-latest
|
||||
platform: windows
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
QT_QPA_PLATFORM: ${{ matrix.platform }}
|
||||
QT_SCALE_FACTOR: "2"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.13"
|
||||
- name: Install Linux display libraries
|
||||
if: runner.os == 'Linux'
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
apt="-o Acquire::Retries=3 -o Acquire::http::Timeout=20"
|
||||
sudo apt-get $apt update
|
||||
sudo apt-get $apt install --no-install-recommends -y \
|
||||
xvfb xauth libegl1 libgl1 libxkbcommon0 libdbus-1-3 \
|
||||
libglib2.0-0 libfontconfig1 libfreetype6 libgssapi-krb5-2 \
|
||||
libxcb-cursor0 libxkbcommon-x11-0 libxcb-icccm4 \
|
||||
libxcb-keysyms1 libxcb-shape0 libxcb-xinerama0 libxcb-render-util0
|
||||
- name: Install PyQt6
|
||||
run: python -m pip install --quiet PyQt6
|
||||
- name: Capture with X11
|
||||
if: runner.os == 'Linux'
|
||||
run: xvfb-run -a -s "-screen 0 2400x1600x24" python -m tests.render_ui --output ui-screenshots --expect-platform xcb
|
||||
- name: Capture with the native platform
|
||||
if: runner.os != 'Linux'
|
||||
run: python -m tests.render_ui --output ui-screenshots --expect-platform ${{ matrix.platform }}
|
||||
- name: Upload screenshots and rendering details
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ui-screenshots-${{ runner.os }}
|
||||
path: ui-screenshots/
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
Reference in New Issue
Block a user