Skip to content

Commit cd18afd

Browse files
committed
[CI] Github Actions: Workflow for QT - Windows
1 parent 295b6c3 commit cd18afd

File tree

4 files changed

+128
-0
lines changed

4 files changed

+128
-0
lines changed

.github/workflows/CI.yml

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '.clang-format'
7+
- '.drone.star'
8+
- '.gitattributes'
9+
- '.gitignore'
10+
- '.gdbinit'
11+
- '.github/*'
12+
- '.github/*_TEMPLATE/**'
13+
- '*.md'
14+
- '*.yml'
15+
- 'docs/**'
16+
- 'src/**/*_posix.*'
17+
- 'src/**/*_linux.*'
18+
- 'src/**/*_gnulinux.*'
19+
- 'src/**/*_x11.*'
20+
- 'src/**/*_gtk.*'
21+
- 'src/**/*_android.*'
22+
- 'src/**/*_mac.*'
23+
- 'LICENSE'
24+
pull_request:
25+
paths-ignore:
26+
- '.clang-format'
27+
- '.drone.star'
28+
- '.gitattributes'
29+
- '.gitignore'
30+
- '.gdbinit'
31+
- '.github/*'
32+
- '.github/*_TEMPLATE/**'
33+
- '*.md'
34+
- '*.yml'
35+
- 'docs/**'
36+
- 'src/**/*_posix.*'
37+
- 'src/**/*_linux.*'
38+
- 'src/**/*_gnulinux.*'
39+
- 'src/**/*_x11.*'
40+
- 'src/**/*_gtk.*'
41+
- 'src/**/*_android.*'
42+
- 'src/**/*_mac.*'
43+
- 'LICENSE'
44+
workflow_dispatch:
45+
46+
jobs:
47+
build-windows-qt:
48+
name: Build QT Version (Windows, ${{ matrix.config.vsver }}) # runner.os can't be used here
49+
runs-on: ${{ matrix.config.runs-on }}
50+
env:
51+
POWERSHELL_TELEMETRY_OPTOUT: 1
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
config:
56+
- {vsver: VS2022, runs-on: windows-latest}
57+
steps:
58+
- name: Checkout Repository
59+
uses: actions/checkout@v3
60+
with:
61+
fetch-depth: 0
62+
63+
- name: Get QT binaries
64+
shell: cmd
65+
run: |
66+
cd third_party/qt_binary
67+
aria2c http://qt.mirror.constant.com/online/qtsdkrepository/windows_x86/desktop/qt6_652/qt.qt6.652.win64_msvc2019_64/6.5.2-0-202307080351qtbase-Windows-Windows_10_22H2-MSVC2019-Windows-Windows_10_22H2-X86_64.7z
68+
7z x *.7z -o. -r
69+
del *.7z
70+
71+
- name: Setup
72+
run: .\xb setup
73+
74+
- name: Build GUI Test App
75+
run: .\xb build --config=Release --target=src\xenia-ui-qt-demoapp
76+
77+
- name: Prepare artifacts
78+
run: |
79+
mkdir artifacts\xenia_qt\platforms
80+
robocopy . build\bin\${{ runner.os }}\Release LICENSE /r:0 /w:0
81+
robocopy build\bin\${{ runner.os }}\Release artifacts\xenia_qt xenia-ui-qt-demoapp.exe LICENSE /r:0 /w:0
82+
robocopy third_party\qt_binary\6.5.2\msvc2019_64\bin\ artifacts\xenia_qt Qt6Core.dll /r:0 /w:0
83+
robocopy third_party\qt_binary\6.5.2\msvc2019_64\bin\ artifacts\xenia_qt Qt6Gui.dll /r:0 /w:0
84+
robocopy third_party\qt_binary\6.5.2\msvc2019_64\bin\ artifacts\xenia_qt Qt6Widgets.dll /r:0 /w:0
85+
robocopy third_party\qt_binary\6.5.2\msvc2019_64\plugins\platforms\ artifacts\xenia_qt\platforms qwindows.dll /r:0 /w:0
86+
87+
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
88+
89+
- name: Upload xenia artifacts
90+
uses: actions/upload-artifact@v3
91+
with:
92+
name: xenia_qt_${{ matrix.config.vsver }}
93+
path: artifacts\xenia_qt
94+
if-no-files-found: error
95+
96+
- name: Create release
97+
env:
98+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
run: |
100+
$asset="xenia_qt.zip"
101+
rm -recurse -force artifacts\xenia_qt\*.pdb # Ideally this would use xr, but I can't get it to work
102+
7z a $asset .\artifacts\xenia_qt\*
103+
If ($(Get-Item $asset).length -le 100000) {
104+
Throw "Error: Archive $asset too small!"
105+
}
106+
$tag=$env:GITHUB_SHA.SubString(0,7)
107+
$branch=$($env:GITHUB_REF -replace 'refs/heads/')
108+
$title="${tag}_$branch"
109+
gh release create $tag $asset --target $env:GITHUB_SHA -t $title

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,9 @@ node_modules/.bin/
101101
/third_party/binutils/binutils*
102102
/third_party/vasm/
103103
/tools/shader-playground/*.dll
104+
105+
# ==============================================================================
106+
# QT binaries directory
107+
# ==============================================================================
108+
109+
/third_party/qt_binary/

src/xenia/ui/qt/premake5.lua

+12
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ project("xenia-ui-qt")
1010

1111
-- Setup Qt libraries
1212
qt.enable()
13+
filter("platforms:Linux")
14+
qtpath "../../../../third_party/qt_binary/6.5.2/gcc_64"
15+
16+
filter("platforms:Windows")
17+
qtpath "../../../../third_party/qt_binary/6.5.2/msvc2019_64"
18+
1319
qtmodules{"core", "gui", "widgets"}
1420
qtprefix "Qt6"
1521

@@ -43,6 +49,12 @@ project("xenia-ui-qt-demoapp")
4349

4450
-- Setup Qt libraries
4551
qt.enable()
52+
filter("platforms:Linux")
53+
qtpath "../../../../third_party/qt_binary/6.5.2/gcc_64"
54+
55+
filter("platforms:Windows")
56+
qtpath "../../../../third_party/qt_binary/6.5.2/msvc2019_64"
57+
4658
qtmodules{"core", "gui", "widgets"}
4759
qtprefix "Qt6"
4860

third_party/qt_binary/Readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Empty directory for automatic QT binaries download.

0 commit comments

Comments
 (0)