-
Notifications
You must be signed in to change notification settings - Fork 159
84 lines (72 loc) · 2.53 KB
/
windows-matrix.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright 2021-2023, Collabora, Ltd.
# SPDX-License-Identifier: CC0-1.0
name: Windows builds
on:
workflow_call:
inputs:
organizeAndRelease:
description: "Should we organize and release our artifacts?"
type: boolean
default: false
workflow_dispatch:
jobs:
# generate_matrix:
# runs-on: ubuntu-latest
# outputs:
# matrix: "${{ steps.set-matrix.outputs.matrix }}"
# steps:
# - uses: "actions/checkout@v4"
# - id: set-matrix
# run: "python3 .github/scripts/generate_windows_matrix_build.py matrix"
msvc-build:
# needs: generate_matrix
strategy:
fail-fast: true
# TODO: Fix matrix generation? Broke recently due to changes in github actions
# matrix: "${{fromJson(needs.generate_matrix.outputs.matrix)}}"
matrix:
preset:
- win32
- x64
- win32_uwp
- x64_uwp
- arm64_uwp
- arm_uwp
uses: "./.github/workflows/msvc-build-preset.yml"
with:
preset: "${{ matrix.preset }}"
artifactName: "loader_${{ matrix.preset }}"
buildType: "RelWithDebInfo"
organize-and-release-artifacts:
if: inputs.organizeAndRelease
needs:
- msvc-build
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v4"
- name: Retrieve artifacts
uses: "actions/download-artifact@v4"
with:
path: artifacts
- name: Organize artifacts
run: 'python .github/scripts/organize_windows_artifacts.py "${{ github.workspace }}" "${{ github.workspace }}/openxr_loader"'
- name: Upload combined artifact
uses: "actions/upload-artifact@v4"
with:
name: openxr_loader_windows
path: "${{ github.workspace }}/openxr_loader"
# NuGet stuff now
- name: Setup NuGet
uses: "NuGet/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9"
with:
nuget-version: "5.x"
- name: Stage loader and headers for NuGet
shell: pwsh
run: '${{ github.workspace }}/.azure-pipelines/nuget/stage_nuget.ps1 "${{ github.workspace }}/openxr_loader" "${{ github.workspace }}/specification/Makefile" "${{ github.workspace }}/openxr_loader_staging"'
- name: Pack NuGet package
run: 'nuget pack "${{ github.workspace }}/openxr_loader_staging/OpenXR.Loader.nuspec" -OutputDirectory "${{ github.workspace }}/nuget"'
- name: Upload NuGet artifact
uses: "actions/upload-artifact@v4"
with:
name: NuGet
path: "${{ github.workspace }}/nuget"