|
| 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 |
0 commit comments