Note: The ffmpeg version used by Qt's official binary and our CI doesn't match, but that's okay because their micro version bumps are ABI compatible.
75 lines
3.5 KiB
YAML
75 lines
3.5 KiB
YAML
name: Windows CI
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
jobs:
|
|
msvc-cmake-build:
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- qt_ver: '6.10.1'
|
|
vs: '2022'
|
|
aqt_arch: 'win64_msvc2022_64'
|
|
msvc_arch: 'x64'
|
|
|
|
runs-on: windows-2022
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v4
|
|
with:
|
|
arch: ${{ matrix.aqt_arch }}
|
|
version: ${{ matrix.qt_ver }}
|
|
modules: 'qtmultimedia'
|
|
- name: Build
|
|
shell: cmd
|
|
run: |
|
|
:: ------ env ------
|
|
set PWD=%cd%
|
|
set VS=${{ matrix.vs }}
|
|
set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
|
if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
|
call %VCVARS% ${{ matrix.msvc_arch }}
|
|
:: ------ dep ------
|
|
set CMAKE_PREFIX_PATH=%PWD%/dependencies_bin
|
|
mkdir dependencies_src
|
|
echo ::group::===== ECM =====
|
|
git clone -q https://invent.kde.org/frameworks/extra-cmake-modules.git dependencies_src/extra-cmake-modules
|
|
cmake .\dependencies_src\extra-cmake-modules -Bbuild_dependencies/extra-cmake-modules -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DBUILD_TESTING=OFF || goto :error
|
|
cmake --build build_dependencies/extra-cmake-modules --config Release --target=install || goto :error
|
|
echo ::endgroup::
|
|
echo ::group::===== FFmpeg =====
|
|
curl -fsSL -o ffmpeg-shared.7z https://github.com/GyanD/codexffmpeg/releases/download/7.1.1/ffmpeg-7.1.1-full_build-shared.7z
|
|
7z x ffmpeg-shared.7z -y -o"dependencies_src"
|
|
set FFMPEG_ROOT=%PWD%\dependencies_src\ffmpeg-7.1.1-full_build-shared
|
|
echo ::endgroup::
|
|
echo ::group::===== Gperf (required by KCodecs) =====
|
|
choco install gperf
|
|
echo ::endgroup::
|
|
echo ::group::===== KCodecs =====
|
|
git clone -q https://invent.kde.org/frameworks/kcodecs.git dependencies_src/kcodecs
|
|
cmake .\dependencies_src\kcodecs -Bbuild_dependencies/kcodecs -DCMAKE_INSTALL_PREFIX="dependencies_bin" -DBUILD_TESTING=OFF || goto :error
|
|
cmake --build build_dependencies/kcodecs --config Release --target=install || goto :error
|
|
echo ::endgroup::
|
|
echo ::group::===== taglib =====
|
|
git clone --recurse-submodules -q https://github.com/taglib/taglib.git dependencies_src/taglib
|
|
cmake .\dependencies_src\taglib -Bbuild_dependencies/taglib -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
|
|
cmake --build build_dependencies/taglib --config Release --target=install -j || goto :error
|
|
echo ::endgroup::
|
|
:: ------ app ------
|
|
cmake -Bbuild . -DUSE_QTEXTCODEC=OFF -DCMAKE_INSTALL_PREFIX='%PWD%\build\' || goto :error
|
|
cmake --build build --config Release -j || goto :error
|
|
cmake --build build --config Release --target=install || goto :error
|
|
:: ------ pkg ------
|
|
windeployqt --verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --multimedia --core5compat --skip-plugin-types tls,networkinformation build\bin\pmusic.exe
|
|
robocopy ./dependencies_bin/bin build/bin *.dll
|
|
if ErrorLevel 8 (exit /B 1)
|
|
copy LICENSE build/bin/
|
|
exit /B 0
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: "${{ matrix.aqt_arch }}-qt${{ matrix.qt_ver }}-cmake-package"
|
|
path: build/bin/*
|