|
| 1 | +# Copyright (c) 2019-2020 The Khronos Group Inc. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
1 | 4 | parameters: |
2 | | - sourceDir: '$(System.DefaultWorkingDirectory)' |
| 5 | + sourceDir: "$(System.DefaultWorkingDirectory)" |
3 | 6 |
|
4 | 7 | jobs: |
5 | | -# Build the loader, API layers, and samples on Linux |
6 | | -- job: linux_build |
7 | | - displayName: 'Linux' |
8 | | - strategy: |
9 | | - matrix: |
10 | | - xlib: |
11 | | - buildType: RelWithDebInfo |
12 | | - presentationBackend: xlib |
13 | | - xcb: |
14 | | - buildType: RelWithDebInfo |
15 | | - presentationBackend: xcb |
16 | | - wayland: |
17 | | - buildType: RelWithDebInfo |
18 | | - presentationBackend: wayland |
19 | | - pool: |
20 | | - vmImage: 'ubuntu-latest' |
21 | | - container: khronosgroup/docker-images:openxr-sdk |
22 | | - steps: |
23 | | - # First build as debug |
24 | | - - template: build_linux.yml |
25 | | - parameters: |
26 | | - sourceDir: ${{parameters.sourceDir}} |
27 | | - buildType: Debug |
28 | | - cmakeArgs: '-DPRESENTATION_BACKEND=$(PresentationBackend)' |
| 8 | + # Build the loader, API layers, and samples on Linux |
| 9 | + - job: linux_build |
| 10 | + displayName: "Linux" |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + xlib: |
| 14 | + buildType: RelWithDebInfo |
| 15 | + presentationBackend: xlib |
| 16 | + xcb: |
| 17 | + buildType: RelWithDebInfo |
| 18 | + presentationBackend: xcb |
| 19 | + wayland: |
| 20 | + buildType: RelWithDebInfo |
| 21 | + presentationBackend: wayland |
| 22 | + pool: |
| 23 | + vmImage: "ubuntu-latest" |
| 24 | + container: khronosgroup/docker-images:openxr-sdk |
| 25 | + steps: |
| 26 | + # First build as debug |
| 27 | + - template: build_linux.yml |
| 28 | + parameters: |
| 29 | + sourceDir: ${{parameters.sourceDir}} |
| 30 | + buildType: Debug |
| 31 | + cmakeArgs: "-DPRESENTATION_BACKEND=$(PresentationBackend)" |
29 | 32 |
|
30 | | - # Then build release |
31 | | - - template: build_linux.yml |
32 | | - parameters: |
33 | | - sourceDir: ${{parameters.sourceDir}} |
34 | | - buildType: RelWithDebInfo |
35 | | - cmakeArgs: '-DPRESENTATION_BACKEND=$(PresentationBackend)' |
| 33 | + # Then build release |
| 34 | + - template: build_linux.yml |
| 35 | + parameters: |
| 36 | + sourceDir: ${{parameters.sourceDir}} |
| 37 | + buildType: RelWithDebInfo |
| 38 | + cmakeArgs: "-DPRESENTATION_BACKEND=$(PresentationBackend)" |
36 | 39 |
|
37 | | -# This job computes the product of the config dimensions |
38 | | -- job: generator |
39 | | - steps: |
40 | | - - task: PythonScript@0 |
41 | | - name: winmatrix |
42 | | - inputs: |
43 | | - scriptPath: $(System.DefaultWorkingDirectory)/.azure-pipelines/generate_windows_matrix_build.py |
44 | | - # argument sets the variable name defined by python script |
45 | | - arguments: winbuild |
| 40 | + # This job computes the product of the config dimensions |
| 41 | + - job: generator |
| 42 | + steps: |
| 43 | + - task: PythonScript@0 |
| 44 | + name: winmatrix |
| 45 | + inputs: |
| 46 | + scriptPath: $(System.DefaultWorkingDirectory)/.azure-pipelines/generate_windows_matrix_build.py |
| 47 | + # argument sets the variable name defined by python script |
| 48 | + arguments: winbuild |
46 | 49 |
|
47 | | -# Build the loader, API layers, and samples on Windows |
48 | | -- job: windows_build |
49 | | - dependsOn: generator |
50 | | - displayName: 'Windows MSVC' |
51 | | - variables: |
52 | | - VULKAN_SDK: "$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)" |
53 | | - pool: |
54 | | - vmImage: 'windows-latest' |
55 | | - # Use the json emitted by the generator job to set up this matrix |
56 | | - strategy: |
57 | | - matrix: $[ dependencies.generator.outputs['winmatrix.winbuild'] ] |
58 | | - steps: |
59 | | - - template: build_msvc.yml |
60 | | - parameters: |
61 | | - sourceDir: ${{parameters.sourceDir}} |
62 | | - buildType: $(buildType) |
63 | | - generator: "$(generator)" |
64 | | - cmakeArgs: $(cmakeArgs) -DBUILD_ALL_EXTENSIONS=ON |
65 | | - useVulkan: 'true' |
| 50 | + # Build the loader, API layers, and samples on Windows |
| 51 | + - job: windows_build |
| 52 | + dependsOn: generator |
| 53 | + displayName: "Windows MSVC" |
| 54 | + variables: |
| 55 | + VULKAN_SDK: "$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)" |
| 56 | + pool: |
| 57 | + vmImage: "windows-latest" |
| 58 | + # Use the json emitted by the generator job to set up this matrix |
| 59 | + strategy: |
| 60 | + matrix: $[ dependencies.generator.outputs['winmatrix.winbuild'] ] |
| 61 | + steps: |
| 62 | + - template: build_msvc.yml |
| 63 | + parameters: |
| 64 | + sourceDir: ${{parameters.sourceDir}} |
| 65 | + buildType: $(buildType) |
| 66 | + generator: "$(generator)" |
| 67 | + cmakeArgs: $(cmakeArgs) -DBUILD_ALL_EXTENSIONS=ON |
| 68 | + useVulkan: "true" |
66 | 69 |
|
67 | | - - task: PublishPipelineArtifact@1 |
68 | | - displayName: Publish loader |
69 | | - condition: and(succeeded(), eq(variables.buildType, 'RelWithDebInfo')) |
70 | | - inputs: |
71 | | - path: ${{parameters.sourceDir}}/install |
72 | | - artifact: $(artifactName) |
| 70 | + - task: PublishPipelineArtifact@1 |
| 71 | + displayName: Publish loader |
| 72 | + condition: and(succeeded(), eq(variables.buildType, 'RelWithDebInfo')) |
| 73 | + inputs: |
| 74 | + path: ${{parameters.sourceDir}}/install |
| 75 | + artifact: $(artifactName) |
73 | 76 |
|
74 | | -# Build the loader, API layers, and samples on Windows with MinGW |
75 | | -# - job: mingw_build |
76 | | -# displayName: 'Windows MinGW' |
77 | | -# variables: |
78 | | -# VULKAN_SDK: "$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)" |
79 | | -# pool: |
80 | | -# vmImage: 'windows-latest' |
81 | | -# steps: |
82 | | -# - template: build_mingw.yml |
83 | | -# parameters: |
84 | | -# sourceDir: ${{parameters.sourceDir}} |
85 | | -# buildType: RelWithDebInfo |
86 | | -# cmakeArgs: -DBUILD_ALL_EXTENSIONS=ON |
87 | | -# useVulkan: 'true' |
| 77 | + # Build the loader, API layers, and samples on Windows with MinGW |
| 78 | + # - job: mingw_build |
| 79 | + # displayName: 'Windows MinGW' |
| 80 | + # variables: |
| 81 | + # VULKAN_SDK: "$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)" |
| 82 | + # pool: |
| 83 | + # vmImage: 'windows-latest' |
| 84 | + # steps: |
| 85 | + # - template: build_mingw.yml |
| 86 | + # parameters: |
| 87 | + # sourceDir: ${{parameters.sourceDir}} |
| 88 | + # buildType: RelWithDebInfo |
| 89 | + # cmakeArgs: -DBUILD_ALL_EXTENSIONS=ON |
| 90 | + # useVulkan: 'true' |
88 | 91 |
|
89 | | -- job: combine_artifacts |
90 | | - dependsOn: windows_build |
91 | | - displayName: "Organize artifacts" |
92 | | - pool: |
93 | | - vmImage: 'windows-latest' |
94 | | - steps: |
95 | | - - download: current |
96 | | - patterns: "**/*.dll" |
97 | | - displayName: Download dynamic libraries |
98 | | - - download: current |
99 | | - patterns: "**/*.lib" |
100 | | - displayName: Download link import libraries |
101 | | - - download: current |
102 | | - patterns: "**/*.h" |
103 | | - displayName: Download headers |
| 92 | + - job: combine_artifacts |
| 93 | + dependsOn: windows_build |
| 94 | + displayName: "Organize artifacts" |
| 95 | + pool: |
| 96 | + vmImage: "windows-latest" |
| 97 | + steps: |
| 98 | + - download: current |
| 99 | + patterns: "**/*.dll" |
| 100 | + displayName: Download dynamic libraries |
| 101 | + - download: current |
| 102 | + patterns: "**/*.lib" |
| 103 | + displayName: Download link import libraries |
| 104 | + - download: current |
| 105 | + patterns: "**/*.h" |
| 106 | + displayName: Download headers |
104 | 107 |
|
105 | | - - task: PythonScript@0 |
106 | | - displayName: Move artifact contents |
107 | | - inputs: |
108 | | - scriptPath: $(System.DefaultWorkingDirectory)/.azure-pipelines/organize_windows_artifacts.py |
109 | | - arguments: $(Pipeline.Workspace) $(System.DefaultWorkingDirectory)/openxr_loader |
110 | | - - task: PublishPipelineArtifact@1 |
111 | | - displayName: Publish combined artifact |
112 | | - condition: succeeded() |
113 | | - inputs: |
114 | | - path: $(System.DefaultWorkingDirectory)/openxr_loader |
115 | | - artifact: openxr_loader_windows |
| 108 | + - task: PythonScript@0 |
| 109 | + displayName: Move artifact contents |
| 110 | + inputs: |
| 111 | + scriptPath: $(System.DefaultWorkingDirectory)/.azure-pipelines/organize_windows_artifacts.py |
| 112 | + arguments: $(Pipeline.Workspace) $(System.DefaultWorkingDirectory)/openxr_loader |
| 113 | + - task: PublishPipelineArtifact@1 |
| 114 | + displayName: Publish combined artifact |
| 115 | + condition: succeeded() |
| 116 | + inputs: |
| 117 | + path: $(System.DefaultWorkingDirectory)/openxr_loader |
| 118 | + artifact: openxr_loader_windows |
116 | 119 |
|
117 | | - - task: PowerShell@2 |
118 | | - displayName: Stage loader and headers for NuGet |
119 | | - inputs: |
120 | | - filePath: $(System.DefaultWorkingDirectory)/.azure-pipelines/nuget/stage_nuget.ps1 |
121 | | - arguments: |
122 | | - $(System.DefaultWorkingDirectory)/openxr_loader ` |
123 | | - $(Build.SourcesDirectory)/specification/Makefile ` |
124 | | - $(System.DefaultWorkingDirectory)/openxr_loader_staging |
125 | | - - task: NuGetCommand@2 |
126 | | - displayName: Package for NuGet |
127 | | - inputs: |
128 | | - command: pack |
129 | | - packagesToPack: $(System.DefaultWorkingDirectory)/openxr_loader_staging/OpenXR.Loader.nuspec |
130 | | - packDestination: $(System.DefaultWorkingDirectory)/nuget |
131 | | - - task: PublishPipelineArtifact@1 |
132 | | - displayName: Publish NuGet Package |
133 | | - condition: succeeded() |
134 | | - inputs: |
135 | | - path: $(System.DefaultWorkingDirectory)/nuget |
136 | | - artifact: NuGet |
| 120 | + - task: PowerShell@2 |
| 121 | + displayName: Stage loader and headers for NuGet |
| 122 | + inputs: |
| 123 | + filePath: $(System.DefaultWorkingDirectory)/.azure-pipelines/nuget/stage_nuget.ps1 |
| 124 | + arguments: $(System.DefaultWorkingDirectory)/openxr_loader ` |
| 125 | + $(Build.SourcesDirectory)/specification/Makefile ` |
| 126 | + $(System.DefaultWorkingDirectory)/openxr_loader_staging |
| 127 | + - task: NuGetCommand@2 |
| 128 | + displayName: Package for NuGet |
| 129 | + inputs: |
| 130 | + command: pack |
| 131 | + packagesToPack: $(System.DefaultWorkingDirectory)/openxr_loader_staging/OpenXR.Loader.nuspec |
| 132 | + packDestination: $(System.DefaultWorkingDirectory)/nuget |
| 133 | + - task: PublishPipelineArtifact@1 |
| 134 | + displayName: Publish NuGet Package |
| 135 | + condition: succeeded() |
| 136 | + inputs: |
| 137 | + path: $(System.DefaultWorkingDirectory)/nuget |
| 138 | + artifact: NuGet |
0 commit comments