Skip to content

Commit a8c12bd

Browse files
committed
[CI] WIP - Workflow for QT
1 parent cf93fcc commit a8c12bd

File tree

2 files changed

+109
-0
lines changed

2 files changed

+109
-0
lines changed

.github/workflows/CI.yml

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

third_party/qt_binary/Readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Empty directory for automatic QT binaries download.

0 commit comments

Comments
 (0)