forked from KhronosGroup/OpenXR-SDK-Source
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.83 KB
/
msvc-build-preset.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 2021-2023, Collabora, Ltd.
# SPDX-License-Identifier: CC0-1.0
on:
workflow_call:
inputs:
preset:
description: "CMake build preset"
type: string
required: true
buildType:
description: "Build configuration"
type: string
required: true
default: RelWithDebInfo
artifactName:
description: "Artifact name to upload to."
type: string
required: false
subdir:
description: "Subdir of the workspace to upload as an artifact."
type: string
default: install
jobs:
msvc-build:
runs-on: windows-latest
env:
VULKAN_SDK_VERSION: "1.1.114.0"
INSTALL_DIR: "${{ github.workspace }}/install"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Get modern CMake and Ninja
uses: lukka/[email protected]
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Install Vulkan SDK
run: ./.github/scripts/install_vulkan.ps1
if: "${{ !contains( inputs.preset, 'uwp') }}"
working-directory: "${{ github.workspace }}"
shell: pwsh
- name: Generate build system
shell: pwsh
run: |
Copy-Item .github/scripts/CMakePresets.json .
cmake --fresh --preset ${{ inputs.preset }} -S . -B $env:RUNNER_TEMP
- name: Build
run: "cmake --build $env:RUNNER_TEMP --parallel --clean-first --config ${{ inputs.buildType }}"
- name: Install
run: "cmake --build $env:RUNNER_TEMP --parallel --config ${{ inputs.buildType }} --target install"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
if: inputs.artifactName
with:
name: "${{ inputs.artifactName }}"
path: "${{ github.workspace }}/${{ inputs.subdir }}"