From 0208d8d48e35e0cccd9c90af1a74ea2578c19316 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Mon, 27 Nov 2023 14:31:06 -0600 Subject: [PATCH] ci: Remove redundant azure pipelines from CTS repo --- .azure-pipelines/openxr-cts.yml | 22 --- .azure-pipelines/shared/build_jobs.yml | 174 ------------------ .azure-pipelines/shared/build_linux.yml | 30 --- .azure-pipelines/shared/build_mingw.yml | 48 ----- .azure-pipelines/shared/build_msvc.yml | 53 ------ .../shared/check_clang_format.yml | 30 --- .azure-pipelines/shared/check_file_format.yml | 24 --- .azure-pipelines/shared/codespell.yml | 17 -- .../shared/generate_windows_matrix_build.py | 38 ---- .azure-pipelines/shared/install_vulkan.ps1 | 30 --- .../shared/organize_windows_artifacts.py | 48 ----- .../shared/print_windows_artifact_names.py | 12 -- .azure-pipelines/shared/shared.py | 26 --- 13 files changed, 552 deletions(-) delete mode 100644 .azure-pipelines/openxr-cts.yml delete mode 100644 .azure-pipelines/shared/build_jobs.yml delete mode 100644 .azure-pipelines/shared/build_linux.yml delete mode 100644 .azure-pipelines/shared/build_mingw.yml delete mode 100644 .azure-pipelines/shared/build_msvc.yml delete mode 100644 .azure-pipelines/shared/check_clang_format.yml delete mode 100644 .azure-pipelines/shared/check_file_format.yml delete mode 100644 .azure-pipelines/shared/codespell.yml delete mode 100644 .azure-pipelines/shared/generate_windows_matrix_build.py delete mode 100644 .azure-pipelines/shared/install_vulkan.ps1 delete mode 100644 .azure-pipelines/shared/organize_windows_artifacts.py delete mode 100644 .azure-pipelines/shared/print_windows_artifact_names.py delete mode 100644 .azure-pipelines/shared/shared.py diff --git a/.azure-pipelines/openxr-cts.yml b/.azure-pipelines/openxr-cts.yml deleted file mode 100644 index ad1f82d4..00000000 --- a/.azure-pipelines/openxr-cts.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -# Main azure-pipelines configuration for the OpenXR-CTS repo. -trigger: - branches: - include: - - "*" -variables: - VULKAN_SDK_VERSION: "1.1.114.0" - -stages: - - stage: Check - jobs: - - template: shared/check_clang_format.yml - # - template: shared/check_file_format.yml - - - stage: Build - jobs: - - template: shared/build_jobs.yml - parameters: - isSdkSourceRepo: false diff --git a/.azure-pipelines/shared/build_jobs.yml b/.azure-pipelines/shared/build_jobs.yml deleted file mode 100644 index b9c88cab..00000000 --- a/.azure-pipelines/shared/build_jobs.yml +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -parameters: - - name: sourceDir - type: string - default: "$(System.DefaultWorkingDirectory)" - - name: isSdkSourceRepo - type: boolean - default: true - -jobs: - # Build the loader, API layers, and samples on Linux - - job: linux_build - displayName: "Linux" - strategy: - matrix: - xlib: - buildType: RelWithDebInfo - presentationBackend: xlib - xcb: - buildType: RelWithDebInfo - presentationBackend: xcb - wayland: - buildType: RelWithDebInfo - presentationBackend: wayland - pool: - vmImage: "ubuntu-latest" - # 20230614 - container: khronosgroup/docker-images:openxr-sdk@sha256:fbc5fe29a0787cccc8f66bd9bd03c9dbddf591c7d1aea673108c38c908b280f5 - - steps: - # First build as debug - - template: build_linux.yml - parameters: - sourceDir: ${{parameters.sourceDir}} - buildType: Debug - cmakeArgs: "-DPRESENTATION_BACKEND=$(PresentationBackend)" - - # Then build release - - template: build_linux.yml - parameters: - sourceDir: ${{parameters.sourceDir}} - buildType: RelWithDebInfo - cmakeArgs: "-DPRESENTATION_BACKEND=$(PresentationBackend)" - - # This job computes the product of the config dimensions - - job: generator - pool: - vmImage: "ubuntu-latest" - steps: - - task: PythonScript@0 - name: winmatrix - inputs: - scriptPath: $(System.DefaultWorkingDirectory)/.azure-pipelines/shared/generate_windows_matrix_build.py - # argument sets the variable name defined by python script - arguments: winbuild - pythonInterpreter: /usr/bin/python3 - - # Build the loader, API layers, and samples on Windows - - job: windows_build - dependsOn: generator - displayName: "Windows MSVC" - variables: - VULKAN_SDK: "$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)" - pool: - vmImage: "windows-latest" - # Use the json emitted by the generator job to set up this matrix - strategy: - matrix: $[ dependencies.generator.outputs['winmatrix.winbuild'] ] - steps: - - template: build_msvc.yml - parameters: - sourceDir: ${{parameters.sourceDir}} - buildType: $(buildType) - generator: "$(generator)" - cmakeArgs: $(cmakeArgs) -DBUILD_ALL_EXTENSIONS=ON -DINSTALL_TO_ARCHITECTURE_PREFIXES=ON - useVulkan: "true" - - - task: PublishPipelineArtifact@1 - displayName: Publish loader - condition: and(succeeded(), eq(variables.buildType, 'RelWithDebInfo')) - inputs: - path: ${{parameters.sourceDir}}/install - artifact: $(artifactName) - - # Build the loader, API layers, and samples on Windows with MinGW - # - job: mingw_build - # displayName: 'Windows MinGW' - # variables: - # VULKAN_SDK: "$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION)" - # pool: - # vmImage: 'windows-latest' - # steps: - # - template: build_mingw.yml - # parameters: - # sourceDir: ${{parameters.sourceDir}} - # buildType: RelWithDebInfo - # cmakeArgs: -DBUILD_ALL_EXTENSIONS=ON - # useVulkan: 'true' - - - job: combine_artifacts - dependsOn: - - generator - - windows_build - condition: ${{ eq(parameters.isSdkSourceRepo, true) }} - displayName: "Organize artifacts" - pool: - vmImage: "windows-latest" - steps: - - download: current - patterns: "**/*.dll" - displayName: Download dynamic libraries - - download: current - patterns: "**/*.pdb" - displayName: Download dynamic library symbols - - download: current - patterns: "**/*.lib" - displayName: Download link import libraries - - download: current - patterns: "**/*.h" - displayName: Download headers - - download: current - patterns: "**/*.cmake" - displayName: Download CMake scripts - - download: current - patterns: "**/*.exe" - displayName: Download executables - - download: current - patterns: "**/*.json" - displayName: Download manifests - # Use the specified version of Python from the tool cache - - task: UsePythonVersion@0 - inputs: - versionSpec: "3.10" - - task: PythonScript@0 - displayName: Move artifact contents - inputs: - scriptPath: $(System.DefaultWorkingDirectory)/.azure-pipelines/shared/organize_windows_artifacts.py - arguments: $(Pipeline.Workspace) $(System.DefaultWorkingDirectory)/openxr_loader - - task: PublishPipelineArtifact@1 - displayName: Publish combined artifact - condition: succeeded() - inputs: - path: $(System.DefaultWorkingDirectory)/openxr_loader - artifact: openxr_loader_windows - - # NuGet stuff - # See: - # https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/nuget?view=azure-devops - # https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/package/nuget?view=azure-devops - - - task: PowerShell@2 - displayName: Stage loader and headers for NuGet - inputs: - filePath: $(System.DefaultWorkingDirectory)/.azure-pipelines/nuget/stage_nuget.ps1 - arguments: $(System.DefaultWorkingDirectory)/openxr_loader ` - $(Build.SourcesDirectory)/specification/Makefile ` - $(System.DefaultWorkingDirectory)/openxr_loader_staging - - task: NuGetToolInstaller@1 - inputs: - versionSpec: ">=5.0.0" - - task: NuGetCommand@2 - displayName: Package for NuGet - inputs: - command: pack - packagesToPack: $(System.DefaultWorkingDirectory)/openxr_loader_staging/OpenXR.Loader.nuspec - packDestination: $(System.DefaultWorkingDirectory)/nuget - - task: PublishPipelineArtifact@1 - displayName: Publish NuGet Package - condition: succeeded() - inputs: - path: $(System.DefaultWorkingDirectory)/nuget - artifact: NuGet diff --git a/.azure-pipelines/shared/build_linux.yml b/.azure-pipelines/shared/build_linux.yml deleted file mode 100644 index 339a18e3..00000000 --- a/.azure-pipelines/shared/build_linux.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -parameters: - - name: buildType - type: string - default: "RelWithDebInfo" - - name: cmakeArgs - type: string - default: "" - - name: sourceDir - type: string - default: "$(System.DefaultWorkingDirectory)" - - name: buildDir - type: string - default: build - -steps: - - checkout: self - lfs: true - - script: "rm -rf ${{ parameters.sourceDir }}/${{ parameters.buildDir }}" - displayName: "Clean up build directory" - - - script: "cmake -G Ninja -S . -B ${{ parameters.buildDir }} -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} ${{ parameters.cmakeArgs }}" - workingDirectory: "${{ parameters.sourceDir }}" - displayName: "Generate build system" - - - script: "ninja -C ${{ parameters.buildDir }}" - workingDirectory: "${{ parameters.sourceDir }}" - displayName: "Compile" diff --git a/.azure-pipelines/shared/build_mingw.yml b/.azure-pipelines/shared/build_mingw.yml deleted file mode 100644 index 0d38848a..00000000 --- a/.azure-pipelines/shared/build_mingw.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -parameters: - - name: buildType - type: string - default: "Debug" - - name: cmakeArgs - type: string - default: "" - - name: sourceDir - type: string - default: "$(System.DefaultWorkingDirectory)" - # TODO should be boolean - - name: useVulkan - type: string - default: "true" - -steps: - - checkout: self - lfs: true - - # - script: choco install -y ninja - # displayName: 'Install Ninja' - - - script: mkdir $(System.DefaultWorkingDirectory)\\vulkan_sdk - displayName: "Make Vulkan SDK dir" - - - powershell: ./.azure-pipelines/shared/install_vulkan.ps1 - displayName: Install Vulkan SDK - workingDirectory: "${{ parameters.sourceDir }}" - condition: eq('${{ parameters.useVulkan}}', 'true') - - - script: mkdir build - displayName: "Create build directory" - workingDirectory: "${{ parameters.sourceDir }}" - - - script: | - set VULKAN_SDK=$(System.DefaultWorkingDirectory)\\vulkan_sdk\\$(VULKAN_SDK_VERSION) - cmake .. -G "MinGW Makefiles" ${{ parameters.cmakeArgs }} -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} -DCMAKE_INSTALL_PREFIX=${{ parameters.sourceDir }}/install - displayName: "Generate build system" - workingDirectory: "${{ parameters.sourceDir }}/build" - - - script: mingw32-make -C build -j - displayName: Build all targets - - - script: mingw32-make -C build install - displayName: Install build diff --git a/.azure-pipelines/shared/build_msvc.yml b/.azure-pipelines/shared/build_msvc.yml deleted file mode 100644 index 6285403a..00000000 --- a/.azure-pipelines/shared/build_msvc.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -parameters: - - name: buildType - type: string - default: "Debug" - - name: generator - type: string - default: "Visual Studio 17 2022" - - name: cmakeArgs - type: string - default: "" - - name: sourceDir - type: string - default: "$(System.DefaultWorkingDirectory)" - # TODO should be boolean - - name: useVulkan - type: string - default: "true" - -steps: - - checkout: self - lfs: true - - - powershell: ./.azure-pipelines/shared/install_vulkan.ps1 - displayName: Install Vulkan SDK - workingDirectory: "${{ parameters.sourceDir }}" - condition: eq('${{ parameters.useVulkan}}', 'true') - - - script: mkdir build - displayName: "Create build directory" - workingDirectory: "${{ parameters.sourceDir }}" - - - 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 - inputs: - solution: "${{ parameters.sourceDir }}/build/ALL_BUILD.vcxproj" - maximumCpuCount: true - configuration: ${{ parameters.buildType }} - - - task: MSBuild@1 - displayName: Install build - inputs: - solution: "${{ parameters.sourceDir }}/build/INSTALL.vcxproj" - maximumCpuCount: true - configuration: ${{ parameters.buildType }} diff --git a/.azure-pipelines/shared/check_clang_format.yml b/.azure-pipelines/shared/check_clang_format.yml deleted file mode 100644 index ac02f883..00000000 --- a/.azure-pipelines/shared/check_clang_format.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -jobs: - - job: check_clang_format - displayName: "clang-format" - pool: - vmImage: "ubuntu-latest" - # 20230614 - container: khronosgroup/docker-images:openxr-sdk@sha256:fbc5fe29a0787cccc8f66bd9bd03c9dbddf591c7d1aea673108c38c908b280f5 - - steps: - - checkout: self - lfs: true - - - script: ./runClangFormat.sh - displayName: Run clang-format - - - script: git diff --patch --exit-code > clang-format.patch - displayName: Save changes as diff - - # In case of failure (clang-format changes needed) do these two things - - script: echo "The following files need clang-formatting:"; sed -n -e "s/^diff.* b\///p" clang-format.patch - condition: failed() - - task: PublishPipelineArtifact@1 - displayName: Publish diff - condition: failed() - inputs: - path: $(System.DefaultWorkingDirectory)/clang-format.patch - artifact: clang-format-changes diff --git a/.azure-pipelines/shared/check_file_format.yml b/.azure-pipelines/shared/check_file_format.yml deleted file mode 100644 index 15deefde..00000000 --- a/.azure-pipelines/shared/check_file_format.yml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2020-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 -jobs: - - job: check_file_format - displayName: "Check file formatting" - pool: - vmImage: "ubuntu-latest" - # 20230614 - container: khronosgroup/docker-images:openxr-sdk@sha256:fbc5fe29a0787cccc8f66bd9bd03c9dbddf591c7d1aea673108c38c908b280f5 - - steps: - - script: ./file_format.sh - displayName: File formatting checks (file_format.sh) - - - script: git diff --patch --exit-code > file_format.patch - displayName: Save changes as diff - - script: echo "The following files need file formatting:"; sed -n -e "s/^diff.* b\///p" file_format.patch - condition: failed() - - task: PublishPipelineArtifact@1 - displayName: Publish diff - condition: failed() - inputs: - path: $(System.DefaultWorkingDirectory)/file_format.patch - artifact: file_format_changes diff --git a/.azure-pipelines/shared/codespell.yml b/.azure-pipelines/shared/codespell.yml deleted file mode 100644 index 012cb318..00000000 --- a/.azure-pipelines/shared/codespell.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -jobs: - - job: check_codespell - displayName: "codespell" - pool: - vmImage: "ubuntu-latest" - # 20230614 - container: khronosgroup/docker-images:openxr-sdk@sha256:fbc5fe29a0787cccc8f66bd9bd03c9dbddf591c7d1aea673108c38c908b280f5 - - steps: - - checkout: self - lfs: true - - - script: ./checkCodespell - displayName: Run Codespell script diff --git a/.azure-pipelines/shared/generate_windows_matrix_build.py b/.azure-pipelines/shared/generate_windows_matrix_build.py deleted file mode 100644 index 0f462201..00000000 --- a/.azure-pipelines/shared/generate_windows_matrix_build.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -from itertools import product - -from shared import (PLATFORMS, TRUE_FALSE, VS_VERSION, make_win_artifact_name, - output_json) - -if __name__ == "__main__": - - configs = {} - for platform, debug, uwp in product(PLATFORMS, (False,), TRUE_FALSE): - # No need to support ARM/ARM64 except for UWP. - if not uwp and (platform.lower() == 'arm' or platform.lower() == 'arm64'): - continue - - label = [platform] - config = [] - generator = VS_VERSION - config.append('-A ' + platform) - config.append('-DDYNAMIC_LOADER=ON') - if debug: - label.append('debug') - if uwp: - label.append('UWP') - config.append('-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0') - name = '_'.join(label) - configs[name] = { - 'generator': generator, - 'buildType': 'Debug' if debug else 'RelWithDebInfo', - 'cmakeArgs': ' '.join(config) - } - if not debug: - configs[name]['artifactName'] = make_win_artifact_name( - platform, uwp) - - output_json(configs) diff --git a/.azure-pipelines/shared/install_vulkan.ps1 b/.azure-pipelines/shared/install_vulkan.ps1 deleted file mode 100644 index c1f2ab59..00000000 --- a/.azure-pipelines/shared/install_vulkan.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -if (-not $env:VULKAN_SDK_VERSION) { - $env:VULKAN_SDK_VERSION = "1.1.114.0" -} - -$SDK_VER = $env:VULKAN_SDK_VERSION - -if (-not (Test-Path env:VULKAN_SDK)) { - if ($env:SYSTEM_DEFAULTWORKINGDIRECTORY) { - $env:VULKAN_SDK = "$env:SYSTEM_DEFAULTWORKINGDIRECTORY\vulkan_sdk\$SDK_VER" - } else { - $env:VULKAN_SDK = "c:\VulkanSDK\$SDK_VER" - } -} -$parent = Split-Path -path $env:VULKAN_SDK -Write-Output "Trying for Vulkan SDK $SDK_VER" -$FN = "vksdk-$SDK_VER-lite.7z" -$URL = "https://people.collabora.com/~rpavlik/ci_resources/$FN" -if (-not (Test-Path "$env:VULKAN_SDK/Include/vulkan/vulkan.h")) { - Write-Output "Downloading $URL" - $wc = New-Object System.Net.WebClient - $wc.DownloadFile($URL, "$(pwd)\$FN") - - Write-Output "Extracting $FN in silent, blocking mode to $env:VULKAN_SDK" - Start-Process "c:\Program Files\7-Zip\7z" -ArgumentList "x", $FN, "-o$parent" -Wait -} else { - Write-Output "$env:VULKAN_SDK found and contains header" -} diff --git a/.azure-pipelines/shared/organize_windows_artifacts.py b/.azure-pipelines/shared/organize_windows_artifacts.py deleted file mode 100644 index d59c53be..00000000 --- a/.azure-pipelines/shared/organize_windows_artifacts.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -from itertools import product -from pathlib import Path -import shutil -import sys - -from shared import PLATFORMS, TRUE_FALSE, VS_VERSION, make_win_artifact_name - -CWD = Path.cwd() - - -def move(src, dest): - - print(str(src), '->', str(dest)) - src.replace(dest) - - -if __name__ == "__main__": - - configs = {} - workspace = Path(sys.argv[1]) - outbase = Path(sys.argv[2]) - - common_copied = False - - for platform, uwp in product(PLATFORMS, TRUE_FALSE): - # ARM/ARM64 is only built for the UWP platform. - if not uwp and (platform.lower() == 'arm' or platform.lower() == 'arm64'): - continue - - platform_dirname = '{}{}'.format(platform, - '_uwp' if uwp else '') - - name = make_win_artifact_name(platform, uwp) - - artifact = workspace / name - - if not common_copied: - # Start by copying the full tree over. - shutil.copytree(artifact, outbase, dirs_exist_ok=True) - common_copied = True - continue - - # lib files - shutil.copytree(artifact / platform_dirname, outbase / platform_dirname, dirs_exist_ok=True) diff --git a/.azure-pipelines/shared/print_windows_artifact_names.py b/.azure-pipelines/shared/print_windows_artifact_names.py deleted file mode 100644 index d58bfdfc..00000000 --- a/.azure-pipelines/shared/print_windows_artifact_names.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -from itertools import product - -from shared import PLATFORMS, TRUE_FALSE, VS_VERSION, make_win_artifact_name - -if __name__ == "__main__": - - for platform, uwp in product(PLATFORMS, TRUE_FALSE): - print(make_win_artifact_name(platform, uwp)) diff --git a/.azure-pipelines/shared/shared.py b/.azure-pipelines/shared/shared.py deleted file mode 100644 index 4276880c..00000000 --- a/.azure-pipelines/shared/shared.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2019-2023, The Khronos Group Inc. -# SPDX-License-Identifier: Apache-2.0 - -import json -import sys - -VS_VERSION = 'Visual Studio 17 2022' - -PLATFORMS = ('Win32', 'x64', 'ARM', 'ARM64') - -TRUE_FALSE = (True, False) - - -def make_win_artifact_name(platform, uwp): - return 'loader_{}{}'.format( - platform.lower(), - '_uwp' if uwp else '', - ) - - -def output_json(data): - if len(sys.argv) == 2: - print( - "##vso[task.setVariable variable={};isOutput=true]{}".format(sys.argv[1], json.dumps(data))) - else: - print(json.dumps(data, indent=4))