Skip to content

build: bump Qt version #1134

build: bump Qt version

build: bump Qt version #1134

Workflow file for this run

# SPDX-FileCopyrightText: mpvQC developers
#
# SPDX-License-Identifier: MIT
name: Pipeline
on:
push:
branches:
- '**'
tags:
- '*'
defaults:
run:
shell: bash
env:
LIBMPV_URL: https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20260203/mpv-dev-x86_64-20260203-git-db22a45.7z
LIBMPV_SHA256: 55b8160373babe7bebf4faba66840ea4c248a9c0e3e5b4d6cf6bf8fca4681f7e
jobs:
matrix-build:
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
name: Build (${{ matrix.os }})
outputs:
artifact_app_name: ${{ steps.build_step.outputs.artifact_app_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install just
uses: taiki-e/install-action@just
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
- name: Run Build
id: build_step
run: |
set -euo pipefail
function debug() { echo -e "\033[0;35m$*\033[0m"; }
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
#
echo "::group::Download libmpv"
if [ "$RUNNER_OS" == "Linux" ]; then
execute sudo apt update -y
execute sudo apt install -y libegl1 libmpv2
elif [ "$RUNNER_OS" == "Windows" ]; then
ARTIFACT="$(basename "$LIBMPV_URL")"
execute curl -L -O "$LIBMPV_URL"
echo -e "\033[0;34mecho -n $LIBMPV_SHA256 $ARTIFACT > $ARTIFACT.sha256\033[0m"
echo -n "$LIBMPV_SHA256 $ARTIFACT" > "$ARTIFACT.sha256"
execute sha256sum --check "$ARTIFACT.sha256"
execute 7z x "$ARTIFACT"
else
echo "$RUNNER_OS not supported"
exit 1
fi
echo "::endgroup::"
#
echo "::group::Remove Qml Test Files"
execute find . -type f -name 'tst_*' -delete
echo "::endgroup::"
#
echo "::group::Set Build Information"
CURRENT_TAG="$(git describe --tags --abbrev=0)"
debug "git tag: $CURRENT_TAG"
CURRENT_COMMIT="$(git rev-parse HEAD)"
CURRENT_COMMIT="${CURRENT_COMMIT:0:8}"
debug "git commit: $CURRENT_COMMIT"
if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then
IS_RELEASE="true"
debug "This is a release build (triggered by tag)"
else
IS_RELEASE="false"
debug "This is a development build"
fi
ARTIFACT_NAME="mpvQC-$CURRENT_TAG-$CURRENT_COMMIT"
debug "artifact name: $ARTIFACT_NAME"
echo "artifact_app_name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
execute sed -i '1,13s/^version = .*/version = "'"$CURRENT_TAG"'"/' "data/build-info.toml"
execute sed -i '1,13s/^commit = .*/commit = "'"$CURRENT_COMMIT"'"/' "data/build-info.toml"
execute sed -i '1,13s/^is_release = .*/is_release = '"$IS_RELEASE"'/' "data/build-info.toml"
execute cat "data/build-info.toml"
echo "::endgroup::"
#
echo "::group::Setup Virtual Environment"
execute just init
echo "::endgroup::"
#
echo "::group::Run Python Build"
execute just test-python
execute export MPVQC_COMPILE_QML=true
execute just build
echo "::endgroup::"
#
echo "::group::Remove __pycache__ Files"
execute find build/release -type d -name "__pycache__" -print0 | xargs -0 rm -rf
echo "::endgroup::"
#
RELEASE_NAME="release-build-${RUNNER_OS@L}"
echo "release_name=$RELEASE_NAME" >> $GITHUB_OUTPUT
debug "Uploading build/release as $RELEASE_NAME"
- name: Upload Build Artifact
uses: actions/upload-artifact@v6
with:
path: build/release
name: ${{ steps.build_step.outputs.release_name }}
build_windows:
runs-on: windows-latest
name: Build Windows
needs:
- matrix-build
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install just
uses: taiki-e/install-action@just
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
- name: Remove Python sources
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
execute rm -rf mpvqc main.py
- name: Download Build Artifact
uses: actions/download-artifact@v7
with:
name: release-build-windows
path: .
- name: Setup Build Environment
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
execute just init '--no-group dev'
execute uv pip install nuitka
- name: Build Bundle
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
execute source .venv/Scripts/activate
execute python.exe -m nuitka main.py \
--assume-yes-for-downloads \
--deployment \
--enable-plugin=pyside6 \
--include-data-files=.venv/Lib/site-packages/PySide6/translations/qtbase_de.qm=PySide6/translations/ \
--include-data-files=.venv/Lib/site-packages/PySide6/translations/qtbase_en.qm=PySide6/translations/ \
--include-data-files=.venv/Lib/site-packages/PySide6/translations/qtbase_es.qm=PySide6/translations/ \
--include-data-files=.venv/Lib/site-packages/PySide6/translations/qtbase_he.qm=PySide6/translations/ \
--include-data-files=.venv/Lib/site-packages/PySide6/translations/qtbase_it.qm=PySide6/translations/ \
--include-data-files=.venv/Lib/site-packages/PySide6/translations/qtbase_pt_BR.qm=PySide6/translations/ \
--include-data-files=LICENSES/*.txt=LICENSES/ \
--include-data-files=NOTICE.txt=NOTICE.txt \
--include-qt-plugins=qml,platforms \
--nofollow-import-to='PySide6.QtWidgets' \
--nofollow-import-to=tkinter,distutils,numpy.f2py \
--noinclude-data-files='PySide6/qml/Qt/*' \
--noinclude-data-files='PySide6/qml/QtCore/*' \
--noinclude-data-files='PySide6/qml/QtNetwork/*' \
--noinclude-data-files='PySide6/qml/QtQml/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Controls/FluentWinUI3/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Controls/Fusion/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Controls/Imagine/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Controls/Universal/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Controls/Windows/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Controls/designer/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Effects/*' \
--noinclude-data-files='PySide6/qml/QtQuick/LocalStorage/*' \
--noinclude-data-files='PySide6/qml/QtQuick/NativeStyle/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Particles/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Pdf/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Scene2D/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Scene3D/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Shapes/*' \
--noinclude-data-files='PySide6/qml/QtQuick/Timeline/*' \
--noinclude-data-files='PySide6/qml/QtQuick/VectorImage/*' \
--noinclude-data-files='PySide6/qml/QtQuick/VirtualKeyboard/*' \
--noinclude-data-files='PySide6/qml/QtQuick/tooling/*' \
--noinclude-data-files='PySide6/qml/QtTest/*' \
--noinclude-data-files='PySide6/qml/QtWebEngine/*' \
--noinclude-data-files='PySide6/qt-plugins/styles/*' \
--noinclude-dlls='PySide6/qml/Qt/*' \
--noinclude-dlls='PySide6/qml/QtCore/*' \
--noinclude-dlls='PySide6/qml/QtNetwork/*' \
--noinclude-dlls='PySide6/qml/QtQml/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Controls/FluentWinUI3/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Controls/Fusion/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Controls/Imagine/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Controls/Universal/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Controls/Windows/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Controls/designer/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Effects/*' \
--noinclude-dlls='PySide6/qml/QtQuick/LocalStorage/*' \
--noinclude-dlls='PySide6/qml/QtQuick/NativeStyle/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Particles/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Pdf/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Scene2D/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Scene3D/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Shapes/*' \
--noinclude-dlls='PySide6/qml/QtQuick/Timeline/*' \
--noinclude-dlls='PySide6/qml/QtQuick/VectorImage/*' \
--noinclude-dlls='PySide6/qml/QtQuick/VirtualKeyboard/*' \
--noinclude-dlls='PySide6/qml/QtQuick/tooling/*' \
--noinclude-dlls='PySide6/qml/QtTest/*' \
--noinclude-dlls='PySide6/qml/QtWebEngine/*' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qgif.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qicns.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qjpeg.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qpdf.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qpng.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qtga.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qtiff.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qwbmp.dll' \
--noinclude-dlls='PySide6/qt-plugins/imageformats/qwebp.dll' \
--noinclude-dlls='PySide6/qt-plugins/platforms/qdirect2d.dll' \
--noinclude-dlls='PySide6/qt-plugins/platforms/qminimal.dll' \
--noinclude-dlls='PySide6/qt-plugins/platforms/qoffscreen.dll' \
--noinclude-dlls='PySide6/qt-plugins/styles/*' \
--noinclude-dlls='Qt6Charts*' \
--noinclude-dlls='Qt6DataVisualization*' \
--noinclude-dlls='Qt6Pdf*' \
--noinclude-dlls='Qt6Quick3D*' \
--noinclude-dlls='Qt6Sensors*' \
--noinclude-dlls='Qt6Test*' \
--noinclude-dlls='Qt6WebEngine*' \
--noinclude-dlls='opengl32sw.dll' \
--noinclude-dlls='qt6dbus.dll' \
--noinclude-dlls='qt6designer.dll' \
--noinclude-dlls='qt6labsanimation.dll' \
--noinclude-dlls='qt6labsfolderlistmodel.dll' \
--noinclude-dlls='qt6labsplatform.dll' \
--noinclude-dlls='qt6labsqmlmodels.dll' \
--noinclude-dlls='qt6labssettings.dll' \
--noinclude-dlls='qt6labssharedimage.dll' \
--noinclude-dlls='qt6labswavefrontmesh.dll' \
--noinclude-dlls='qt6pdf.dll' \
--noinclude-dlls='qt6qmlcompiler.dll' \
--noinclude-dlls='qt6qmllocalstorage.dll' \
--noinclude-dlls='qt6qmlnetwork.dll' \
--noinclude-dlls='qt6qmlxmllistmodel.dll' \
--noinclude-dlls='qt6quickcontrols2fluentwinui3style*.dll' \
--noinclude-dlls='qt6quickcontrols2fusion*.dll' \
--noinclude-dlls='qt6quickcontrols2imagine*.dll' \
--noinclude-dlls='qt6quickcontrols2universal*.dll' \
--noinclude-dlls='qt6quickcontrols2windows*.dll' \
--noinclude-dlls='qt6quickeffects.dll' \
--noinclude-dlls='qt6quickparticles.dll' \
--noinclude-dlls='qt6quickshapes.dll' \
--noinclude-dlls='qt6quicktest.dll' \
--noinclude-dlls='qt6quicktimeline.dll' \
--noinclude-dlls='qt6quicktimelineblendtrees.dll' \
--noinclude-dlls='qt6quickvectorimage.dll' \
--noinclude-dlls='qt6quickvectorimagegenerator.dll' \
--noinclude-dlls='qt6sql.dll' \
--noinclude-dlls='qt6widgets.dll' \
--noinclude-qt-plugins=designer,multimedia,sqldrivers,virtualkeyboard,styles,tls \
--noinclude-qt-translations \
--onefile \
--onefile-tempdir-spec={CACHE_DIR}/mpvQC/${{ needs.matrix-build.outputs.artifact_app_name }} \
--onefile-windows-splash-screen-image=build-aux/windows-splash.png \
--output-dir=deployment/mpvqc-onefile \
--windows-console-mode=attach \
--windows-icon-from-ico=build-aux/windows-icon.ico \
--output-filename=mpvQC.exe
execute mkdir -p deployment/mpvQC-distribution
execute mv deployment/mpvqc-onefile/mpvQC.exe deployment/mpvQC-distribution/mpvQC.exe
- name: Package libmpv
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
ARTIFACT="$(basename "$LIBMPV_URL")"
execute curl -L -O "$LIBMPV_URL"
echo -e "\033[0;34mecho -n $LIBMPV_SHA256 $ARTIFACT > $ARTIFACT.sha256\033[0m"
echo -n "$LIBMPV_SHA256 $ARTIFACT" > "$ARTIFACT.sha256"
execute sha256sum --check "$ARTIFACT.sha256"
execute 7z x "$ARTIFACT"
execute mv libmpv-2.dll deployment/mpvQC-distribution/
- name: Make Application Portable
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
execute touch deployment/mpvQC-distribution/portable
- name: Copy License Files to Distribution
run: |
function execute() { echo -e "\033[0;34m$*\033[0m"; "$@"; }
execute cp -r LICENSES deployment/mpvQC-distribution/
execute cp NOTICE.txt deployment/mpvQC-distribution/
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: ${{ needs.matrix-build.outputs.artifact_app_name }}-win-x86_64
path: deployment/mpvQC-distribution
test_qml:
runs-on: ubuntu-latest
name: Qml Tests
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install just
uses: taiki-e/install-action@just
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
- name: Update Packages
run: sudo apt update -y
- name: Install Dependencies
run: sudo apt install -y libegl1 libmpv2
- name: Initialize Project
run: just init
- name: Execute Qml Tests
run: just test-qml
verify_formatting:
runs-on: ubuntu-latest
name: Linting & Formatting
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Install Python 3.13
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install just
uses: taiki-e/install-action@just
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: false
- name: Update Packages
run: sudo apt update -y
- name: Install Dependencies
run: sudo apt install -y
- name: Initialize Project
run: just init
- name: Run Linter and Formatter
run: just format
- name: Lint Qml
run: just lint-qml