From a1708b3919f9ed5df2607dea99207ee41c89bcff Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 2 Oct 2024 21:57:50 -0700 Subject: [PATCH 01/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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/26] 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) From 44161b0eab320b9059a847854fdd989ee01010f5 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 09:13:37 -0700 Subject: [PATCH 15/26] Cleanup remaining YAML files --- build/DirectXTex-GitHub-MinGW.yml | 165 ++++++++++++++------------ build/DirectXTex-GitHub-WSL-11.yml | 107 +++++++++++------ build/DirectXTex-GitHub-WSL.yml | 108 +++++++++++------ build/DirectXTex-OneFuzz-Coverage.yml | 33 ++++-- build/DirectXTex-OneFuzz.yml | 25 ++-- 5 files changed, 264 insertions(+), 174 deletions(-) diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index 6945a6ae..85d4ed5a 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -50,6 +50,16 @@ resources: - repository: self type: git ref: refs/heads/main + - repository: vcpkgRepo + name: Microsoft/vcpkg + type: github + endpoint: microsoft + ref: refs/tags/$(VCPKG_TAG) + - repository: testRepo + name: walbourn/directxtextest + type: github + endpoint: microsoft + ref: refs/heads/main name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) @@ -58,8 +68,9 @@ pool: 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 WIN11_SDK: '10.0.22000.0' URL_MINGW32: https://github.com/brechtsanders/winlibs_mingw/releases/download/12.2.0-14.0.6-10.0.0-ucrt-r2/winlibs-i686-posix-dwarf-gcc-12.2.0-llvm-14.0.6-mingw-w64ucrt-10.0.0-r2.zip HASH_MINGW32: 'fcd1e11b896190da01c83d5b5fb0d37b7c61585e53446c2dab0009debc3915e757213882c35e35396329338de6f0222ba012e23a5af86932db45186a225d1272' @@ -72,11 +83,14 @@ 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: @@ -131,83 +145,83 @@ jobs: inputs: script: g++ --version - task: CmdLine@2 - displayName: VCPKG install headers + displayName: VCPKG install packages 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 + script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-mingw-static + workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake (MinGW32) inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out - task: CMake@1 displayName: CMake (MinGW32) w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DDIRECTX_ARCH=x86 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x86 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 - task: CMake@1 displayName: CMake (MinGW32) w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DDIRECTX_ARCH=x86 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x86 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 - task: CMake@1 displayName: CMake (MinGW32) w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DDIRECTX_ARCH=x86 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x86 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 - job: MINGW64_BUILD - displayName: 'Minimalist GNU for Windows (MinGW-W64) BUILD_TESTING=ON' + displayName: 'Minimalist GNU for Windows (MinGW-W64)' steps: - 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) - - task: CmdLine@2 + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/vcpkg' + - checkout: testRepo displayName: Fetch Tests - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxtextest.git Tests + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/Tests' - task: CmdLine@2 displayName: VCPKG Bootstrap inputs: @@ -249,64 +263,59 @@ jobs: inputs: script: g++ --version - task: CmdLine@2 - displayName: VCPKG install headers + displayName: VCPKG install packages 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 + script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-mingw-static + workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake (MinGW-W64) inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out - task: CMake@1 displayName: CMake (MinGW-W64) w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DDIRECTX_ARCH=x64 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 - task: CMake@1 displayName: CMake (MinGW-W64) w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DDIRECTX_ARCH=x64 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 - task: CMake@1 displayName: CMake (MinGW-W64) w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DDIRECTX_ARCH=x64 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 diff --git a/build/DirectXTex-GitHub-WSL-11.yml b/build/DirectXTex-GitHub-WSL-11.yml index 64717405..0df17f5d 100644 --- a/build/DirectXTex-GitHub-WSL-11.yml +++ b/build/DirectXTex-GitHub-WSL-11.yml @@ -31,6 +31,21 @@ resources: type: git ref: refs/heads/main trigger: none + - repository: dxHeadersRepo + name: Microsoft/DirectX-Headers + type: github + endpoint: microsoft + ref: refs/tags/main + - repository: dxMathRepo + name: Microsoft/DirectXMath + type: github + endpoint: microsoft + ref: refs/tags/main + - repository: vcpkgRepo + name: Microsoft/vcpkg + type: github + endpoint: microsoft + ref: refs/tags/$(VCPKG_TAG) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) @@ -39,8 +54,9 @@ pool: 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 LOCAL_PKG_DIR: '$(Agent.BuildDirectory)/install/' jobs: @@ -52,10 +68,20 @@ jobs: - checkout: self clean: true fetchTags: false - - task: CmdLine@2 - displayName: Fetch directx-headers - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectX-Headers.git directx-headers + fetchDepth: 1 + path: 's' + - checkout: dxHeadersRepo + displayName: Fetch DirectX-Headers + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/directx-headers' + - checkout: dxMathRepo + displayName: Fetch DirectX-Math + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/directxmath' - task: CMake@1 displayName: CMake DirectX-Headers inputs: @@ -71,10 +97,6 @@ jobs: inputs: cwd: directx-headers cmakeArgs: --install . - - task: CmdLine@2 - displayName: Fetch directxmath - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXMath.git directxmath - task: CMake@1 displayName: CMake DirectXMath inputs: @@ -107,22 +129,22 @@ jobs: - task: CMake@1 displayName: CMake DirectXTex (Config) dbg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake - task: CMake@1 displayName: CMake DirectXTex (Build) dbg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v - task: CMake@1 displayName: CMake DirectXTex (Config) rel inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake - task: CMake@1 displayName: CMake DirectXTex (Build) rel inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v - job: BUILD_WSL_VCPKG @@ -133,11 +155,14 @@ 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: Bash@3 displayName: VCPKG Bootstrap inputs: @@ -152,57 +177,67 @@ jobs: cmake --version - task: CmdLine@2 - displayName: VCPKG install headers + displayName: VCPKG install packages inputs: - script: $(Build.SourcesDirectory)/vcpkg/vcpkg install directxmath directx-headers openexr libpng zlib libjpeg-turbo - workingDirectory: $(Build.SourcesDirectory)/vcpkg + script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake DirectXTex (Config) dbg inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out -DCMAKE_BUILD_TYPE=Debug -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) dbg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v - task: CMake@1 displayName: CMake DirectXTex (Config) rel inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) rel inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v - task: CMake@1 displayName: CMake DirectXTex (Config) w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v - task: CMake@1 displayName: CMake DirectXTex (Config) w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v - task: CMake@1 displayName: CMake DirectXTex (Config) w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out5 -v diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 48ede4aa..168db71c 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -50,6 +50,22 @@ resources: - repository: self type: git ref: refs/heads/main + trigger: none + - repository: dxHeadersRepo + name: Microsoft/DirectX-Headers + type: github + endpoint: microsoft + ref: refs/tags/main + - repository: dxMathRepo + name: Microsoft/DirectXMath + type: github + endpoint: microsoft + ref: refs/tags/main + - repository: vcpkgRepo + name: Microsoft/vcpkg + type: github + endpoint: microsoft + ref: refs/tags/$(VCPKG_TAG) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) @@ -58,8 +74,9 @@ pool: 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 LOCAL_PKG_DIR: '$(Agent.BuildDirectory)/install/' jobs: @@ -71,10 +88,20 @@ jobs: - checkout: self clean: true fetchTags: false - - task: CmdLine@2 - displayName: Fetch directx-headers - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectX-Headers.git directx-headers + fetchDepth: 1 + path: 's' + - checkout: dxHeadersRepo + displayName: Fetch DirectX-Headers + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/directx-headers' + - checkout: dxMathRepo + displayName: Fetch DirectX-Math + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/directxmath' - task: CMake@1 displayName: CMake DirectX-Headers inputs: @@ -90,10 +117,6 @@ jobs: inputs: cwd: directx-headers cmakeArgs: --install . - - task: CmdLine@2 - displayName: Fetch directxmath - inputs: - script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/microsoft/DirectXMath.git directxmath - task: CMake@1 displayName: CMake DirectXMath inputs: @@ -126,22 +149,22 @@ jobs: - task: CMake@1 displayName: CMake DirectXTex (Config) dbg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake - task: CMake@1 displayName: CMake DirectXTex (Build) dbg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v - task: CMake@1 displayName: CMake DirectXTex (Config) rel inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake - task: CMake@1 displayName: CMake DirectXTex (Build) rel inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v - job: BUILD_WSL_VCPKG @@ -152,11 +175,14 @@ 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: Bash@3 displayName: VCPKG Bootstrap inputs: @@ -171,57 +197,67 @@ jobs: cmake --version - task: CmdLine@2 - displayName: VCPKG install headers + displayName: VCPKG install packages inputs: - script: $(Build.SourcesDirectory)/vcpkg/vcpkg install directxmath directx-headers openexr libpng zlib libjpeg-turbo - workingDirectory: $(Build.SourcesDirectory)/vcpkg + script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake DirectXTex (Config) dbg inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out -DCMAKE_BUILD_TYPE=Debug -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) dbg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out -v - task: CMake@1 displayName: CMake DirectXTex (Config) rel inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) rel inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out2 -v - task: CMake@1 displayName: CMake DirectXTex (Config) w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) w/ OpenEXR inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out3 -v - task: CMake@1 displayName: CMake DirectXTex (Config) w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) w/ libjpeg inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v - task: CMake@1 displayName: CMake DirectXTex (Config) w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' - cmakeArgs: -B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" + cwd: $(Build.SourcesDirectory) + cmakeArgs: > + -B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux - task: CMake@1 displayName: CMake DirectXTex (Build) w/ libpng inputs: - cwd: '$(Build.SourcesDirectory)' + cwd: $(Build.SourcesDirectory) cmakeArgs: --build out5 -v diff --git a/build/DirectXTex-OneFuzz-Coverage.yml b/build/DirectXTex-OneFuzz-Coverage.yml index 730beb23..6a1f6dbe 100644 --- a/build/DirectXTex-OneFuzz-Coverage.yml +++ b/build/DirectXTex-OneFuzz-Coverage.yml @@ -8,6 +8,17 @@ pr: none trigger: none +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + - repository: testRepo + name: walbourn/directxtextest + type: github + endpoint: microsoft + ref: refs/heads/main + pool: vmImage: windows-latest @@ -48,17 +59,17 @@ jobs: workspace: clean: all steps: - - task: CmdLine@2 - displayName: 'Fetch source' - inputs: - script: | - git clone --quiet --no-tags https://%GITHUBPUBLICTOKEN%@github.com/microsoft/DirectXTex.git - cd DirectXTex - git checkout $(commit-ID) - git clone --quiet --no-tags https://%GITHUBPUBLICTOKEN%@github.com/walbourn/directxtextest.git Tests - workingDirectory: $(Build.SourcesDirectory) - failOnStderr: true - + - checkout: self + clean: true + fetchTags: false + fetchDepth: 1 + path: 's' + - checkout: vcpkgRepo + displayName: Fetch VCPKG + clean: true + fetchTags: false + fetchDepth: 1 + path: 's/vcpkg' - powershell: | Write-Host "Job ID: $(job-ID), Build Date: $(build-date), Branch: $(branch)" $SASUrl = [System.Uri]::new("$(sas-url)") diff --git a/build/DirectXTex-OneFuzz.yml b/build/DirectXTex-OneFuzz.yml index 748b1f73..b22895b0 100644 --- a/build/DirectXTex-OneFuzz.yml +++ b/build/DirectXTex-OneFuzz.yml @@ -21,6 +21,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) @@ -28,7 +33,6 @@ variables: Codeql.Enabled: false VS_GENERATOR: 'Visual Studio 17 2022' WIN11_SDK: '10.0.22000.0' - GITHUB_PAT: $(GITHUBPUBLICTOKEN) pool: vmImage: windows-2022 @@ -40,19 +44,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: CMake@1 displayName: 'CMake (MSVC): Config with ASan' inputs: From 1e70bf3f59fe00402b00c6bed689aa92a541aa62 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 09:21:13 -0700 Subject: [PATCH 16/26] Fix YAML failure --- build/DirectXTex-GitHub-WSL-11.yml | 4 ++-- build/DirectXTex-GitHub-WSL.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/DirectXTex-GitHub-WSL-11.yml b/build/DirectXTex-GitHub-WSL-11.yml index 0df17f5d..09742b63 100644 --- a/build/DirectXTex-GitHub-WSL-11.yml +++ b/build/DirectXTex-GitHub-WSL-11.yml @@ -35,12 +35,12 @@ resources: name: Microsoft/DirectX-Headers type: github endpoint: microsoft - ref: refs/tags/main + ref: refs/heads/main - repository: dxMathRepo name: Microsoft/DirectXMath type: github endpoint: microsoft - ref: refs/tags/main + ref: refs/heads/main - repository: vcpkgRepo name: Microsoft/vcpkg type: github diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 168db71c..54769a1f 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -55,12 +55,12 @@ resources: name: Microsoft/DirectX-Headers type: github endpoint: microsoft - ref: refs/tags/main + ref: refs/heads/main - repository: dxMathRepo name: Microsoft/DirectXMath type: github endpoint: microsoft - ref: refs/tags/main + ref: refs/heads/main - repository: vcpkgRepo name: Microsoft/vcpkg type: github From fd5f48e843e9ca3fc74337f366c508dbcc691bd0 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 09:41:16 -0700 Subject: [PATCH 17/26] Linux!@ --- build/DirectXTex-GitHub-WSL-11.yml | 2 +- build/DirectXTex-GitHub-WSL.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/DirectXTex-GitHub-WSL-11.yml b/build/DirectXTex-GitHub-WSL-11.yml index 09742b63..fcb34489 100644 --- a/build/DirectXTex-GitHub-WSL-11.yml +++ b/build/DirectXTex-GitHub-WSL-11.yml @@ -179,7 +179,7 @@ jobs: - task: CmdLine@2 displayName: VCPKG install packages inputs: - script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake DirectXTex (Config) dbg diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 54769a1f..7d518b4e 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -199,7 +199,7 @@ jobs: - task: CmdLine@2 displayName: VCPKG install packages inputs: - script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake DirectXTex (Config) dbg From 7732ddfb89a2233f7012820f310aa09625877a2a Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 09:53:57 -0700 Subject: [PATCH 18/26] Fix triplet --- build/DirectXTex-GitHub-WSL-11.yml | 2 +- build/DirectXTex-GitHub-WSL.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/DirectXTex-GitHub-WSL-11.yml b/build/DirectXTex-GitHub-WSL-11.yml index fcb34489..6d6abe99 100644 --- a/build/DirectXTex-GitHub-WSL-11.yml +++ b/build/DirectXTex-GitHub-WSL-11.yml @@ -179,7 +179,7 @@ jobs: - task: CmdLine@2 displayName: VCPKG install packages inputs: - script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-linux workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake DirectXTex (Config) dbg diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 7d518b4e..a771a0f4 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -199,7 +199,7 @@ jobs: - task: CmdLine@2 displayName: VCPKG install packages inputs: - script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows + script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-linux workingDirectory: $(VCPKG_ROOT) - task: CMake@1 displayName: CMake DirectXTex (Config) dbg From 9fba985085307a121343faa0f252e0e7bab87979 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 09:59:31 -0700 Subject: [PATCH 19/26] MinGW pipeline a bit slow --- build/DirectXTex-GitHub-MinGW.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index 85d4ed5a..440f0265 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -285,7 +285,7 @@ jobs: inputs: cwd: $(Build.SourcesDirectory) cmakeArgs: > - -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 + -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 @@ -298,7 +298,7 @@ jobs: inputs: cwd: $(Build.SourcesDirectory) cmakeArgs: > - -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 @@ -311,7 +311,7 @@ jobs: inputs: cwd: $(Build.SourcesDirectory) cmakeArgs: > - -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 + -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 From 1502300c139254e49d5a54554e7cac6295dfdda1 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 10:10:59 -0700 Subject: [PATCH 20/26] Update exclusions --- build/DirectXTex-GitHub-CMake-Dev17.yml | 4 ++-- build/DirectXTex-GitHub-CMake.yml | 4 ++-- build/DirectXTex-GitHub-MinGW.yml | 4 ++-- build/DirectXTex-GitHub-WSL.yml | 4 ++-- build/DirectXTex-OneFuzz-Coverage.yml | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index 30a5f9c2..d76aa967 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -23,7 +23,7 @@ trigger: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets @@ -39,7 +39,7 @@ pr: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets diff --git a/build/DirectXTex-GitHub-CMake.yml b/build/DirectXTex-GitHub-CMake.yml index 14ded4cc..eb1c9889 100644 --- a/build/DirectXTex-GitHub-CMake.yml +++ b/build/DirectXTex-GitHub-CMake.yml @@ -23,7 +23,7 @@ trigger: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets @@ -39,7 +39,7 @@ pr: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index 440f0265..215747b2 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -23,7 +23,7 @@ trigger: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets @@ -39,7 +39,7 @@ pr: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index a771a0f4..607bd597 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -23,7 +23,7 @@ trigger: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets @@ -39,7 +39,7 @@ pr: - '.github/*' - '.nuget/*' - build/*.cmd - - build/*.json + - build/OneFuzz*.json - build/*.props - build/*.ps1 - build/*.targets diff --git a/build/DirectXTex-OneFuzz-Coverage.yml b/build/DirectXTex-OneFuzz-Coverage.yml index 6a1f6dbe..2348d6e7 100644 --- a/build/DirectXTex-OneFuzz-Coverage.yml +++ b/build/DirectXTex-OneFuzz-Coverage.yml @@ -64,12 +64,12 @@ jobs: fetchTags: false fetchDepth: 1 path: 's' - - checkout: vcpkgRepo - displayName: Fetch VCPKG + - checkout: testRepo + displayName: Fetch Tests clean: true fetchTags: false fetchDepth: 1 - path: 's/vcpkg' + path: 's/Tests' - powershell: | Write-Host "Job ID: $(job-ID), Build Date: $(build-date), Branch: $(branch)" $SASUrl = [System.Uri]::new("$(sas-url)") From 8811a61f56ffc40c9d980b56c6d768e5161338bd Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 10:20:48 -0700 Subject: [PATCH 21/26] More YAML code review --- .github/workflows/bvt.yml | 2 +- .github/workflows/test.yml | 2 +- .github/workflows/vcpkg.yml | 2 +- .github/workflows/wsl.yml | 2 +- build/DirectXTex-GitHub-CMake-Dev17.yml | 2 +- build/DirectXTex-GitHub-CMake.yml | 2 +- build/DirectXTex-GitHub-MinGW.yml | 28 ++++++++++++++++--------- build/DirectXTex-GitHub-Test-Dev17.yml | 2 +- build/DirectXTex-GitHub-Test.yml | 2 +- build/DirectXTex-GitHub-WSL-11.yml | 2 +- build/DirectXTex-GitHub-WSL.yml | 2 +- build/DirectXTex-OneFuzz-Coverage.yml | 2 +- 12 files changed, 29 insertions(+), 21 deletions(-) diff --git a/.github/workflows/bvt.yml b/.github/workflows/bvt.yml index bcf21344..91e3d293 100644 --- a/.github/workflows/bvt.yml +++ b/.github/workflows/bvt.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 name: 'CTest (BVTs)' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 055f7b80..db4e2293 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 name: 'CTest (Windows)' diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index 2eb4c29b..b6e8331c 100644 --- a/.github/workflows/vcpkg.yml +++ b/.github/workflows/vcpkg.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 name: 'CMake (Windows using VCPKG)' diff --git a/.github/workflows/wsl.yml b/.github/workflows/wsl.yml index f7d01005..10bac9e0 100644 --- a/.github/workflows/wsl.yml +++ b/.github/workflows/wsl.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 name: 'CMake (WSL)' diff --git a/build/DirectXTex-GitHub-CMake-Dev17.yml b/build/DirectXTex-GitHub-CMake-Dev17.yml index d76aa967..af88055a 100644 --- a/build/DirectXTex-GitHub-CMake-Dev17.yml +++ b/build/DirectXTex-GitHub-CMake-Dev17.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). diff --git a/build/DirectXTex-GitHub-CMake.yml b/build/DirectXTex-GitHub-CMake.yml index eb1c9889..5f786a04 100644 --- a/build/DirectXTex-GitHub-CMake.yml +++ b/build/DirectXTex-GitHub-CMake.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index 215747b2..fa15a108 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library and test suite using the MinGW compiler. @@ -155,7 +155,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86 - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build @@ -168,7 +169,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x86 - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ OpenEXR @@ -181,7 +183,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x86 - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ libjpeg @@ -194,7 +197,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x86 - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ libpng @@ -203,7 +207,7 @@ jobs: cmakeArgs: --build out4 - job: MINGW64_BUILD - displayName: 'Minimalist GNU for Windows (MinGW-W64)' + displayName: 'Minimalist GNU for Windows (MinGW-W64) BUILD_TESTING=ON' steps: - checkout: self clean: true @@ -273,7 +277,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64 - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build @@ -286,7 +291,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ OpenEXR @@ -299,7 +305,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ libjpeg @@ -312,7 +319,8 @@ jobs: cwd: $(Build.SourcesDirectory) cmakeArgs: > -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF - -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ libpng diff --git a/build/DirectXTex-GitHub-Test-Dev17.yml b/build/DirectXTex-GitHub-Test-Dev17.yml index 6ed8bcc9..a2a55cf0 100644 --- a/build/DirectXTex-GitHub-Test-Dev17.yml +++ b/build/DirectXTex-GitHub-Test-Dev17.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library and test suite. diff --git a/build/DirectXTex-GitHub-Test.yml b/build/DirectXTex-GitHub-Test.yml index 347ae320..50f6f048 100644 --- a/build/DirectXTex-GitHub-Test.yml +++ b/build/DirectXTex-GitHub-Test.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library and test suite. diff --git a/build/DirectXTex-GitHub-WSL-11.yml b/build/DirectXTex-GitHub-WSL-11.yml index 6d6abe99..48db8951 100644 --- a/build/DirectXTex-GitHub-WSL-11.yml +++ b/build/DirectXTex-GitHub-WSL-11.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library for Windows Subsystem for Linux (WSL) diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 607bd597..737995fd 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library for Windows Subsystem for Linux (WSL) diff --git a/build/DirectXTex-OneFuzz-Coverage.yml b/build/DirectXTex-OneFuzz-Coverage.yml index 2348d6e7..0f353f71 100644 --- a/build/DirectXTex-OneFuzz-Coverage.yml +++ b/build/DirectXTex-OneFuzz-Coverage.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # OneFuzz code coverage pipeline From 0d161b55cf296ca50e6e4e6f83be1450b0f770bf Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 10:31:18 -0700 Subject: [PATCH 22/26] One more twaek --- build/DirectXTex-GitHub-WSL.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/build/DirectXTex-GitHub-WSL.yml b/build/DirectXTex-GitHub-WSL.yml index 737995fd..19a8a120 100644 --- a/build/DirectXTex-GitHub-WSL.yml +++ b/build/DirectXTex-GitHub-WSL.yml @@ -50,7 +50,6 @@ resources: - repository: self type: git ref: refs/heads/main - trigger: none - repository: dxHeadersRepo name: Microsoft/DirectX-Headers type: github From b8c8e346f877bf069ce18bfd5adeef3ddf5fb91d Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 10:34:29 -0700 Subject: [PATCH 23/26] Gah! --- build/DirectXTex-OneFuzz.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/DirectXTex-OneFuzz.yml b/build/DirectXTex-OneFuzz.yml index b22895b0..ff0919c0 100644 --- a/build/DirectXTex-OneFuzz.yml +++ b/build/DirectXTex-OneFuzz.yml @@ -1,7 +1,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # -# http://go.microsoft.com/fwlink/?LinkId=248926 +# https://go.microsoft.com/fwlink/?LinkId=248926 # Builds the library using CMake and submit for file fuzzing From 3e3ce5a34f89857a1a78fa9d61ce1e421308002c Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 16:22:19 -0700 Subject: [PATCH 24/26] Always run SDL even if no changes --- build/DirectXTex-SDL.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build/DirectXTex-SDL.yml b/build/DirectXTex-SDL.yml index 2a48637f..9718cafc 100644 --- a/build/DirectXTex-SDL.yml +++ b/build/DirectXTex-SDL.yml @@ -11,6 +11,7 @@ schedules: branches: include: - main + always: true # GitHub Actions handles CodeQL and PREFAST for CI/PR trigger: none From 5c1a2564000ff2df8ae3ac5d3dda5604a48badf1 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 16:52:26 -0700 Subject: [PATCH 25/26] Minor code review --- build/DirectXTex-GitHub-MinGW.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index fa15a108..199dd62d 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -121,9 +121,13 @@ jobs: Write-Host "Added to path: $env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" Write-Host "##vso[task.prependpath]$env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" $sdkroot = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' | Select-Object -ExpandProperty KitsRoot10 - $windows11sdk = "{0}bin\$(WIN11_SDK)\" -f $sdkroot - if (Test-Path "$windows11sdk") { - Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$windows11sdk" + $wsdkbin = "{0}bin\" -f $sdkroot + $wsdkverbin = "{0}bin\$(WIN11_SDK)\" -f $sdkroot + $wsdkarchbin = "{0}bin\$(WIN11_SDK)\x86" -f $sdkroot + if (Test-Path "$wsdkarchbin") { + Write-Host "##vso[task.setvariable variable=WindowsSdkBinPath;]$wsdkbin" + Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$wsdkverbin" + Write-Host "##vso[task.prependpath]$wsdkarchbin" } else { Write-Error -Message "##[error]Can't find Windows SDK ($(WIN11_SDK))" -ErrorAction Stop @@ -242,11 +246,13 @@ jobs: script: | $ProgressPreference = 'SilentlyContinue' $sdkroot = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' | Select-Object -ExpandProperty KitsRoot10 - $windows11sdk = "{0}bin\$(WIN11_SDK)\" -f $sdkroot - $windows11x64sdk = "{0}bin\$(WIN11_SDK)\x64" -f $sdkroot - if (Test-Path "$windows11sdk") { - Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$windows11sdk" - Write-Host "##vso[task.prependpath]$windows11x64sdk" + $wsdkbin = "{0}bin\" -f $sdkroot + $wsdkverbin = "{0}bin\$(WIN11_SDK)\" -f $sdkroot + $wsdkarchbin = "{0}bin\$(WIN11_SDK)\x64" -f $sdkroot + if (Test-Path "$wsdkarchbin") { + Write-Host "##vso[task.setvariable variable=WindowsSdkBinPath;]$wsdkbin" + Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$wsdkverbin" + Write-Host "##vso[task.prependpath]$wsdkarchbin" } else { Write-Error -Message "##[error]Can't find Windows SDK ($(WIN11_SDK))" -ErrorAction Stop From f8690b22ed52974af32093ae7c18dd59c8bfb8bc Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Sat, 5 Oct 2024 17:22:32 -0700 Subject: [PATCH 26/26] code review --- build/DirectXTex-GitHub-MinGW.yml | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/build/DirectXTex-GitHub-MinGW.yml b/build/DirectXTex-GitHub-MinGW.yml index 199dd62d..f95b5a44 100644 --- a/build/DirectXTex-GitHub-MinGW.yml +++ b/build/DirectXTex-GitHub-MinGW.yml @@ -134,6 +134,10 @@ jobs: } workingDirectory: $(Build.SourcesDirectory) + - task: CmdLine@2 + displayName: GCC version + inputs: + script: g++ --version - task: BatchScript@1 displayName: CompileShaders inputs: @@ -144,10 +148,6 @@ jobs: inputs: filename: DDSView/hlsl.cmd workingFolder: $(Build.SourcesDirectory)\DDSView - - task: CmdLine@2 - displayName: GCC version - inputs: - script: g++ --version - task: CmdLine@2 displayName: VCPKG install packages inputs: @@ -160,7 +160,7 @@ jobs: cmakeArgs: > -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build @@ -174,7 +174,7 @@ jobs: cmakeArgs: > -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x86 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ OpenEXR @@ -188,7 +188,7 @@ jobs: cmakeArgs: > -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x86 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ libjpeg @@ -202,7 +202,7 @@ jobs: cmakeArgs: > -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x86 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static - task: CMake@1 displayName: CMake (MinGW32) Build w/ libpng @@ -258,6 +258,10 @@ jobs: Write-Error -Message "##[error]Can't find Windows SDK ($(WIN11_SDK))" -ErrorAction Stop } + - task: CmdLine@2 + displayName: GCC version + inputs: + script: g++ --version - task: BatchScript@1 displayName: CompileShaders.cmd inputs: @@ -268,10 +272,6 @@ jobs: inputs: filename: DDSView/hlsl.cmd workingFolder: $(Build.SourcesDirectory)\DDSView - - task: CmdLine@2 - displayName: GCC version - inputs: - script: g++ --version - task: CmdLine@2 displayName: VCPKG install packages inputs: @@ -284,7 +284,7 @@ jobs: cmakeArgs: > -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build @@ -298,7 +298,7 @@ jobs: cmakeArgs: > -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ OpenEXR @@ -312,7 +312,7 @@ jobs: cmakeArgs: > -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ libjpeg @@ -326,7 +326,7 @@ jobs: cmakeArgs: > -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" - -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(Build.BinariesDirectory)\Shaders + -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static - task: CMake@1 displayName: CMake (MinGW-W64) Build w/ libpng