Skip to content

Commit 991c656

Browse files
authored
Merge pull request #210 from KhronosGroup/try-fix-ci
Fix CI
2 parents f87e203 + feeb83b commit 991c656

File tree

9 files changed

+307
-279
lines changed

9 files changed

+307
-279
lines changed

.azure-pipelines/build_jobs.yml

Lines changed: 127 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,138 @@
1+
# Copyright (c) 2019-2020 The Khronos Group Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
parameters:
2-
sourceDir: '$(System.DefaultWorkingDirectory)'
5+
sourceDir: "$(System.DefaultWorkingDirectory)"
36

47
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)"
2932

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)"
3639

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
4649

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"
6669

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)
7376

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'
8891

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
104107

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
116119

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

.azure-pipelines/build_linux.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1+
# Copyright (c) 2019-2020 The Khronos Group Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
parameters:
25
buildType: RelWithDebInfo
3-
cmakeArgs: ''
6+
cmakeArgs: ""
47
buildDir: build
5-
sourceDir: '$(System.DefaultWorkingDirectory)'
8+
sourceDir: "$(System.DefaultWorkingDirectory)"
69

710
steps:
811
- script: |
912
rm -rf ${{ parameters.sourceDir }}/${{ parameters.buildDir }}
1013
mkdir -p ${{ parameters.sourceDir }}/${{ parameters.buildDir }}
11-
displayName: 'Clean up and create new build directory'
14+
displayName: "Clean up and create new build directory"
1215
1316
- script: cmake -G Ninja .. -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} ${{ parameters.cmakeArgs }}
1417
workingDirectory: ${{ parameters.sourceDir }}/${{ parameters.buildDir }}
15-
displayName: 'Generate build system'
18+
displayName: "Generate build system"
1619

1720
- script: ninja
1821
workingDirectory: ${{ parameters.sourceDir }}/${{ parameters.buildDir }}
19-
displayName: 'Compile'
22+
displayName: "Compile"

.azure-pipelines/build_mingw.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1+
# Copyright (c) 2019-2020 The Khronos Group Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
parameters:
2-
buildType: 'Debug'
3-
cmakeArgs: ''
4-
sourceDir: '$(System.DefaultWorkingDirectory)'
5-
useVulkan: 'true'
5+
buildType: "Debug"
6+
cmakeArgs: ""
7+
sourceDir: "$(System.DefaultWorkingDirectory)"
8+
useVulkan: "true"
69

710
steps:
811
# - script: choco install -y ninja
912
# displayName: 'Install Ninja'
1013

1114
- script: mkdir $(System.DefaultWorkingDirectory)\\vulkan_sdk
12-
displayName: 'Make Vulkan SDK dir'
15+
displayName: "Make Vulkan SDK dir"
1316

14-
- powershell: ./.azure-pipelines/install_vulkan.ps1
17+
- powershell: ./.azure-pipelines/install_vulkan.ps1
1518
displayName: Install Vulkan SDK
16-
workingDirectory: '${{ parameters.sourceDir }}'
19+
workingDirectory: "${{ parameters.sourceDir }}"
1720
condition: eq('${{ parameters.useVulkan}}', 'true')
1821

1922
- script: mkdir build
20-
displayName: 'Create build directory'
21-
workingDirectory: '${{ parameters.sourceDir }}'
23+
displayName: "Create build directory"
24+
workingDirectory: "${{ parameters.sourceDir }}"
2225

2326
- script: |
2427
set VULKAN_SDK=$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)
2528
cmake .. -G "MinGW Makefiles" ${{ parameters.cmakeArgs }} -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} -DCMAKE_INSTALL_PREFIX=${{ parameters.sourceDir }}/install
26-
displayName: 'Generate build system'
27-
workingDirectory: '${{ parameters.sourceDir }}/build'
29+
displayName: "Generate build system"
30+
workingDirectory: "${{ parameters.sourceDir }}/build"
2831
2932
- script: mingw32-make -C build -j
3033
displayName: Build all targets

.azure-pipelines/build_msvc.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
1+
# Copyright (c) 2019-2020 The Khronos Group Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
parameters:
2-
buildType: 'Debug'
3-
generator: 'Visual Studio 16 2019'
4-
cmakeArgs: ''
5-
sourceDir: '$(System.DefaultWorkingDirectory)'
6-
useVulkan: 'true'
5+
buildType: "Debug"
6+
generator: "Visual Studio 16 2019"
7+
cmakeArgs: ""
8+
sourceDir: "$(System.DefaultWorkingDirectory)"
9+
useVulkan: "true"
710

811
steps:
9-
1012
- powershell: ./.azure-pipelines/install_vulkan.ps1
1113
displayName: Install Vulkan SDK
12-
workingDirectory: '${{ parameters.sourceDir }}'
14+
workingDirectory: "${{ parameters.sourceDir }}"
1315
condition: eq('${{ parameters.useVulkan}}', 'true')
1416

1517
- script: mkdir build
16-
displayName: 'Create build directory'
17-
workingDirectory: '${{ parameters.sourceDir }}'
18+
displayName: "Create build directory"
19+
workingDirectory: "${{ parameters.sourceDir }}"
1820

1921
- script: |
2022
set VULKAN_SDK=$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)
2123
cmake .. -G "${{ parameters.generator }}" ${{ parameters.cmakeArgs }} -DCMAKE_INSTALL_PREFIX=${{ parameters.sourceDir }}/install
22-
displayName: 'Generate build system'
23-
workingDirectory: '${{ parameters.sourceDir }}/build'
24+
displayName: "Generate build system"
25+
workingDirectory: "${{ parameters.sourceDir }}/build"
2426
2527
- task: MSBuild@1
2628
displayName: Build all targets
2729
inputs:
28-
solution: '${{ parameters.sourceDir }}/build/ALL_BUILD.vcxproj'
30+
solution: "${{ parameters.sourceDir }}/build/ALL_BUILD.vcxproj"
2931
maximumCpuCount: true
3032
configuration: ${{ parameters.buildType }}
3133

3234
- task: MSBuild@1
3335
displayName: Install build
3436
inputs:
35-
solution: '${{ parameters.sourceDir }}/build/INSTALL.vcxproj'
37+
solution: "${{ parameters.sourceDir }}/build/INSTALL.vcxproj"
3638
maximumCpuCount: true
3739
configuration: ${{ parameters.buildType }}

0 commit comments

Comments
 (0)