Skip to content

Commit de7cb27

Browse files
committed
[CI] WIP #3 - Workflow for QT: Windows & Linux Jobs
1 parent 6445294 commit de7cb27

File tree

2 files changed

+74
-3
lines changed

2 files changed

+74
-3
lines changed

.github/workflows/CI.yml

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ jobs:
5555
config:
5656
- {vsver: VS2019, runs-on: windows-2019}
5757
steps:
58-
- uses: actions/checkout@v3
58+
- name: Checkout Repository
59+
uses: actions/checkout@v3
5960
with:
6061
fetch-depth: 0
62+
6163
- name: Get QT binaries
6264
shell: cmd
6365
run: |
@@ -103,3 +105,62 @@ jobs:
103105
$branch=$($env:GITHUB_REF -replace 'refs/heads/')
104106
$title="${tag}_$branch"
105107
gh release create $tag $asset --target $env:GITHUB_SHA -t $title
108+
109+
build-linux-gcc:
110+
name: Build (Linux, ${{ matrix.config.vsver }}) # runner.os can't be used here
111+
runs-on: ${{ matrix.config.runs-on }}
112+
strategy:
113+
fail-fast: false
114+
matrix:
115+
config:
116+
- {vsver: GCC, runs-on: linux}
117+
steps:
118+
- uses: actions/checkout@v3
119+
with:
120+
fetch-depth: 0
121+
122+
- name: Get QT binaries
123+
shell: cmd
124+
run: |
125+
cd third_party/qt_binary
126+
aria2c http://qt.mirror.constant.com/online/qtsdkrepository/linux_x64/desktop/qt6_652/qt.qt6.652.gcc_64/6.5.2-0-202307080352qtbase-Linux-RHEL_8_4-GCC-Linux-RHEL_8_4-X86_64.7z
127+
7z x *.7z -o. -r
128+
del *.7z
129+
130+
- name: Setup
131+
run: .\xb setup
132+
133+
- name: Build GUI Test App
134+
run: .\xb build --config=Release --target=src\xenia-ui-qt-demoapp
135+
136+
- name: Prepare artifacts
137+
run: |
138+
robocopy . build\bin\${{ runner.os }}\Release LICENSE /r:0 /w:0
139+
robocopy build\bin\${{ runner.os }}\Release artifacts\xenia_qt xenia-ui-qt-demoapp LICENSE /r:0 /w:0
140+
141+
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
142+
143+
- name: Upload xenia artifacts
144+
uses: actions/upload-artifact@v3
145+
with:
146+
name: xenia_qt_${{ matrix.config.vsver }}
147+
path: artifacts\xenia_qt
148+
if-no-files-found: error
149+
150+
- name: Create release
151+
if: |
152+
github.repository == 'Gliniak/xenia' &&
153+
contains(github.ref, 'refs/heads/qt_new')
154+
env:
155+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156+
run: |
157+
$asset="xenia_qt.zip"
158+
rm -recurse -force artifacts\xenia_qt\*.pdb # Ideally this would use xr, but I can't get it to work
159+
7z a $asset .\artifacts\xenia_qt\*
160+
If ($(Get-Item $asset).length -le 100000) {
161+
Throw "Error: Archive $asset too small!"
162+
}
163+
$tag=$env:GITHUB_SHA.SubString(0,7)
164+
$branch=$($env:GITHUB_REF -replace 'refs/heads/')
165+
$title="${tag}_$branch"
166+
gh release create $tag $asset --target $env:GITHUB_SHA -t $title

src/xenia/ui/qt/premake5.lua

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ project("xenia-ui-qt")
1010

1111
-- Setup Qt libraries
1212
qt.enable()
13-
qtpath "../../../../third_party/qt_binary/6.5.2/msvc2019_64"
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+
1419
qtmodules{"core", "gui", "widgets"}
1520
qtprefix "Qt6"
1621

@@ -44,7 +49,12 @@ project("xenia-ui-qt-demoapp")
4449

4550
-- Setup Qt libraries
4651
qt.enable()
47-
qtpath "../../../../third_party/qt_binary/6.5.2/msvc2019_64"
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+
4858
qtmodules{"core", "gui", "widgets"}
4959
qtprefix "Qt6"
5060

0 commit comments

Comments
 (0)