|
| 1 | +parameters: |
| 2 | + sourceDir: '$(System.DefaultWorkingDirectory)' |
| 3 | + |
| 4 | +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)' |
| 29 | + |
| 30 | + # Then build release |
| 31 | + - template: build_linux.yml |
| 32 | + parameters: |
| 33 | + sourceDir: ${{parameters.sourceDir}} |
| 34 | + buildType: RelWithDebInfo |
| 35 | + cmakeArgs: '-DPRESENTATION_BACKEND=$(PresentationBackend)' |
| 36 | + |
| 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 |
| 46 | + |
| 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' |
| 66 | + |
| 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) |
| 73 | + |
| 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' |
| 88 | + |
| 89 | +- job: combine_artifacts |
| 90 | + dependsOn: windows_build |
| 91 | + displayName: "Organize artifacts" |
| 92 | + # Only build this if we're succeeding and we're on the master branch |
| 93 | + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) |
| 94 | + pool: |
| 95 | + vmImage: 'windows-latest' |
| 96 | + steps: |
| 97 | + - download: current |
| 98 | + patterns: "**/*.dll" |
| 99 | + displayName: Download dynamic libraries |
| 100 | + - download: current |
| 101 | + patterns: "**/*.lib" |
| 102 | + displayName: Download static libraries and link import libraries |
| 103 | + - download: current |
| 104 | + patterns: "**/*.h" |
| 105 | + displayName: Download headers |
| 106 | + |
| 107 | + - task: PythonScript@0 |
| 108 | + displayName: Move artifact contents |
| 109 | + inputs: |
| 110 | + scriptPath: $(System.DefaultWorkingDirectory)/.azure-pipelines/organize_windows_artifacts.py |
| 111 | + arguments: $(Pipeline.Workspace) $(System.DefaultWorkingDirectory)/openxr_loader |
| 112 | + - task: PublishPipelineArtifact@1 |
| 113 | + displayName: Publish combined artifact |
| 114 | + condition: succeeded() |
| 115 | + inputs: |
| 116 | + path: $(System.DefaultWorkingDirectory)/openxr_loader |
| 117 | + artifact: openxr_loader_windows |
0 commit comments