1
0
mirror of https://github.com/microsoft/DirectXMath synced 2024-11-08 13:40:09 +00:00
DirectXMath/build/DirectXMath-GitHub-WSL.yml

86 lines
2.0 KiB
YAML

# 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 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 $(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 "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