From a1708b3919f9ed5df2607dea99207ee41c89bcff Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 2 Oct 2024 21:57:50 -0700 Subject: [PATCH 01/14] Add GitHub Action for BVTs with subset of tests --- .github/dependabot.yml | 2 +- .github/workflows/bvt.yml | 106 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/bvt.yml 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..0ee4e6a1 --- /dev/null +++ b/.github/workflows/bvt.yml @@ -0,0 +1,106 @@ +# 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 + +env: + DIRECTXTEX_MEDIA_PATH: ${{ github.workspace }}/Media + +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-Debug, 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: '7516a02de04e8f8ff4e4beb8f5bac0565f9bf9da' + + - 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 From 6ac6f3bb4ac2da04aafa2314b2edc4a0c0a6b5fa Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 2 Oct 2024 22:00:41 -0700 Subject: [PATCH 02/14] Update GHA --- .github/workflows/bvt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bvt.yml b/.github/workflows/bvt.yml index 0ee4e6a1..4aa12d04 100644 --- a/.github/workflows/bvt.yml +++ b/.github/workflows/bvt.yml @@ -37,7 +37,7 @@ jobs: matrix: os: [windows-2019, windows-2022] - build_type: [x64-Debug, x64-Release] + build_type: [x64-Release] arch: [amd64] steps: From eea8ceb23972f5dc043d95d22e6b93f9187a1ef6 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 2 Oct 2024 22:05:19 -0700 Subject: [PATCH 03/14] Remove env var --- .github/workflows/bvt.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/bvt.yml b/.github/workflows/bvt.yml index 4aa12d04..66a1edc4 100644 --- a/.github/workflows/bvt.yml +++ b/.github/workflows/bvt.yml @@ -21,9 +21,6 @@ on: - build/*.targets - build/*.yml -env: - DIRECTXTEX_MEDIA_PATH: ${{ github.workspace }}/Media - permissions: contents: read From e823218e51fe825301432b0743b5ef98e548ce9a Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 2 Oct 2024 22:43:53 -0700 Subject: [PATCH 04/14] Keep asserts in fuzzing release builds --- CMakeLists.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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() From 75e99b6d75364faef16f2667ebd45d3011c19b60 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 4 Oct 2024 12:31:11 -0700 Subject: [PATCH 05/14] Use VCPKG 2403.08.23 release --- .github/workflows/bvt.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/vcpkg.yml | 2 +- .github/workflows/wsl.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bvt.yml b/.github/workflows/bvt.yml index 66a1edc4..644e6462 100644 --- a/.github/workflows/bvt.yml +++ b/.github/workflows/bvt.yml @@ -85,7 +85,7 @@ jobs: with: runVcpkgInstall: true vcpkgJsonGlob: '**/build/vcpkg.json' - vcpkgGitCommitId: '7516a02de04e8f8ff4e4beb8f5bac0565f9bf9da' + vcpkgGitCommitId: '3508985146f1b1d248c67ead13f8f54be5b4f5da' - name: 'Configure CMake' working-directory: ${{ github.workspace }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b3ae3bf..eefe4ecd 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: '3508985146f1b1d248c67ead13f8f54be5b4f5da' - name: 'Configure CMake' working-directory: ${{ github.workspace }} diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index e6a09573..ab98bb32 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: '3508985146f1b1d248c67ead13f8f54be5b4f5da' - name: 'Configure CMake' working-directory: ${{ github.workspace }} diff --git a/.github/workflows/wsl.yml b/.github/workflows/wsl.yml index 705911c6..984d3575 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: '3508985146f1b1d248c67ead13f8f54be5b4f5da' - name: 'Configure CMake' working-directory: ${{ github.workspace }} From 2b394d15527525960977b75e9bc0ed56e1ea5660 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 4 Oct 2024 13:53:11 -0700 Subject: [PATCH 06/14] Use repo variable --- .github/workflows/bvt.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/vcpkg.yml | 2 +- .github/workflows/wsl.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bvt.yml b/.github/workflows/bvt.yml index 644e6462..bcf21344 100644 --- a/.github/workflows/bvt.yml +++ b/.github/workflows/bvt.yml @@ -85,7 +85,7 @@ jobs: with: runVcpkgInstall: true vcpkgJsonGlob: '**/build/vcpkg.json' - vcpkgGitCommitId: '3508985146f1b1d248c67ead13f8f54be5b4f5da' + vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}' - name: 'Configure CMake' working-directory: ${{ github.workspace }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eefe4ecd..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: '3508985146f1b1d248c67ead13f8f54be5b4f5da' + 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 ab98bb32..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: '3508985146f1b1d248c67ead13f8f54be5b4f5da' + 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 984d3575..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: '3508985146f1b1d248c67ead13f8f54be5b4f5da' + vcpkgGitCommitId: '${{ vars.VCPKG_COMMIT_ID }}' - name: 'Configure CMake' working-directory: ${{ github.workspace }} From ecdfe9bbdd14410ceabf405388c1ef4838e8afcb Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 4 Oct 2024 14:30:29 -0700 Subject: [PATCH 07/14] Update ADO to use VCPKG 2024.09.30 release --- build/DirectXTex-GitHub-CMake-Dev17.yml | 3 +-- build/DirectXTex-GitHub-CMake.yml | 3 +-- build/DirectXTex-GitHub-MinGW.yml | 5 ++--- build/DirectXTex-GitHub-WSL-11.yml | 2 +- build/DirectXTex-GitHub-WSL.yml | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index 2eff1c65..f5729ad6 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -219,10 +219,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 diff --git a/build/DirectXTex-GitHub-CMake.yml b/build/DirectXTex-GitHub-CMake.yml index 5784b022..8acb0513 100644 --- a/build/DirectXTex-GitHub-CMake.yml +++ b/build/DirectXTex-GitHub-CMake.yml @@ -219,10 +219,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 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-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 From c8cbd19d4646549c5d4813e7317ce931d8683b62 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 4 Oct 2024 14:42:23 -0700 Subject: [PATCH 08/14] Rework ADO --- build/DirectXTex-GitHub-CMake-Dev17.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index f5729ad6..217b0489 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -50,13 +50,17 @@ resources: - repository: self type: git ref: refs/heads/main + - repository: Microsoft/vcpkg + name: vcpkg + type: github + ref: refs/tags/$(VCPKG_TAG) + path: $(Build.SourcesDirectory)/vcpkg name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) variables: Codeql.Enabled: false VCPKG_CMAKE_DIR: '$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake' - GITHUB_PAT: $(GITHUBPUBLICTOKEN) VS_GENERATOR: 'Visual Studio 17 2022' WIN10_SDK: '10.0.19041.0' WIN11_SDK: '10.0.22000.0' @@ -218,16 +222,16 @@ jobs: - checkout: self clean: true fetchTags: false - - task: CmdLine@2 + - checkout: vcpkg displayName: Fetch VCPKG - inputs: - script: git clone --quiet --no-tags --depth=1 --branch $(VCPKG_TAG) https://%GITHUB_PAT%@github.com/microsoft/vcpkg.git - workingDirectory: $(Build.SourcesDirectory) + clean: true + fetchTags: false + fetchDepth: 1 - task: CmdLine@2 displayName: VCPKG Bootstrap inputs: script: call bootstrap-vcpkg.bat - workingDirectory: $(Build.SourcesDirectory)\vcpkg + workingDirectory: $(Build.SourcesDirectory)/vcpkg - task: CmdLine@2 displayName: VCPKG install headers inputs: @@ -249,7 +253,7 @@ jobs: @echo --- ERROR: VCPKG FAILED --- exit /b 1 - workingDirectory: $(Build.SourcesDirectory)\vcpkg + workingDirectory: $(Build.SourcesDirectory)/vcpkg - task: CMake@1 displayName: 'CMake (MSVC): Config x64' From 361380e4e924c2a7d0e68d5462e4debc6e098a67 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 4 Oct 2024 14:44:51 -0700 Subject: [PATCH 09/14] YAML --- build/DirectXTex-GitHub-CMake-Dev17.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index 217b0489..61a69548 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -53,6 +53,7 @@ resources: - repository: Microsoft/vcpkg name: vcpkg type: github + endpoint: microsoft ref: refs/tags/$(VCPKG_TAG) path: $(Build.SourcesDirectory)/vcpkg From e5e3a6b65c56d2cf4dae506f7e176e86477f2e40 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 4 Oct 2024 14:47:17 -0700 Subject: [PATCH 10/14] YAML --- build/DirectXTex-GitHub-CMake-Dev17.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index 61a69548..b347d7d6 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -50,12 +50,11 @@ resources: - repository: self type: git ref: refs/heads/main - - repository: Microsoft/vcpkg - name: vcpkg + - repository: vcpkg + name: Microsoft/vcpkg type: github endpoint: microsoft ref: refs/tags/$(VCPKG_TAG) - path: $(Build.SourcesDirectory)/vcpkg name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) @@ -228,6 +227,7 @@ jobs: clean: true fetchTags: false fetchDepth: 1 + path: $(Build.SourcesDirectory)/vcpkg - task: CmdLine@2 displayName: VCPKG Bootstrap inputs: From cde682cfe2349fb10406e9104f3a92d8e82fe623 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 00:12:09 -0700 Subject: [PATCH 11/14] YAML work --- build/DirectXTex-GitHub-CMake-Dev17.yml | 56 +++++++++++-------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index b347d7d6..89504c90 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -50,7 +50,7 @@ resources: - repository: self type: git ref: refs/heads/main - - repository: vcpkg + - repository: vcpkgRepo name: Microsoft/vcpkg type: github endpoint: microsoft @@ -60,7 +60,9 @@ name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) variables: Codeql.Enabled: false - VCPKG_CMAKE_DIR: '$(VCPKG_ROOT)/scripts/buildsystems/vcpkg.cmake' + 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' @@ -222,45 +224,31 @@ jobs: - checkout: self clean: true fetchTags: false - - checkout: vcpkg + fetchDepth: 1 + path: 's' + - checkout: vcpkgRepo displayName: Fetch VCPKG clean: true fetchTags: false fetchDepth: 1 - path: $(Build.SourcesDirectory)/vcpkg + 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) + 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)' + 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: @@ -270,7 +258,9 @@ jobs: 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)' + 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)" - task: CMake@1 displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR' inputs: @@ -280,7 +270,9 @@ jobs: 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)' + 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: @@ -290,7 +282,9 @@ jobs: 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)' + 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: From daaa3576e6beff89a32b2922e279a0ee51ea7e54 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 00:13:42 -0700 Subject: [PATCH 12/14] Syntax fix --- build/DirectXTex-GitHub-CMake-Dev17.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index 89504c90..c5b4e6fd 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -62,7 +62,7 @@ variables: Codeql.Enabled: false VCPKG_ROOT: $(Build.SourcesDirectory)/vcpkg VCPKG_CMAKE_DIR: $(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake - VCPKG_MANIFEST_DIR: '$(Build.SourcesDirectory)/build + VCPKG_MANIFEST_DIR: $(Build.SourcesDirectory)/build VS_GENERATOR: 'Visual Studio 17 2022' WIN10_SDK: '10.0.19041.0' WIN11_SDK: '10.0.22000.0' From 0cdca7842cae212a3b567c3544fb8b706293e348 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 00:31:41 -0700 Subject: [PATCH 13/14] More YAML rework --- build/DirectXTex-GitHub-CMake-Dev17.yml | 106 ++++++++-------- build/DirectXTex-GitHub-CMake.yml | 159 ++++++++++++------------ build/DirectXTex-GitHub-Test-Dev17.yml | 63 ++++------ build/DirectXTex-GitHub-Test.yml | 25 ++-- 4 files changed, 170 insertions(+), 183 deletions(-) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index c5b4e6fd..30a5f9c2 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -80,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 @@ -240,53 +240,53 @@ jobs: - task: CmdLine@2 displayName: VCPKG install packages inputs: - script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) + 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)' + cwd: $(Build.SourcesDirectory) cmakeArgs: > - '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) + -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)' + 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)" + -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)' + cwd: $(Build.SourcesDirectory) cmakeArgs: > - '-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + -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)' + cwd: $(Build.SourcesDirectory) cmakeArgs: > - '-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + -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 8acb0513..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,76 +224,69 @@ jobs: - checkout: self clean: true fetchTags: false - - task: CmdLine@2 + fetchDepth: 1 + path: 's' + - checkout: vcpkgRepo displayName: Fetch VCPKG - inputs: - script: git clone --quiet --no-tags --depth=1 --branch $(VCPKG_TAG) 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-Test-Dev17.yml b/build/DirectXTex-GitHub-Test-Dev17.yml index 5977ec7e..365c2264 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/tags/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..88183613 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/tags/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 From b1a9bb7adbe0dc4c4d31a162b0270cadbd0df4a8 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 00:35:10 -0700 Subject: [PATCH 14/14] More YAML --- build/DirectXTex-GitHub-Test-Dev17.yml | 2 +- build/DirectXTex-GitHub-Test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/DirectXTex-GitHub-Test-Dev17.yml b/build/DirectXTex-GitHub-Test-Dev17.yml index 365c2264..6ed8bcc9 100644 --- a/build/DirectXTex-GitHub-Test-Dev17.yml +++ b/build/DirectXTex-GitHub-Test-Dev17.yml @@ -32,7 +32,7 @@ resources: name: walbourn/directxtextest type: github endpoint: microsoft - ref: refs/tags/main + ref: refs/heads/main name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) diff --git a/build/DirectXTex-GitHub-Test.yml b/build/DirectXTex-GitHub-Test.yml index 88183613..347ae320 100644 --- a/build/DirectXTex-GitHub-Test.yml +++ b/build/DirectXTex-GitHub-Test.yml @@ -31,7 +31,7 @@ resources: name: walbourn/directxtextest type: github endpoint: microsoft - ref: refs/tags/main + ref: refs/heads/main name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)