diff --git a/CMakeLists.txt b/CMakeLists.txt index ea23fab..90ca3e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/.nuget/${PROJECT_NAME}-config.cmake.in +configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/build/${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}) diff --git a/build/DirectXMath-GitHub-CMake-Dev17.yml b/build/DirectXMath-GitHub-CMake-Dev17.yml new file mode 100644 index 0000000..97f283b --- /dev/null +++ b/build/DirectXMath-GitHub-CMake-Dev17.yml @@ -0,0 +1,121 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +# Builds the library and test suite using CMake. + +schedules: +- cron: "0 0 * * *" + displayName: 'Nightly build' + branches: + include: + - main + +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + trigger: none + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +variables: + VS_GENERATOR: 'Visual Studio 17 2022' + WIN10_SDK: '10.0.19041.0' + WIN11_SDK: '10.0.22000.0' + +pool: + vmImage: windows-2022 + +variables: + GITHUB_PAT: $(GITHUBPUBLICTOKEN) + +jobs: +- job: CMAKE_BUILD + displayName: CMake using VS Generator BUILD_TESTING=ON + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + clean: true + fetchTags: false + - task: CmdLine@2 + displayName: Fetch Tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + - task: CMake@1 + displayName: 'CMake (MSVC): Config x64' + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: 'CMake (MSVC): Build x64 Debug' + inputs: + cwd: '' + cmakeArgs: --build out -v --config Debug + - task: CMake@1 + displayName: 'CMake (MSVC): Build x64 Release' + inputs: + cwd: '' + cmakeArgs: --build out -v --config RelWithDebInfo + - task: CMake@1 + displayName: 'CMake (MSVC): Config x86' + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A Win32 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: 'CMake (MSVC): Build x86 Debug' + inputs: + cwd: '' + cmakeArgs: --build out2 -v --config Debug + - task: CMake@1 + displayName: 'CMake (MSVC): Build x86 Release' + inputs: + cwd: '' + cmakeArgs: --build out2 -v --config RelWithDebInfo + - task: CMake@1 + displayName: 'CMake (MSVC): Config ARM64' + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out3 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: 'CMake (MSVC): Build ARM64 Debug' + inputs: + cwd: '' + cmakeArgs: --build out3 -v --config Debug + - task: CMake@1 + displayName: 'CMake (MSVC): Build ARM64 Release' + inputs: + cwd: '' + cmakeArgs: --build out3 -v --config RelWithDebInfo + - task: CMake@1 + displayName: 'CMake (ClangCl): Config x64' + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out4 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: 'CMake (ClangCl): Build x64 Debug' + inputs: + cwd: '' + cmakeArgs: --build out4 -v --config Debug + - task: CMake@1 + displayName: 'CMake (ClangCl): Build x64 Release' + inputs: + cwd: '' + cmakeArgs: --build out4 -v --config RelWithDebInfo + - task: CMake@1 + displayName: 'CMake (ClangCl): Config ARM64' + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out5 -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)' + - task: CMake@1 + displayName: 'CMake (ClangCl): Build ARM64 Debug' + inputs: + cwd: '' + cmakeArgs: --build out5 -v --config ARM64 Debug + - task: CMake@1 + displayName: 'CMake (ClangCl): Build ARM64 Release' + inputs: + cwd: '' + cmakeArgs: --build out5 -v --config RelWithDebInfo diff --git a/build/DirectXMath-GitHub-CMake.yml b/build/DirectXMath-GitHub-CMake.yml new file mode 100644 index 0000000..422518d --- /dev/null +++ b/build/DirectXMath-GitHub-CMake.yml @@ -0,0 +1,105 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +# Builds the library and test suite using CMake. + +schedules: +- cron: "0 0 * * *" + displayName: 'Nightly build' + branches: + include: + - main + +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + trigger: none + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +variables: + VS_GENERATOR: 'Visual Studio 16 2019' + WIN10_SDK: '10.0.19041.0' + +pool: + vmImage: windows-2019 + +variables: + GITHUB_PAT: $(GITHUBPUBLICTOKEN) + +jobs: +- job: CMAKE_BUILD + displayName: CMake using VS Generator + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + clean: true + fetchTags: false + - task: CmdLine@2 + displayName: Fetch Tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + - task: CMake@1 + displayName: CMake (MSVC x64) + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: CMake (Build x64) + inputs: + cwd: '' + cmakeArgs: --build out -v + - task: CMake@1 + displayName: CMake Test (MSVC x64) + inputs: + cwd: Tests + cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: CMake Test (Build x64) + inputs: + cwd: Tests + cmakeArgs: --build out -v + - task: CMake@1 + displayName: CMake (MSVC ARM64) + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: CMake (Build ARM64) + inputs: + cwd: '' + cmakeArgs: --build out2 -v + - task: CMake@1 + displayName: CMake Test (MSVC ARM64) + inputs: + cwd: Tests + cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: CMake Test (Build ARM64) + inputs: + cwd: Tests + cmakeArgs: --build out2 -v + - task: CMake@1 + displayName: CMake (ClangCl) + inputs: + cwd: '' + cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out3 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: CMake (Build) + inputs: + cwd: '' + cmakeArgs: --build out3 -v + - task: CMake@1 + displayName: CMake Test (ClangCL) + inputs: + cwd: Tests + cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out3 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)' + - task: CMake@1 + displayName: CMake Test (Build) + inputs: + cwd: Tests + cmakeArgs: --build out3 -v diff --git a/build/DirectXMath-GitHub-Dev17.yml b/build/DirectXMath-GitHub-Dev17.yml new file mode 100644 index 0000000..2c11bfc --- /dev/null +++ b/build/DirectXMath-GitHub-Dev17.yml @@ -0,0 +1,289 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +# Builds the math3 test suite for DirectXMath. + +schedules: +- cron: "0 0 * * *" + displayName: 'Nightly build' + branches: + include: + - main + +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + trigger: + - main + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +pool: + vmImage: windows-2022 + +variables: + GITHUB_PAT: $(GITHUBPUBLICTOKEN) + +jobs: +- job: BUILD_DEV17 + displayName: 'Visual Studio 2022 (v143)' + cancelTimeoutInMinutes: 1 + steps: + - 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 + displayName: Fetch Tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86dbg + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86rel + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64dbg + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64rel + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln arm64dbg + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: ARM64 + configuration: Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln arm64rel + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: ARM64 + configuration: Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86dbg sse3 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: SSE3 Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86rel sse3 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: SSE3 Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64dbg sse3 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: SSE3 Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64rel sse3 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: SSE3 Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86dbg sse4 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: SSE4 Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86rel sse4 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: SSE4 Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64dbg sse4 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: SSE4 Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64rel sse4 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: SSE4 Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86dbg avx + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: AVX Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86rel avx + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: AVX Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64dbg avx + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: AVX Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64rel avx + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: AVX Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86dbg avx2 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: AVX2 Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86rel avx2 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: AVX2 Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64dbg avx2 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: AVX2 Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64rel avx2 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: AVX2 Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86dbg nointrinsics + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: NI Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86rel nointrinsics + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: NI Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64dbg nointrinsics + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: NI Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x64rel nointrinsics + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x64 + configuration: NI Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln arm64dbg nointrinsics + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: ARM64 + configuration: NI Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln arm86rel nointrinsics + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: ARM64 + configuration: NI Release + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86dbg x87 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: x87 Debug + msbuildArchitecture: x64 + - task: VSBuild@1 + displayName: Build solution math3_2022.sln x86rel x87 + inputs: + solution: Tests/math3/math3_2022.sln + vsVersion: 17.0 + platform: x86 + configuration: x87 Release + msbuildArchitecture: x64 diff --git a/build/DirectXMath-GitHub-MinGW.yml b/build/DirectXMath-GitHub-MinGW.yml new file mode 100644 index 0000000..309e8d7 --- /dev/null +++ b/build/DirectXMath-GitHub-MinGW.yml @@ -0,0 +1,170 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +# Builds the library and test suite using the MinGW compiler. + +schedules: +- cron: "0 0 * * *" + displayName: 'Nightly build' + branches: + include: + - main + +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + trigger: none + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +pool: + vmImage: windows-2022 + +variables: + GITHUB_PAT: $(GITHUBPUBLICTOKEN) + 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' + URL_MINGW64: https://github.com/brechtsanders/winlibs_mingw/releases/download/12.2.0-14.0.6-10.0.0-ucrt-r2/winlibs-x86_64-posix-seh-gcc-12.2.0-llvm-14.0.6-mingw-w64ucrt-10.0.0-r2.zip + HASH_MINGW64: '6694e552d73195b57f283645ab78cb0180f4d957b5501a83e6b4f2679dfad13a8e85e1df6f7b061ea4431fbd2bb0c8f2ac3a1dd810489c1a8d1665b226df8092' + +jobs: +- job: MINGW32_BUILD + displayName: 'Minimalist GNU for Windows (MinGW32)' + steps: + - checkout: self + clean: true + fetchTags: false + - task: CmdLine@2 + displayName: Fetch Tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + workingDirectory: $(Build.SourcesDirectory) + - task: PowerShell@2 + # We install GCC 12.2 as the MS Hosted only offers 11.2 + displayName: Install MinGW32 + inputs: + targetType: inline + script: | + $ProgressPreference = 'SilentlyContinue' + Write-Host "Downloading winlibs..." + Invoke-WebRequest -Uri "$(URL_MINGW32)" -OutFile "gw32.zip" + Write-Host "Downloaded." + $fileHash = Get-FileHash -Algorithm SHA512 gw32.zip | ForEach { $_.Hash} | Out-String + $filehash = $fileHash.Trim() + Write-Host "##[debug]SHA512: " $fileHash + if ($fileHash -ne '$(HASH_MINGW32)') { + Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop + } + Write-Host "Extracting winlibs..." + Expand-Archive -LiteralPath 'gw32.zip' + Write-Host "Extracted." + Write-Host "Added to path: $env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" + Write-Host "##vso[task.prependpath]$env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" + + workingDirectory: $(Build.SourcesDirectory) + - task: CmdLine@2 + displayName: GCC version + inputs: + script: g++ --version + - task: CMake@1 + displayName: CMake (MinGW32) Dbg + inputs: + cwd: Tests + cmakeArgs: -B out -DCMAKE_BUILD_TYPE="Debug" -DDXMATH_ARCHITECTURE=x86 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + - task: CMake@1 + displayName: CMake (MinGW32) Build Dbg + inputs: + cwd: Tests + cmakeArgs: --build out + - task: CMake@1 + displayName: CMake (MinGW32) Rel + inputs: + cwd: Tests + cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DDXMATH_ARCHITECTURE=x86 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + - task: CMake@1 + displayName: CMake (MinGW32) Build Rel + inputs: + cwd: Tests + cmakeArgs: --build out2 + - task: CMake@1 + displayName: CMake (MinGW32) Dbg NI + inputs: + cwd: Tests + cmakeArgs: -B out3 -DCMAKE_BUILD_TYPE="Debug" -DBUILD_NO_INTRINSICS=ON -DDXMATH_ARCHITECTURE=x86 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + - task: CMake@1 + displayName: CMake (MinGW32) Build Dbg NI + inputs: + cwd: Tests + cmakeArgs: --build out3 + +- job: MINGW64_BUILD + displayName: 'Minimalist GNU for Windows (MinGW-W64) BUILD_TESTING=ON' + steps: + - checkout: self + clean: true + fetchTags: false + - task: CmdLine@2 + displayName: Fetch Tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + workingDirectory: $(Build.SourcesDirectory) + - task: PowerShell@2 + displayName: Install MinGW-W64 + inputs: + targetType: inline + script: | + $ProgressPreference = 'SilentlyContinue' + Write-Host "Downloading winlibs..." + Invoke-WebRequest -Uri "$(URL_MINGW64)" -OutFile "gw64.zip" + Write-Host "Downloaded." + $fileHash = Get-FileHash -Algorithm SHA512 gw64.zip | ForEach { $_.Hash} | Out-String + $filehash = $fileHash.Trim() + Write-Host "##[debug]SHA512: " $fileHash + if ($fileHash -ne '$(HASH_MINGW64)') { + Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop + } + Write-Host "Extracting winlibs..." + Expand-Archive -LiteralPath 'gw64.zip' + Write-Host "Extracted." + Write-Host "Added to path: $env:BUILD_SOURCESDIRECTORY\gw64\mingw64\bin" + Write-Host "##vso[task.prependpath]$env:BUILD_SOURCESDIRECTORY\gw64\mingw64\bin" + + workingDirectory: $(Build.SourcesDirectory) + - task: CmdLine@2 + displayName: GCC version + inputs: + script: g++ --version + - task: CMake@1 + displayName: CMake (MinGW-W64) Dbg + inputs: + cwd: Tests + cmakeArgs: -B out -DCMAKE_BUILD_TYPE="Debug" -DDXMATH_ARCHITECTURE=x64 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + - task: CMake@1 + displayName: CMake (MinGW-W64) Build Dbg + inputs: + cwd: Tests + cmakeArgs: --build out + - task: CMake@1 + displayName: CMake (MinGW-W64) Rel + inputs: + cwd: Tests + cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DDXMATH_ARCHITECTURE=x64 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + - task: CMake@1 + displayName: CMake (MinGW-W64) Build Rel + inputs: + cwd: Tests + cmakeArgs: --build out2 + - task: CMake@1 + displayName: CMake (MinGW-W64) Dbg NI + inputs: + cwd: Tests + cmakeArgs: -B out3 -DCMAKE_BUILD_TYPE="Debug" -DBUILD_NO_INTRINSICS=ON -DDXMATH_ARCHITECTURE=x64 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" + - task: CMake@1 + displayName: CMake (MinGW-W64) Build Dbg NI + inputs: + cwd: Tests + cmakeArgs: --build out3 diff --git a/build/DirectXMath-GitHub-WSL-11.yml b/build/DirectXMath-GitHub-WSL-11.yml new file mode 100644 index 0000000..199c8e3 --- /dev/null +++ b/build/DirectXMath-GitHub-WSL-11.yml @@ -0,0 +1,64 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +# Builds the math3 test suite for Windows Subsystem for Linux (WSL) + +schedules: +- cron: "0 3 * * *" + displayName: 'Nightly build' + branches: + include: + - main + +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + trigger: none + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +pool: + vmImage: ubuntu-22.04 + +variables: + GITHUB_PAT: $(GITHUBPUBLICTOKEN) + +jobs: +- job: BUILD_WSL + displayName: 'Windows Subsystem for Linux (WSL)' + steps: + - checkout: self + clean: true + fetchTags: false + - task: CmdLine@2 + displayName: Fetch tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + - task: CMake@1 + displayName: DirectXMath Tests + inputs: + cwd: Tests + cmakeArgs: . + - task: PowerShell@2 + displayName: Fetch SAL.H + inputs: + targetType: inline + script: | + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -o $(DEST_DIR)usr/local/include/sal.h + $fileHash = Get-FileHash -Algorithm SHA512 $(DEST_DIR)usr/local/include/sal.h | ForEach { $_.Hash} | Out-String + $filehash = $fileHash.Trim() + Write-Host "##[debug]SHA512: " $filehash + if ($fileHash -ne "1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0") { + Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop + } + + - task: CMake@1 + displayName: DirectXMath Tests Build + inputs: + cwd: Tests + cmakeArgs: --build . -v diff --git a/build/DirectXMath-GitHub-WSL.yml b/build/DirectXMath-GitHub-WSL.yml new file mode 100644 index 0000000..eb1c443 --- /dev/null +++ b/build/DirectXMath-GitHub-WSL.yml @@ -0,0 +1,64 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +# Builds the math3 test suite for Windows Subsystem for Linux (WSL) + +schedules: +- cron: "0 3 * * *" + displayName: 'Nightly build' + branches: + include: + - main + +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + trigger: none + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +pool: + vmImage: ubuntu-20.04 + +variables: + GITHUB_PAT: $(GITHUBPUBLICTOKEN) + +jobs: +- job: BUILD_WSL + displayName: 'Windows Subsystem for Linux (WSL)' + steps: + - checkout: self + clean: true + fetchTags: false + - task: CmdLine@2 + displayName: Fetch tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + - task: CMake@1 + displayName: DirectXMath Tests + inputs: + cwd: Tests + cmakeArgs: . + - task: PowerShell@2 + displayName: Fetch SAL.H + inputs: + targetType: inline + script: | + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -o $(DEST_DIR)usr/local/include/sal.h + $fileHash = Get-FileHash -Algorithm SHA512 $(DEST_DIR)usr/local/include/sal.h | ForEach { $_.Hash} | Out-String + $filehash = $fileHash.Trim() + Write-Host "##[debug]SHA512: " $filehash + if ($fileHash -ne "1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0") { + Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop + } + + - task: CMake@1 + displayName: DirectXMath Tests Build + inputs: + cwd: Tests + cmakeArgs: --build . -v diff --git a/build/DirectXMath-GitHub.yml b/build/DirectXMath-GitHub.yml new file mode 100644 index 0000000..6616a58 --- /dev/null +++ b/build/DirectXMath-GitHub.yml @@ -0,0 +1,536 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkID=615560 + +# Builds the math3 test suite for DirectXMath. + +schedules: +- cron: "0 0 * * *" + displayName: 'Nightly build' + branches: + include: + - main + +resources: + repositories: + - repository: self + type: git + ref: refs/heads/main + trigger: + - main + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) + +pool: + vmImage: windows-2019 + +variables: + GITHUB_PAT: $(GITHUBPUBLICTOKEN) + +jobs: +- job: BUILD_DEV16 + displayName: 'Visual Studio 2019 (v142)' + cancelTimeoutInMinutes: 1 + steps: + - 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 + displayName: Fetch Tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86dbg + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86rel + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64dbg + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64rel + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln arm64dbg + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln arm64rel + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86dbg sse3 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE3 Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86rel sse3 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE3 Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64dbg sse3 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE3 Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64rel sse3 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE3 Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86dbg sse4 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE4 Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86rel sse4 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE4 Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64dbg sse4 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE4 Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64rel sse4 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE4 Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86dbg avx + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86rel avx + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64dbg avx + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64rel avx + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86dbg avx2 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX2 Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86rel avx2 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX2 Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64dbg avx2 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX2 Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64rel avx2 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX2 Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86dbg nointrinsics + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: NI Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86rel nointrinsics + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: NI Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64dbg nointrinsics + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: NI Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x64rel nointrinsics + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: NI Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln arm64dbg nointrinsics + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: NI Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln arm86rel nointrinsics + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: NI Release + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86dbg x87 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: x87 Debug + - task: VSBuild@1 + displayName: Build solution math3_2019.sln x86rel x87 + inputs: + solution: Tests/math3/math3_2019.sln + vsVersion: 16.0 + platform: x86 + configuration: x87 Release + - task: VSBuild@1 + displayName: Build solution shmath_2019.sln x64dbg + inputs: + solution: Tests/shmath/shmath_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution shmath_2019.sln x64rel + inputs: + solution: Tests/shmath/shmath_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: Release + - task: VSBuild@1 + displayName: Build solution shmath_2019.sln arm64dbg + inputs: + solution: Tests/shmath/shmath_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution shmath_2019.sln arm64rel + inputs: + solution: Tests/shmath/shmath_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: Release + - task: VSBuild@1 + displayName: Build solution XDSPTest_2019 x64dbg + inputs: + solution: Tests/xdsp/XDSPTest_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution XDSPTest_2019 x64rel + inputs: + solution: Tests/xdsp/XDSPTest_2019.sln + vsVersion: 16.0 + platform: x64 + configuration: Release + - task: VSBuild@1 + displayName: Build solution XDSPTest_2019 arm64dbg + inputs: + solution: Tests/xdsp/XDSPTest_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution XDSPTest_2019 arm64rel + inputs: + solution: Tests/xdsp/XDSPTest_2019.sln + vsVersion: 16.0 + platform: ARM64 + configuration: Release + +- job: BUILD_DEV15 + displayName: 'Visual Studio 2019 (v141)' + steps: + - checkout: self + clean: true + fetchTags: false + - task: CmdLine@2 + displayName: Fetch Tests + inputs: + script: git clone --quiet https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86dbg + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86rel + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64dbg + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64rel + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86dbg sse3 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE3 Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86rel sse3 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE3 Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64dbg sse3 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE3 Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64rel sse3 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE3 Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86dbg sse4 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE4 Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86rel sse4 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: SSE4 Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64dbg sse4 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE4 Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64rel sse4 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: SSE4 Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86dbg avx + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86rel avx + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64dbg avx + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64rel avx + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86dbg avx2 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX2 Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86rel avx2 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: AVX2 Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64dbg avx2 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX2 Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64rel avx2 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: AVX2 Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86dbg nointrinsics + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: NI Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86rel nointrinsics + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: NI Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64dbg nointrinsics + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: NI Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x64rel nointrinsics + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: NI Release + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86dbg x87 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: x87 Debug + - task: VSBuild@1 + displayName: Build solution math3_2017.sln x86rel x87 + inputs: + solution: Tests/math3/math3_2017.sln + vsVersion: 16.0 + platform: x86 + configuration: x87 Release + - task: VSBuild@1 + displayName: Build solution shmath_2017.sln x64dbg + inputs: + solution: Tests/shmath/shmath_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution shmath_2017.sln x64rel + inputs: + solution: Tests/shmath/shmath_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: Release + - task: VSBuild@1 + displayName: Build solution XDSPTest_2017 x64dbg + inputs: + solution: Tests/xdsp/XDSPTest_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: Debug + - task: VSBuild@1 + displayName: Build solution XDSPTest_2017 x64rel + inputs: + solution: Tests/xdsp/XDSPTest_2017.sln + vsVersion: 16.0 + platform: x64 + configuration: Release diff --git a/.nuget/DirectXMath-config.cmake.in b/build/DirectXMath-config.cmake.in similarity index 100% rename from .nuget/DirectXMath-config.cmake.in rename to build/DirectXMath-config.cmake.in