Update dependencies #230
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows Build | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "src/**" | |
- "third_party/**" | |
- "include/**" | |
- ".github/workflows/windows_build.yml" | |
- "CMakeLists.txt" | |
workflow_dispatch: | |
inputs: | |
profile: | |
description: "Enable profiling of compilation" | |
required: true | |
type: boolean | |
default: true | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
# TODO: Change this for a winget install | |
- name: Configure Vulkan SDK using the downloaded spec | |
uses: humbletim/install-vulkan-sdk@v1.1.1 | |
with: | |
version: latest | |
cache: true | |
- name: Configure CMake | |
run: cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S${{github.workspace}} -B${{github.workspace}}/build -G "Visual Studio 17 2022" -T host=x64 -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Install Windows 10 SDK & Start Profiler | |
if: ${{ inputs.profile }} | |
shell: pwsh | |
run: | | |
choco install windows-sdk-10-version-2004-all -y | |
$sdkVersion = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\' | Sort-Object Name -Descending | Select-Object -First 1 Name | |
echo "C:\Program Files (x86)\Windows Kits\10\bin\$sdkVersion\x64" >> $GITHUB_PATH | |
vcperf /start Session1 | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Stop Profiler | |
if: ${{ inputs.profile }} | |
run: vcperf /stop Session1 /timetrace trace.json | |
- name: Archive Release | |
uses: thedoctor0/zip-release@main | |
with: | |
type: "zip" | |
filename: "windows-x64-release.zip" | |
path: ${{github.workspace}}/build/src/Release | |
- name: Upload Release | |
uses: marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303 | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "v${{ github.run_number }}" | |
prerelease: false | |
files: | | |
windows-x64-release.zip | |
trace.json |