Build Qt6 #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Qt6 | |
on: | |
workflow_dispatch | |
jobs: | |
BuildQtWindows: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
qt_version: [6.2.4] | |
arch: [32, 64] | |
strawberry: [5.32.1.1] | |
fail-fast: true | |
steps: | |
- name: Setup Strawberry ${{ matrix.strawberry }} ${{ matrix.arch }} | |
run: | | |
rm -r C:/Strawberry/* | |
Invoke-WebRequest https://strawberryperl.com/download/${{ matrix.strawberry }}/strawberry-perl-${{ matrix.strawberry }}-${{ matrix.arch }}bit-portable.zip -OutFile strawberry.zip | |
7z.exe x strawberry.zip -o"C:/Strawberry" | |
rm strawberry.zip | |
perl --version | |
- name: Install Python 3.7 version | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.7' | |
architecture: 'x64' | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
- name: Compile Qt | |
run: | | |
# Clone Qt6 repo | |
$WORD_DIR = (Get-Location).Path | |
cd .. | |
git clone https://github.com/Snipaste/qt.git -b ${{ matrix.qt_version }} | |
cd qt | |
# Apply patches | |
git clone https://github.com/Snipaste/qt-patches.git | |
Get-ChildItem -Path ./qt-patches/${{ matrix.qt_version }} | Foreach-Object { (Get-Content $_.FullName -Raw).Replace("`r`n","`n") | Set-Content $_.FullName -Force; echo "Applying $_..."; git apply --ignore-whitespace $_.FullName } | |
# Create shadow build folder | |
cd .. | |
mkdir qt_build_${{ matrix.arch }} | |
cd qt_build_${{ matrix.arch }} | |
# Setup the compiler | |
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars${{ matrix.arch }}.bat`" && set > %temp%\vcvars.txt" | |
Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } } | |
# Configure Qt | |
..\qt\configure.bat -prefix "${WORD_DIR}\qt${{ matrix.qt_version }}_binaries_${{ matrix.arch }}" -opengl desktop -platform win32-msvc -release -force-debug-info -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-tiff -qt-webp -no-feature-cpp-winrt -no-feature-sqlmodel -feature-accessibility -feature-optimize_full -no-pch -no-icu -no-dbus -no-sql-sqlite -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -nomake tools -nomake tests -nomake examples -no-qml-debug -skip qtconnectivity,qt3d,qtpositioning,qtlocation,qtactiveqt,qtcharts,qtcoap,qtlottie,qtnetworkauth,qtsensors,qtserialbus,qtserialport,qtvirtualkeyboard,qtdatavis3d,qtcanvas3d,qtgamepad,qtquickcontrols,qtquickcontrols2,qtremoteobjects,qttranslations,qtvirtualkeyboard,qtwebchannel,qtwebsockets,qtwebview,qtwebengine,qtquick3d,qtquicktimeline,qtdeclarative,qtdoc,qtmqtt,qtopcua,qtscxml,qtmultimedia | |
cmake --build . --parallel | |
cmake --install . | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: qt${{ matrix.qt_version }}_binaries_${{ matrix.arch }}_windows.zip | |
path: qt${{ matrix.qt_version }}_binaries_${{ matrix.arch }} | |
if-no-files-found: error |