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: