2024-02-23 21:32:32 +00:00
|
|
|
# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2023-04-11 06:55:06 +00:00
|
|
|
|
2023-04-11 07:20:58 +00:00
|
|
|
name: Windows
|
2023-04-11 06:55:06 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
env:
|
2023-05-11 11:57:55 +00:00
|
|
|
BUILD_TYPE: Release
|
2023-04-11 06:55:06 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2024-05-08 11:17:41 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-11 10:52:40 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2024-06-23 06:57:32 +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 }}-sdl-cache-cmake-dependency-sources
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
${{github.workspace}}/build
|
|
|
|
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ env.cache-name }}-
|
|
|
|
|
2023-05-11 12:04:07 +00:00
|
|
|
- name: Configure CMake
|
2023-07-23 16:55:08 +00:00
|
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL
|
2024-08-08 15:19:44 +00:00
|
|
|
|
2023-04-11 06:55:06 +00:00
|
|
|
- name: Build
|
2024-02-27 22:10:34 +00:00
|
|
|
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
|
2024-08-08 15:19:44 +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-09-01 10:40:51 +00:00
|
|
|
|
2024-08-08 15:19:44 +00:00
|
|
|
- name: Upload executable
|
2024-05-08 11:17:41 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-04-15 16:23:14 +00:00
|
|
|
with:
|
2024-09-01 15:24:53 +00:00
|
|
|
name: shadps4-win64-sdl-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.shorthash }}
|
2023-05-11 12:26:21 +00:00
|
|
|
path: |
|
2024-05-18 17:05:18 +00:00
|
|
|
${{github.workspace}}/build/Release/shadPS4.exe
|