feat(gx): add directxmath for MinGW

This commit is contained in:
phaneron 2024-09-07 13:54:54 -04:00
parent 0d09dee4b3
commit 3e77eb935a
51 changed files with 49251 additions and 12 deletions

View file

@ -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
trigger: none
pr: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
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'
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
pool:
vmImage: windows-2022
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 --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
- task: CMake@1
displayName: 'CMake (MSVC): Config x64'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)'
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out -v --config Debug
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release'
inputs:
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_SYSTEM_VERSION=$(WIN10_SDK)'
- task: CMake@1
displayName: 'CMake (MSVC): Build x86 Debug'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out2 -v --config Debug
- task: CMake@1
displayName: 'CMake (MSVC): Build x86 Release'
inputs:
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_SYSTEM_VERSION=$(WIN10_SDK)'
- task: CMake@1
displayName: 'CMake (MSVC): Build ARM64 Debug'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out3 -v --config Debug
- task: CMake@1
displayName: 'CMake (MSVC): Build ARM64 Release'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out3 -v --config RelWithDebInfo
- task: CMake@1
displayName: 'CMake (ClangCl): Config x64'
inputs:
cwd: '$(Build.SourcesDirectory)'
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: '$(Build.SourcesDirectory)'
cmakeArgs: --build out4 -v --config Debug
- task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Release'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out4 -v --config RelWithDebInfo
- task: CMake@1
displayName: 'CMake (ClangCl): Config ARM64'
inputs:
cwd: '$(Build.SourcesDirectory)'
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: '$(Build.SourcesDirectory)'
cmakeArgs: --build out5 -v --config Debug
- task: CMake@1
displayName: 'CMake (ClangCl): Build ARM64 Release'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out5 -v --config RelWithDebInfo

View file

@ -0,0 +1,117 @@
# 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
trigger:
branches:
include:
- main
paths:
include:
- CMakeLists.txt
pr:
branches:
include:
- main
paths:
include:
- CMakeLists.txt
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
VS_GENERATOR: 'Visual Studio 16 2019'
WIN10_SDK: '10.0.19041.0'
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
pool:
vmImage: windows-2019
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 --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
- task: CMake@1
displayName: CMake (MSVC x64)
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)'
- task: CMake@1
displayName: CMake (Build x64)
inputs:
cwd: '$(Build.SourcesDirectory)'
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: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A ARM64 -B out2 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)'
- task: CMake@1
displayName: CMake (Build ARM64)
inputs:
cwd: '$(Build.SourcesDirectory)'
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: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out3 -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)'
- task: CMake@1
displayName: CMake (Build)
inputs:
cwd: '$(Build.SourcesDirectory)'
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

View file

@ -0,0 +1,290 @@
# 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
trigger: none
pr: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/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 --no-tags 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

View file

@ -0,0 +1,166 @@
# 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
trigger:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
pr:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
drafts: false
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
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'
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 --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
workingDirectory: $(Build.SourcesDirectory)
- task: PowerShell@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 --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
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

View file

@ -0,0 +1,66 @@
# 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
trigger: none
pr: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
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 --no-tags 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/runtime/v8.0.1/src/coreclr/pal/inc/rt/sal.h -OutFile $(Build.SourcesDirectory)/Inc/sal.h
$fileHash = Get-FileHash -Algorithm SHA512 $(Build.SourcesDirectory)/Inc/sal.h | ForEach { $_.Hash} | Out-String
$filehash = $fileHash.Trim()
Write-Host "##[debug]SHA512: " $filehash
if ($fileHash -ne "0f5a80b97564217db2ba3e4624cc9eb308e19cc9911dae21d983c4ab37003f4756473297ba81b386c498514cedc1ef5a3553d7002edc09aeb6a1335df973095f") {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
}
- task: CMake@1
displayName: DirectXMath Tests Build
inputs:
cwd: Tests
cmakeArgs: --build . -v

View file

