Skip to content

Commit

Permalink
Clean up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rpavlik committed Dec 1, 2023
1 parent ef61e5f commit fc503cc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 36 deletions.
14 changes: 6 additions & 8 deletions .azure-pipelines/openxr-sdk-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ stages:
container: khronosgroup/docker-images:openxr.20230323
# container: khronosgroup/docker-images@sha256:091f1d988744f0b5149126d1f4bdba342b72c01dc90c2d06d4a61738bec5521c
steps:
- script: make loader
- displayName: "Build loader document"
script: make loader
workingDirectory: specification
displayName: Build loader document
- publish: $(System.DefaultWorkingDirectory)/specification/generated/out/1.0/loader.html
artifact: LoaderDoc

Expand Down Expand Up @@ -71,9 +71,8 @@ stages:
- task: DownloadPipelineArtifact@2
displayName: Download archived OpenXR-SDK
inputs:
source: current
artifact: sdk-tarball
path: "$(Pipeline.Workspace)"
artifactName: sdk-tarball
targetPath: "$(Pipeline.Workspace)"
- script: ls -la
displayName: List files in directory
- script: ls -la sdk-tarball* || true
Expand All @@ -98,9 +97,8 @@ stages:
- task: DownloadPipelineArtifact@2
displayName: Download archived OpenXR-SDK
inputs:
source: current
artifact: sdk-tarball
path: "$(Pipeline.Workspace)"
artifactName: sdk-tarball
targetPath: "$(Pipeline.Workspace)"

- task: ExtractFiles@1
inputs:
Expand Down
13 changes: 7 additions & 6 deletions .azure-pipelines/shared/build_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
# Build the loader, API layers, and samples on Linux
- job: linux_build
displayName: "Linux"
pool:
vmImage: "ubuntu-latest"
# 20230614
container: khronosgroup/docker-images:openxr-sdk@sha256:fbc5fe29a0787cccc8f66bd9bd03c9dbddf591c7d1aea673108c38c908b280f5
strategy:
matrix:
xlib:
Expand All @@ -24,10 +28,6 @@ jobs:
wayland:
buildType: RelWithDebInfo
presentationBackend: wayland
pool:
vmImage: "ubuntu-latest"
# 20230614
container: khronosgroup/docker-images:openxr-sdk@sha256:fbc5fe29a0787cccc8f66bd9bd03c9dbddf591c7d1aea673108c38c908b280f5

steps:
# First build as debug
Expand All @@ -46,6 +46,7 @@ jobs:

# This job computes the product of the config dimensions
- job: generator
displayName: "Compute build matrix"
pool:
vmImage: "ubuntu-latest"
steps:
Expand All @@ -59,8 +60,8 @@ jobs:

# Build the loader, API layers, and samples on Windows
- job: windows_build
dependsOn: generator
displayName: "Windows MSVC"
dependsOn: generator
variables:
VULKAN_SDK: "$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)"
pool:
Expand Down Expand Up @@ -100,11 +101,11 @@ jobs:
# useVulkan: 'true'

- job: combine_artifacts
displayName: "Organize artifacts"
dependsOn:
- generator
- windows_build
condition: ${{ eq(parameters.isSdkSourceRepo, true) }}
displayName: "Organize artifacts"
pool:
vmImage: "windows-latest"
steps:
Expand Down
19 changes: 11 additions & 8 deletions .azure-pipelines/shared/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,28 @@ parameters:
- name: buildType
type: string
default: "RelWithDebInfo"

- name: cmakeArgs
type: string
default: ""

# Absolute path
- name: sourceDir
type: string
default: "$(Pipeline.Workspace)"

# Absolute path
- name: buildDir
type: string
default: "$(Build.BinariesDirectory)"

steps:
- script: "echo \"source ${{ parameters.sourceDir }} build ${{ parameters.buildDir }}\""
- script: "rm -rf ${{ parameters.buildDir }}"
displayName: "Clean up build directory"
- displayName: "Clean up build directory"
script: "rm -rf ${{ parameters.buildDir }}"

- script: "cmake -G Ninja -S . -B ${{ parameters.buildDir }} -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} ${{ parameters.cmakeArgs }}"
- displayName: "Generate build system"
workingDirectory: "${{ parameters.sourceDir }}"
displayName: "Generate build system"
script: "cmake -G Ninja -S . -B ${{ parameters.buildDir }} -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} ${{ parameters.cmakeArgs }}"

- script: "ninja -C ${{ parameters.buildDir }}"
workingDirectory: "${{ parameters.sourceDir }}"
displayName: "Compile"
- displayName: "Compile"
script: "ninja -C ${{ parameters.buildDir }}"
25 changes: 11 additions & 14 deletions .azure-pipelines/shared/build_msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,30 @@ parameters:
default: "true"

steps:
- checkout: self
lfs: true

- powershell: ./.azure-pipelines/shared/install_vulkan.ps1
displayName: Install Vulkan SDK
- displayName: "Install Vulkan SDK"
powershell: ./.azure-pipelines/shared/install_vulkan.ps1
workingDirectory: "${{ parameters.sourceDir }}"
condition: eq('${{ parameters.useVulkan}}', 'true')
condition: "eq('${{ parameters.useVulkan}}', 'true')"

- script: mkdir build
displayName: "Create build directory"
- displayName: "Create build directory"
script: mkdir build
workingDirectory: "${{ parameters.sourceDir }}"

- script: |
- displayName: "Generate build system"
script: |
set VULKAN_SDK=$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)
cmake .. -G "${{ parameters.generator }}" ${{ parameters.cmakeArgs }} -DCMAKE_INSTALL_PREFIX=${{ parameters.sourceDir }}/install
displayName: "Generate build system"
workingDirectory: "${{ parameters.sourceDir }}/build"

- task: MSBuild@1
displayName: Build all targets
- displayName: "Build all targets"
task: MSBuild@1
inputs:
solution: "${{ parameters.sourceDir }}/build/ALL_BUILD.vcxproj"
maximumCpuCount: true
configuration: ${{ parameters.buildType }}

- task: MSBuild@1
displayName: Install build
- displayName: "Install build"
task: MSBuild@1
inputs:
solution: "${{ parameters.sourceDir }}/build/INSTALL.vcxproj"
maximumCpuCount: true
Expand Down

0 comments on commit fc503cc

Please sign in to comment.