diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 253bcb76..ca79ca5b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,4 +3,4 @@ updates: - package-ecosystem: github-actions directory: / schedule: - interval: daily + interval: weekly diff --git a/.github/workflows/bvt.yml b/.github/workflows/bvt.yml new file mode 100644 index 00000000..bcf21344 --- /dev/null +++ b/.github/workflows/bvt.yml @@ -0,0 +1,103 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkId=248926 + +name: 'CTest (BVTs)' + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths-ignore: + - '*.md' + - LICENSE + - '.nuget/*' + - build/*.cmd + - build/*.json + - build/*.props + - build/*.ps1 + - build/*.targets + - build/*.yml + +permissions: + contents: read + +jobs: + build: + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + + strategy: + fail-fast: false + + matrix: + os: [windows-2019, windows-2022] + build_type: [x64-Release] + arch: [amd64] + + steps: + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + + - name: Clone test repository + uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 + with: + repository: walbourn/directxtextest + path: Tests + ref: main + + - name: 'Install Ninja' + run: choco install ninja + + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + with: + arch: ${{ matrix.arch }} + + - name: 'Set triplet' + shell: pwsh + run: | + if ("${{ matrix.arch }}" -eq "amd64") + { + echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV + } + elseif ("${{ matrix.arch }}" -eq "amd64_x86") + { + echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV + } + elseif ("${{ matrix.arch }}" -eq "amd64_arm64") + { + if ("${{ matrix.build_type }}" -match "^arm64ec") + { + echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV + } + else + { + echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV + } + } + else + { + echo "::error Unknown architecture/build-type triplet mapping" + } + + - uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11 + with: + runVcpkgInstall: true + vcpkgJsonGlob: '**/build/vcpkg.json' + vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}' + + - name: 'Configure CMake' + working-directory: ${{ github.workspace }} + run: > + cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_BVT=ON + -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" + -DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" + + - name: 'Build' + working-directory: ${{ github.workspace }} + run: cmake --build out\build\${{ matrix.build_type }} + + - name: 'Run BVTs' + working-directory: ${{ github.workspace }} + run: ctest --preset=${{ matrix.build_type }} --output-on-failure diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b3ae3bf..055f7b80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,7 +125,7 @@ jobs: with: runVcpkgInstall: true vcpkgJsonGlob: '**/build/vcpkg.json' - vcpkgGitCommitId: '7516a02de04e8f8ff4e4beb8f5bac0565f9bf9da' + vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}' - name: 'Configure CMake' working-directory: ${{ github.workspace }} diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index e6a09573..2eb4c29b 100644 --- a/.github/workflows/vcpkg.yml +++ b/.github/workflows/vcpkg.yml @@ -81,7 +81,7 @@ jobs: with: runVcpkgInstall: true vcpkgJsonGlob: '**/build/vcpkg.json' - vcpkgGitCommitId: '7516a02de04e8f8ff4e4beb8f5bac0565f9bf9da' + vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}' - name: 'Configure CMake' working-directory: ${{ github.workspace }} diff --git a/.github/workflows/wsl.yml b/.github/workflows/wsl.yml index 705911c6..f7d01005 100644 --- a/.github/workflows/wsl.yml +++ b/.github/workflows/wsl.yml @@ -41,7 +41,7 @@ jobs: with: runVcpkgInstall: true vcpkgJsonGlob: '**/build/vcpkg.json' - vcpkgGitCommitId: '7516a02de04e8f8ff4e4beb8f5bac0565f9bf9da' + vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}' - name: 'Configure CMake' working-directory: ${{ github.workspace }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 8999965e..1d1c4e44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -605,13 +605,16 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") target_compile_options(${t} PRIVATE ${WarningsEXE}) endforeach() - if(BUILD_FUZZING - AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.32) - AND (NOT WINDOWS_STORE)) - foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) - target_compile_options(${t} PRIVATE ${ASAN_SWITCHES}) - target_link_libraries(${t} PRIVATE ${ASAN_LIBS}) - endforeach() + if(BUILD_FUZZING AND (NOT WINDOWS_STORE)) + string(REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) + string(REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}) + + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.32) + foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) + target_compile_options(${t} PRIVATE ${ASAN_SWITCHES}) + target_link_libraries(${t} PRIVATE ${ASAN_LIBS}) + endforeach() + endif() endif() endif() diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index 2eff1c65..30a5f9c2 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -50,13 +50,19 @@ resources: - repository: self type: git ref: refs/heads/main + - repository: vcpkgRepo + name: Microsoft/vcpkg + type: github + endpoint: microsoft + ref: refs/tags/$(VCPKG_TAG) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) variables: Codeql.Enabled: false - VCPKG_CMAKE_DIR: '$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake' - GITHUB_PAT: $(GITHUBPUBLICTOKEN) + VCPKG_ROOT: $(Build.SourcesDirectory)/vcpkg + VCPKG_CMAKE_DIR: $(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake + VCPKG_MANIFEST_DIR: $(Build.SourcesDirectory)/build VS_GENERATOR: 'Visual Studio 17 2022' WIN10_SDK: '10.0.19041.0' WIN11_SDK: '10.0.22000.0' @@ -74,142 +80,142 @@ jobs: - task: CMake@1 displayName: 'CMake (MSVC): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (MSVC): Config x86' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A Win32 -B out2 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A Win32 -B out2 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC): Build x86 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Build x86 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (MSVC): Config ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out3 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A ARM64 -B out3 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC): Build ARM64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Build ARM64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (UWP): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out4 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out4 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 - task: CMake@1 displayName: 'CMake (UWP): Build x64' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v - task: CMake@1 displayName: 'CMake (ClangCl): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out6 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out6 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - task: CMake@1 displayName: 'CMake (ClangCl): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out6 -v --config Debug - task: CMake@1 displayName: 'CMake (ClangCl): Build x64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out6 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (ClangCl): Config ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out7 -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out7 -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) - task: CMake@1 displayName: 'CMake (ClangCl): Build ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out7 -v --config Debug - task: CMake@1 displayName: 'CMake (Win10): Config' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out8 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out8 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON - task: CMake@1 displayName: 'CMake (Win10): Build' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out8 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC Spectre): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out9 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out9 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out9 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build x64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out9 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (MSVC Spectre): Config ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out10 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A ARM64 -B out10 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build ARM64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out10 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build ARM64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out10 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (Win10 Spectre): Config' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out11 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out11 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON - task: CMake@1 displayName: 'CMake (Win10 Spectre): Build' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out11 -v --config Debug - task: CMake@1 displayName: 'CMake (NO_WCHAR_T): Config' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out12 -DNO_WCHAR_T=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_DX12=ON' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out12 -DNO_WCHAR_T=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_DX12=ON - task: CMake@1 displayName: 'CMake (NO_WCHAR_T): Build' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out12 -v --config Debug - job: CMAKE_BUILD_VCPKG @@ -218,77 +224,69 @@ jobs: - checkout: self clean: true fetchTags: false - - task: CmdLine@2 - # We can use the preinstalled vcpkg instead of the latest when MS Hosted updates their vcpkg to the newer DirectX-Headers + fetchDepth: 1 + path: 's' + - checkout: vcpkgRepo displayName: Fetch VCPKG - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git - workingDirectory: $(Build.SourcesDirectory) + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/vcpkg' - task: CmdLine@2 displayName: VCPKG Bootstrap inputs: script: call bootstrap-vcpkg.bat - workingDirectory: $(Build.SourcesDirectory)\vcpkg + workingDirectory: $(VCPKG_ROOT) - task: CmdLine@2 - displayName: VCPKG install headers - inputs: - script: | - call vcpkg install directxmath - @if ERRORLEVEL 1 goto error - call vcpkg install directx-headers - @if ERRORLEVEL 1 goto error - call vcpkg install openexr - @if ERRORLEVEL 1 goto error - call vcpkg install libpng - @if ERRORLEVEL 1 goto error - call vcpkg install libjpeg-turbo - @if ERRORLEVEL 1 goto error - :finish - @echo --- VCPKG COMPLETE --- - exit /b 0 - :error - @echo --- ERROR: VCPKG FAILED --- - exit /b 1 - - workingDirectory: $(Build.SourcesDirectory)\vcpkg - + displayName: VCPKG install packages + inputs: + script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: 'CMake (MSVC): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Config x64 w/ OpenEXR' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Config x64 w/ libjpeg' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Config x64 w/ libpng' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug w/ libpng' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v --config Debug diff --git a/build/DirectXTex-GitHub-CMake.yml b/build/DirectXTex-GitHub-CMake.yml index 5784b022..14ded4cc 100644 --- a/build/DirectXTex-GitHub-CMake.yml +++ b/build/DirectXTex-GitHub-CMake.yml @@ -50,13 +50,19 @@ resources: - repository: self type: git ref: refs/heads/main + - repository: vcpkgRepo + name: Microsoft/vcpkg + type: github + endpoint: microsoft + ref: refs/tags/$(VCPKG_TAG) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) variables: Codeql.Enabled: false - VCPKG_CMAKE_DIR: '$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake' - GITHUB_PAT: $(GITHUBPUBLICTOKEN) + VCPKG_ROOT: $(Build.SourcesDirectory)/vcpkg + VCPKG_CMAKE_DIR: $(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake + VCPKG_MANIFEST_DIR: $(Build.SourcesDirectory)/build VS_GENERATOR: 'Visual Studio 16 2019' WIN10_SDK: '10.0.19041.0' WIN11_SDK: '10.0.22000.0' @@ -74,142 +80,142 @@ jobs: - task: CMake@1 displayName: 'CMake (MSVC): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (MSVC): Config x86' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A Win32 -B out2 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A Win32 -B out2 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC): Build x86 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Build x86 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (MSVC): Config ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out3 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A ARM64 -B out3 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC): Build ARM64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Build ARM64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (UWP): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out4 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out4 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 - task: CMake@1 displayName: 'CMake (UWP): Build x64' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v - task: CMake@1 displayName: 'CMake (ClangCl): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out6 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out6 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) - task: CMake@1 displayName: 'CMake (ClangCl): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out6 -v --config Debug - task: CMake@1 displayName: 'CMake (ClangCl): Build x64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out6 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (ClangCl): Config ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out7 -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out7 -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) - task: CMake@1 displayName: 'CMake (ClangCl): Build ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out7 -v --config Debug - task: CMake@1 displayName: 'CMake (Win10): Config' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out8 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out8 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON - task: CMake@1 displayName: 'CMake (Win10): Build' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out8 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC Spectre): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out9 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out9 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out9 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build x64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out9 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (MSVC Spectre): Config ARM64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out10 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A ARM64 -B out10 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=OFF - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build ARM64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out10 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC Spectre): Build ARM64 Release' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out10 -v --config RelWithDebInfo - task: CMake@1 displayName: 'CMake (Win10 Spectre): Config' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out11 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out11 -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DBUILD_DX12=ON - task: CMake@1 displayName: 'CMake (Win10 Spectre): Build' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out11 -v --config Debug - task: CMake@1 displayName: 'CMake (NO_WCHAR_T): Config' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out12 -DNO_WCHAR_T=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_DX12=ON' + cwd: $(Build.SourcesDirectory) + cmakeArgs: -G "$(VS_GENERATOR)" -A x64 -B out12 -DNO_WCHAR_T=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_DX12=ON - task: CMake@1 displayName: 'CMake (NO_WCHAR_T): Build' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out12 -v --config Debug - job: CMAKE_BUILD_VCPKG @@ -218,77 +224,69 @@ jobs: - checkout: self clean: true fetchTags: false - - task: CmdLine@2 - # We can use the preinstalled vcpkg instead of the latest when MS Hosted updates their vcpkg to the newer DirectX-Headers + fetchDepth: 1 + path: 's' + - checkout: vcpkgRepo displayName: Fetch VCPKG - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git - workingDirectory: $(Build.SourcesDirectory) + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/vcpkg' - task: CmdLine@2 displayName: VCPKG Bootstrap inputs: script: call bootstrap-vcpkg.bat - workingDirectory: $(Build.SourcesDirectory)\vcpkg + workingDirectory: $(VCPKG_ROOT) - task: CmdLine@2 - displayName: VCPKG install headers - inputs: - script: | - call vcpkg install directxmath - @if ERRORLEVEL 1 goto error - call vcpkg install directx-headers - @if ERRORLEVEL 1 goto error - call vcpkg install openexr - @if ERRORLEVEL 1 goto error - call vcpkg install libpng - @if ERRORLEVEL 1 goto error - call vcpkg install libjpeg-turbo - @if ERRORLEVEL 1 goto error - :finish - @echo --- VCPKG COMPLETE --- - exit /b 0 - :error - @echo --- ERROR: VCPKG FAILED --- - exit /b 1 - - workingDirectory: $(Build.SourcesDirectory)\vcpkg - + displayName: VCPKG install packages + inputs: + script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: 'CMake (MSVC): Config x64' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Config x64 w/ OpenEXR' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Config x64 w/ libjpeg' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v --config Debug - task: CMake@1 displayName: 'CMake (MSVC): Config x64 w/ libpng' inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug w/ libpng' inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v --config Debug diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index 027ea39b..6945a6ae 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -73,10 +73,9 @@ jobs: clean: true fetchTags: false - task: CmdLine@2 - # We can use the preinstalled vcpkg instead of the latest when MS Hosted updates their vcpkg to the newer DirectX-Headers displayName: Fetch VCPKG inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git + script: git clone --quiet --no-tags --depth=1 --branch $(VCPKG_TAG) https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git workingDirectory: $(Build.SourcesDirectory) - task: CmdLine@2 displayName: VCPKG Bootstrap @@ -203,7 +202,7 @@ jobs: - task: CmdLine@2 displayName: Fetch VCPKG inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git + script: git clone --quiet --no-tags --depth=1 --branch $(VCPKG_TAG) https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git workingDirectory: $(Build.SourcesDirectory) - task: CmdLine@2 displayName: Fetch Tests diff --git a/build/DirectXTex-GitHub-Test-Dev17.yml b/build/DirectXTex-GitHub-Test-Dev17.yml index 5977ec7e..6ed8bcc9 100644 --- a/build/DirectXTex-GitHub-Test-Dev17.yml +++ b/build/DirectXTex-GitHub-Test-Dev17.yml @@ -28,6 +28,11 @@ resources: type: git ref: refs/heads/main trigger: none + - repository: testRepo + name: walbourn/directxtextest + type: github + endpoint: microsoft + ref: refs/heads/main name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) @@ -37,7 +42,6 @@ pool: variables: Codeql.Enabled: false VC_PATH: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC' - GITHUB_PAT: $(GITHUBPUBLICTOKEN) GUID_FEED: $(ADOFeedGUID) jobs: @@ -49,19 +53,14 @@ jobs: - checkout: self clean: true fetchTags: false - - task: DeleteFiles@1 - displayName: Delete files from Tests - inputs: - SourceFolder: Tests - Contents: '**' - RemoveSourceFolder: true - RemoveDotFiles: true - - task: CmdLine@2 + fetchDepth: 1 + path: 's' + - checkout: testRepo displayName: Fetch Tests - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxtextest.git Tests - workingDirectory: $(Build.SourcesDirectory) - failOnStderr: true + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/Tests' - task: NuGetToolInstaller@1 displayName: 'Use NuGet' - task: NuGetCommand@2 @@ -170,19 +169,14 @@ jobs: - checkout: self clean: true fetchTags: false - - task: DeleteFiles@1 - displayName: Delete files from Tests - inputs: - SourceFolder: Tests - Contents: '**' - RemoveSourceFolder: true - RemoveDotFiles: true - - task: CmdLine@2 + fetchDepth: 1 + path: 's' + - checkout: testRepo displayName: Fetch Tests - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxtextest.git Tests - workingDirectory: $(Build.SourcesDirectory) - failOnStderr: true + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/Tests' - task: CmdLine@2 displayName: Setup environment for CMake to use VS inputs: @@ -257,19 +251,14 @@ jobs: - checkout: self clean: true fetchTags: false - - task: DeleteFiles@1 - displayName: Delete files from Tests - inputs: - SourceFolder: Tests - Contents: '**' - RemoveSourceFolder: true - RemoveDotFiles: true - - task: CmdLine@2 + fetchDepth: 1 + path: 's' + - checkout: testRepo displayName: Fetch Tests - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxtextest.git Tests - workingDirectory: $(Build.SourcesDirectory) - failOnStderr: true + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/Tests' - task: CmdLine@2 displayName: Setup environment for CMake to use VS inputs: diff --git a/build/DirectXTex-GitHub-Test.yml b/build/DirectXTex-GitHub-Test.yml index 5b5ac46e..347ae320 100644 --- a/build/DirectXTex-GitHub-Test.yml +++ b/build/DirectXTex-GitHub-Test.yml @@ -27,6 +27,11 @@ resources: - repository: self type: git ref: refs/heads/main + - repository: testRepo + name: walbourn/directxtextest + type: github + endpoint: microsoft + ref: refs/heads/main name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) @@ -35,7 +40,6 @@ pool: variables: Codeql.Enabled: false - GITHUB_PAT: $(GITHUBPUBLICTOKEN) GUID_FEED: $(ADOFeedGUID) jobs: @@ -47,19 +51,14 @@ jobs: - checkout: self clean: true fetchTags: false - - task: DeleteFiles@1 - displayName: Delete files from Tests - inputs: - SourceFolder: Tests - Contents: '**' - RemoveSourceFolder: true - RemoveDotFiles: true - - task: CmdLine@2 + fetchDepth: 1 + path: 's' + - checkout: testRepo displayName: Fetch Tests - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxtextest.git Tests - workingDirectory: $(Build.SourcesDirectory) - failOnStderr: true + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/Tests' - task: NuGetToolInstaller@1 displayName: 'Use NuGet' - task: NuGetCommand@2 diff --git a/build/DirectXTex-GitHub-WSL-11.yml b/build/DirectXTex-GitHub-WSL-11.yml index 1fca1b09..64717405 100644 --- a/build/DirectXTex-GitHub-WSL-11.yml +++ b/build/DirectXTex-GitHub-WSL-11.yml @@ -136,7 +136,7 @@ jobs: - task: CmdLine@2 displayName: Fetch VCPKG inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git + script: git clone --quiet --no-tags --depth=1 --branch $(VCPKG_TAG) https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git workingDirectory: $(Build.SourcesDirectory) - task: Bash@3 displayName: VCPKG Bootstrap diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 71e70695..48ede4aa 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -155,7 +155,7 @@ jobs: - task: CmdLine@2 displayName: Fetch VCPKG inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git + script: git clone --quiet --no-tags --depth=1 --branch $(VCPKG_TAG) https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git workingDirectory: $(Build.SourcesDirectory) - task: Bash@3 displayName: VCPKG Bootstrap