@ -0,0 +1,85 @@
# 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
trigger:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
pr:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
drafts: false
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
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 --no-tags 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/runtime/v8.0.1/src/coreclr/pal/inc/rt/sal.h -OutFile $(Build.SourcesDirectory)/Inc/sal.h
$fileHash = Get-FileHash -Algorithm SHA512 $(Build.SourcesDirectory)/Inc/sal.h | ForEach { $_.Hash} | Out-String
$filehash = $fileHash.Trim()
Write-Host "##[debug]SHA512: " $filehash
if ($fileHash -ne "0f5a80b97564217db2ba3e4624cc9eb308e19cc9911dae21d983c4ab37003f4756473297ba81b386c498514cedc1ef5a3553d7002edc09aeb6a1335df973095f") {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
}
- task: CMake@1
displayName: DirectXMath Tests Build
inputs:
cwd: Tests
cmakeArgs: --build . -v

View file

@ -0,0 +1,557 @@
# 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
trigger:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
pr:
branches:
include:
- main
paths:
exclude:
- README.md
- HISTORY.md
- SECURITY.md
- LICENSE
drafts: false
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
Codeql.Enabled: true
pool:
vmImage: windows-2019
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 --no-tags 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 --no-tags 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

View file

@ -0,0 +1,86 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkID=615560
# Runs various SDL recommended tools on the code.
schedules:
- cron: "0 3 * * 0,3,5"
displayName: 'Three times a week'
branches:
include:
- main
trigger: none
pr: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
VS_GENERATOR: 'Visual Studio 17 2022'
GITHUB_PAT: $(GITHUBPUBLICTOKEN)
pool:
vmImage: windows-2022
jobs:
- job: SDL_BUILD
displayName: 'Build using required SDL tools'
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchTags: false
- task: NodeTool@0
displayName: 'NPM install'
inputs:
versionSpec: 14.x
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: 'Run Credential Scanner'
inputs:
debugMode: false
folderSuppression: false
- task: PoliCheck@2
displayName: 'Run PoliCheck'
inputs:
result: PoliCheck.xml
- task: CmdLine@2
displayName: Fetch Tests
inputs:
script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests
- task: Armory@2
displayName: Run ARMory
- task: CMake@1
displayName: 'CMake (MSVC): Config x64'
inputs:
cwd: '$(Build.SourcesDirectory)/Tests/headertest'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out'
- task: CodeQL3000Init@0
inputs:
Enabled: true
- task: VSBuild@1
displayName: 'Build C++ with CodeQL'
inputs:
solution: '$(Build.SourcesDirectory)/Tests/headertest/out/headertest.sln'
vsVersion: 17.0
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: CodeQL3000Finalize@0
condition: always()
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: 'Post Analysis'
inputs:
GdnBreakAllTools: true
GdnBreakPolicy: 'Microsoft'
GdnBreakPolicyMinSev: 'Error'
- task: ComponentGovernanceComponentDetection@0
displayName: Component Detection

View file

@ -0,0 +1,5 @@
@PACKAGE_INIT@
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake)
check_required_components("@PROJECT_NAME@")

View file

@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@DIRECTXMATH_LIBDIR_FOR_PKG_CONFIG@
includedir=@DIRECTXMATH_INCLUDEDIR_FOR_PKG_CONFIG@
Name: @PROJECT_NAME@
Description: @PROJECT_DESCRIPTION@
URL: @PROJECT_HOMEPAGE_URL@
Version: @PROJECT_VERSION@
Cflags: -I${includedir}
Libs:

View file

@ -0,0 +1,23 @@
# This module provides function for joining paths
# known from most languages
#
# SPDX-License-Identifier: (MIT OR CC0-1.0)
# Copyright 2020 Jan Tojnar
# https://github.com/jtojnar/cmake-snips
#
# Modelled after Pythons os.path.join
# https://docs.python.org/3.7/library/os.path.html#os.path.join
# Windows not supported
function(join_paths joined_path first_path_segment)
set(temp_path "${first_path_segment}")
foreach(current_segment IN LISTS ARGN)
if(NOT ("${current_segment}" STREQUAL ""))
if(IS_ABSOLUTE "${current_segment}")
set(temp_path "${current_segment}")
else()
set(temp_path "${temp_path}/${current_segment}")
endif()
endif()
endforeach()
set(${joined_path} "${temp_path}" PARENT_SCOPE)
endfunction()