|
| 1 | +# Copyright (c) Microsoft Corporation. |
| 2 | +# Licensed under the MIT License. |
| 3 | +# |
| 4 | +# https://go.microsoft.com/fwlink/?LinkId=248926 |
| 5 | + |
| 6 | +# Builds the library and test suite using MSBuild+VCPKO |
| 7 | + |
| 8 | +schedules: |
| 9 | +- cron: "0 5 * * *" |
| 10 | + displayName: 'Nightly build' |
| 11 | + branches: |
| 12 | + include: |
| 13 | + - main |
| 14 | + |
| 15 | +trigger: |
| 16 | + branches: |
| 17 | + include: |
| 18 | + - main |
| 19 | + paths: |
| 20 | + exclude: |
| 21 | + - '*.md' |
| 22 | + - LICENSE |
| 23 | + - '.github/*' |
| 24 | + - '.nuget/*' |
| 25 | + - build/*.cmd |
| 26 | + - build/OneFuzz*.json |
| 27 | + - build/*.props |
| 28 | + - build/*.ps1 |
| 29 | + - build/*.targets |
| 30 | + |
| 31 | +pr: |
| 32 | + branches: |
| 33 | + include: |
| 34 | + - main |
| 35 | + paths: |
| 36 | + exclude: |
| 37 | + - '*.md' |
| 38 | + - LICENSE |
| 39 | + - '.github/*' |
| 40 | + - '.nuget/*' |
| 41 | + - build/*.cmd |
| 42 | + - build/OneFuzz*.json |
| 43 | + - build/*.props |
| 44 | + - build/*.ps1 |
| 45 | + - build/*.targets |
| 46 | + drafts: false |
| 47 | + |
| 48 | +resources: |
| 49 | + repositories: |
| 50 | + - repository: self |
| 51 | + type: git |
| 52 | + ref: refs/heads/main |
| 53 | + - repository: vcpkgRepo |
| 54 | + name: Microsoft/vcpkg |
| 55 | + type: github |
| 56 | + endpoint: microsoft |
| 57 | + ref: refs/tags/$(VCPKG_TAG) |
| 58 | + - repository: testRepo |
| 59 | + name: walbourn/directxtextest |
| 60 | + type: github |
| 61 | + endpoint: microsoft |
| 62 | + ref: refs/heads/main |
| 63 | + |
| 64 | +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) |
| 65 | + |
| 66 | +pool: |
| 67 | + vmImage: windows-2022 |
| 68 | + |
| 69 | +variables: |
| 70 | + Codeql.Enabled: false |
| 71 | + VCPKG_ROOT: $(Build.SourcesDirectory)/vcpkg |
| 72 | + VCPKG_CMAKE_DIR: $(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake |
| 73 | + VCPKG_MANIFEST_DIR: $(Build.SourcesDirectory)/build |
| 74 | + |
| 75 | +jobs: |
| 76 | +- job: VCPKG_BUILD |
| 77 | + displayName: 'Build with MSBuild+VCPKG' |
| 78 | + steps: |
| 79 | + - checkout: self |
| 80 | + clean: true |
| 81 | + fetchTags: false |
| 82 | + fetchDepth: 1 |
| 83 | + path: 's' |
| 84 | + - checkout: vcpkgRepo |
| 85 | + displayName: Fetch VCPKG |
| 86 | + clean: true |
| 87 | + fetchTags: false |
| 88 | + fetchDepth: 1 |
| 89 | + path: 's/vcpkg' |
| 90 | + - task: CmdLine@2 |
| 91 | + displayName: VCPKG Bootstrap |
| 92 | + inputs: |
| 93 | + script: | |
| 94 | + call bootstrap-vcpkg.bat |
| 95 | + echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x64-windows |
| 96 | + echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x64-windows |
| 97 | +
|
| 98 | + workingDirectory: $(Build.SourcesDirectory)\vcpkg |
| 99 | + - task: CmdLine@2 |
| 100 | + displayName: VCPKG install packages |
| 101 | + inputs: |
| 102 | + script: | |
| 103 | + call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows |
| 104 | + call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-windows |
| 105 | + call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=arm64-windows |
| 106 | +
|
| 107 | + workingDirectory: $(VCPKG_ROOT) |
| 108 | + - task: PowerShell@2 |
| 109 | + displayName: Setup VCPKG Directory.Build.props and .target files |
| 110 | + inputs: |
| 111 | + targetType: inline |
| 112 | + script: | |
| 113 | + $props = "<Project>`n <Import Project=`"`$(MSBuildThisFileDirectory)vcpkg\scripts\buildsystems\msbuild\vcpkg.props`" />`n</Project>`n" |
| 114 | + $targets = "<Project>`n <Import Project=`"`$(MSBuildThisFileDirectory)vcpkg\scripts\buildsystems\msbuild\vcpkg.targets`" />`n</Project>`n" |
| 115 | + Set-Content -Path "Directory.Build.props" -Value $props |
| 116 | + Set-Content -Path "Directory.Build.targets" -Value $targets |
| 117 | +
|
| 118 | + workingDirectory: $(Build.SourcesDirectory) |
| 119 | + - task: VSBuild@1 |
| 120 | + displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32dbg |
| 121 | + inputs: |
| 122 | + solution: DirectXTex_Desktop_2022_Win10.sln |
| 123 | + msbuildArgs: /p:PreferredToolArchitecture=x64 |
| 124 | + platform: x86 |
| 125 | + configuration: Debug |
| 126 | + msbuildArchitecture: x64 |
| 127 | + - task: VSBuild@1 |
| 128 | + displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32rel |
| 129 | + inputs: |
| 130 | + solution: DirectXTex_Desktop_2022_Win10.sln |
| 131 | + msbuildArgs: /p:PreferredToolArchitecture=x64 |
| 132 | + platform: x86 |
| 133 | + configuration: Release |
| 134 | + msbuildArchitecture: x64 |
| 135 | + - task: VSBuild@1 |
| 136 | + displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64dbg |
| 137 | + inputs: |
| 138 | + solution: DirectXTex_Desktop_2022_Win10.sln |
| 139 | + msbuildArgs: /p:PreferredToolArchitecture=x64 |
| 140 | + platform: x64 |
| 141 | + configuration: Debug |
| 142 | + msbuildArchitecture: x64 |
| 143 | + - task: VSBuild@1 |
| 144 | + displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64rel |
| 145 | + inputs: |
| 146 | + solution: DirectXTex_Desktop_2022_Win10.sln |
| 147 | + msbuildArgs: /p:PreferredToolArchitecture=x64 |
| 148 | + platform: x64 |
| 149 | + configuration: Release |
| 150 | + msbuildArchitecture: x64 |
| 151 | + - task: VSBuild@1 |
| 152 | + displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg |
| 153 | + inputs: |
| 154 | + solution: DirectXTex_Desktop_2022_Win10.sln |
| 155 | + msbuildArgs: /p:PreferredToolArchitecture=x64 |
| 156 | + platform: ARM64 |
| 157 | + configuration: Debug |
| 158 | + msbuildArchitecture: x64 |
| 159 | + - task: VSBuild@1 |
| 160 | + displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel |
| 161 | + inputs: |
| 162 | + solution: DirectXTex_Desktop_2022_Win10.sln |
| 163 | + msbuildArgs: /p:PreferredToolArchitecture=x64 |
| 164 | + platform: ARM64 |
| 165 | + configuration: Release |
| 166 | + msbuildArchitecture: x64 |
0 commit comments