shadPS4/.github/workflows/windows.yml

66 lines
1.9 KiB
YAML
Raw Normal View History

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:
- uses: actions/checkout@v4
2023-04-11 10:52:40 +00:00
with:
submodules: recursive
2024-06-23 06:57:32 +00:00
- name: Cache CMake Configuration
uses: actions/cache@v4
env:
cache-name: ${{ runner.os }}-sdl-ninja-cache-cmake-configuration
with:
path: |
${{github.workspace}}/build
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
restore-keys: |
${{ env.cache-name }}-
- name: Cache CMake Build
uses: hendrikmuhs/ccache-action@v1.2.14
env:
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
with:
append-timestamp: false
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
- name: Setup VS Environment
uses: ilammy/msvc-dev-cmd@v1.13.0
with:
arch: amd64
2023-05-11 12:04:07 +00:00
- name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
2023-04-11 06:55:06 +00:00
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
- name: Get date and git hash
id: vars
shell: pwsh
run: |
echo "date=$(Get-Date -Format 'yyyy-MM-dd')" >> $env:GITHUB_OUTPUT
echo "shorthash=$(git rev-parse --short HEAD)" >> $env:GITHUB_OUTPUT
- name: Upload executable
uses: actions/upload-artifact@v4
2023-04-15 16:23:14 +00:00
with:
name: shadps4-win64-sdl-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.shorthash }}
path: |
${{github.workspace}}/build/shadPS4.exe