ci: qt: Add qt-on-windows.yml

This commit is contained in:
Calcitem 2021-11-21 02:56:31 +08:00
parent 227b4d03fe
commit 857f03504d
No known key found for this signature in database
GPG Key ID: F67E4F8CB7B5EED2
2 changed files with 56 additions and 10 deletions

48
.github/workflows/qt-on-windows.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: Qt on Windows
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
# Setup VS
- name: Setup VS
uses: seanmiddleditch/gha-setup-vsdevenv@master
# Install Qt
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.15.2'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
dir: '${{ github.workspace }}'
install-deps: 'true'
modules: 'qtcore qtwgui qtmultimedia'
cached: 'false'
setup-python: 'true'
tools: 'tools_ifw,4.1.1,qt.tools.ifw.41 tools_qtcreator,5.0.2-0,qt.tools.qtcreator'
set-env: 'false'
tools-only: 'false'
aqtversion: '==1.2.5'
py7zrversion: '==0.16.1'
extra: '--external 7z'
# Build
- name: Build Qt
run: ci/run-win32-qt-build.bat
# Archive apk
- name: Archive Qt
uses: actions/upload-artifact@v2
with:
name: MIllGame
path: release/MillGame.exe

View File

@ -1,10 +1,8 @@
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" x86_amd64
set QTDIR=C:\Qt\Qt5.13.0\5.13.0\msvc2017_64
set PATH=%PATH%;%QTDIR%\bin;
qmake
nmake clean
nmake
pause
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat" x86_amd64
set QTDIR=Qt\5.15.2\msvc2019_64
set PATH=%PATH%;%QTDIR%\bin;
qmake
nmake clean
nmake