Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/Windows-Builds-Optimized
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Building on Windows with Caching

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-2022

strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

# Setup sccache (works with MSVC)
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9

# Cache Vulkan SDK
- name: Cache Vulkan SDK
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/VULKAN_SDK
~/.vulkan
key: vulkan-${{ runner.os }}-1.4.304.1
restore-keys: |
vulkan-${{ runner.os }}-

- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.1
with:
vulkan-query-version: 1.4.304.1
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Headers, SPIRV-Tools, SPIRV-Cross, Glslang
vulkan-use-cache: true

- name: Install Ninja
run: choco install ninja -y

- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1

- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '4.1.x'

# Cache CMake FetchContent / CPM deps
- name: Cache CMake dependencies
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/build/_deps
key: cmake-deps-${{ runner.os }}-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
cmake-deps-${{ runner.os }}-

- name: Configure CMake (Ninja + MSVC)
run: >
cmake -S .
-B build
-G Ninja
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build
run: cmake --build build --parallel

- name: Test
working-directory: build
run: ctest --output-on-failure
Loading