2024-02-29 22:00:35 +00:00
|
|
|
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
name: Windows-Qt
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
BUILD_TYPE: Release
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
2024-05-08 11:17:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-02-29 22:00:35 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Setup Qt
|
2024-06-01 06:18:33 +00:00
|
|
|
uses: jurplel/install-qt-action@v4
|
2024-02-29 22:00:35 +00:00
|
|
|
with:
|
2024-06-23 06:57:32 +00:00
|
|
|
version: 6.7.2
|
2024-08-04 13:07:10 +00:00
|
|
|
host: windows
|
|
|
|
target: desktop
|
2024-07-30 19:41:31 +00:00
|
|
|
arch: win64_msvc2019_64
|
2024-08-25 09:30:05 +00:00
|
|
|
archives: qtbase qttools
|
2024-05-18 17:05:18 +00:00
|
|
|
|
2024-09-06 22:01:55 +00:00
|
|
|
- name: Cache CMake dependency source code
|
|
|
|
uses: actions/cache@v4
|
|
|
|
env:
|
|
|
|
cache-name: ${{ runner.os }}-qt-cache-cmake-dependency-sources
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
${{github.workspace}}/build
|
|
|
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ env.cache-name }}-
|
|
|
|
|
2024-02-29 22:00:35 +00:00
|
|
|
- name: Configure CMake
|
|
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL -DENABLE_QT_GUI=ON
|
2024-06-23 06:57:32 +00:00
|
|
|
|
2024-02-29 22:00:35 +00:00
|
|
|
- name: Build
|
|
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
run: |
|
|
|
|
mkdir upload
|
2024-05-18 17:05:18 +00:00
|
|
|
move build/Release/shadPS4.exe upload
|
|
|
|
windeployqt --dir upload upload/shadPS4.exe
|
2024-09-01 10:40:51 +00:00
|
|
|
|
2024-09-01 15:24:53 +00:00
|
|
|
- name: Get date and git hash
|
|
|
|
id: vars
|
|
|
|
shell: pwsh
|
2024-09-01 10:40:51 +00:00
|
|
|
run: |
|
2024-09-01 15:24:53 +00:00
|
|
|
echo "date=$(Get-Date -Format 'yyyy-MM-dd')" >> $env:GITHUB_OUTPUT
|
|
|
|
echo "shorthash=$(git rev-parse --short HEAD)" >> $env:GITHUB_OUTPUT
|
2024-02-29 22:00:35 +00:00
|
|
|
|
|
|
|
- name: Upload executable
|
2024-05-08 11:17:41 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-02-29 22:00:35 +00:00
|
|
|
with:
|
2024-09-01 15:24:53 +00:00
|
|
|
name: shadps4-win64-qt-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.shorthash }}
|
2024-05-18 17:05:18 +00:00
|
|
|
path: upload
|