2022-12-05 11:00:28 +03:00
# 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
2023-02-10 05:51:40 +03:00
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
2022-12-05 11:00:28 +03:00
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 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'
2022-12-05 11:34:56 +03:00
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -o $(Build.SourcesDirectory)/Inc/sal.h
$fileHash = Get-FileHash -Algorithm SHA512 $(Build.SourcesDirectory)/Inc/sal.h | ForEach { $_.Hash} | Out-String
2022-12-05 11:00:28 +03:00
$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