2022-12-05 02:22:15 +00:00
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
2024-10-06 06:15:54 +00:00
# https://go.microsoft.com/fwlink/?LinkId=248926
2022-12-05 02:22:15 +00:00
# Builds the library for Windows Subsystem for Linux (WSL)
schedules :
- cron : "0 3 * * *"
displayName : 'Nightly build'
branches :
include :
- main
2023-02-10 02:47:03 +00:00
trigger :
branches :
include :
- main
paths :
exclude :
2024-04-04 03:48:00 +00:00
- '*.md'
2023-02-10 02:47:03 +00:00
- LICENSE
2024-07-30 03:13:36 +00:00
- '.github/*'
2024-04-04 03:48:00 +00:00
- '.nuget/*'
2024-05-04 19:47:09 +00:00
- build/*.cmd
2024-10-06 06:15:54 +00:00
- build/OneFuzz*.json
2024-04-04 03:48:00 +00:00
- build/*.props
- build/*.ps1
- build/*.targets
2023-02-10 02:47:03 +00:00
pr :
branches :
include :
- main
paths :
exclude :
2024-04-04 03:48:00 +00:00
- '*.md'
2023-02-10 02:47:03 +00:00
- LICENSE
2024-07-30 03:13:36 +00:00
- '.github/*'
2024-04-04 03:48:00 +00:00
- '.nuget/*'
2024-05-04 19:47:09 +00:00
- build/*.cmd
2024-10-06 06:15:54 +00:00
- build/OneFuzz*.json
2024-04-04 03:48:00 +00:00
- build/*.props
- build/*.ps1
- build/*.targets
2023-02-10 02:47:03 +00:00
drafts : false
2022-12-05 02:22:15 +00:00
resources :
repositories :
- repository : self
type : git
ref : refs/heads/main
2024-10-06 06:15:54 +00:00
- repository : dxHeadersRepo
name : Microsoft/DirectX-Headers
type : github
endpoint : microsoft
ref : refs/heads/main
- repository : dxMathRepo
name : Microsoft/DirectXMath
type : github
endpoint : microsoft
ref : refs/heads/main
- repository : vcpkgRepo
name : Microsoft/vcpkg
type : github
endpoint : microsoft
ref : refs/tags/$(VCPKG_TAG)
2022-12-05 02:22:15 +00:00
name : $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
pool :
vmImage : ubuntu-20.04
variables :
2024-05-14 19:18:03 +00:00
Codeql.Enabled : false
2024-10-06 06:15:54 +00:00
VCPKG_ROOT : $(Build.SourcesDirectory)/vcpkg
VCPKG_CMAKE_DIR : $(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake
VCPKG_MANIFEST_DIR : $(Build.SourcesDirectory)/build
2024-04-04 03:48:00 +00:00
LOCAL_PKG_DIR : '$(Agent.BuildDirectory)/install/'
2022-12-05 02:22:15 +00:00
jobs :
- job : BUILD_WSL
displayName : 'Windows Subsystem for Linux (WSL)'
timeoutInMinutes : 120
cancelTimeoutInMinutes : 1
steps :
- checkout : self
clean : true
fetchTags : false
2024-10-06 06:15:54 +00:00
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'
2022-12-05 02:22:15 +00:00
- task : CMake@1
displayName : CMake DirectX-Headers
inputs :
cwd : directx-headers
2024-04-04 03:48:00 +00:00
cmakeArgs : . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
2022-12-05 02:22:15 +00:00
- task : CMake@1
displayName : CMake DirectX-Headers (Build)
inputs :
cwd : directx-headers
cmakeArgs : --build . -v
- task : CMake@1
displayName : CMake DirectX-Headers (Install)
inputs :
cwd : directx-headers
cmakeArgs : --install .
- task : CMake@1
displayName : CMake DirectXMath
inputs :
cwd : directxmath
2024-04-04 03:48:00 +00:00
cmakeArgs : . -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
2022-12-05 02:22:15 +00:00
- task : CMake@1
displayName : CMake DirectXMath (Build)
inputs :
cwd : directxmath
cmakeArgs : --build . -v
- task : CMake@1
displayName : CMake DirectXMath (Install)
inputs :
cwd : directxmath
cmakeArgs : --install .
- task : PowerShell@2
displayName : Fetch SAL.H
inputs :
targetType : inline
script : |
$ProgressPreference = 'SilentlyContinue'
2024-04-04 03:48:00 +00:00
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -OutFile $(LOCAL_PKG_DIR)/include/sal.h
$fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
2022-12-05 02:22:15 +00: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
2022-12-27 20:03:08 +00:00
displayName : CMake DirectXTex (Config) dbg
2022-12-05 02:22:15 +00:00
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2024-04-04 03:48:00 +00:00
cmakeArgs : -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
2022-12-05 02:22:15 +00:00
- task : CMake@1
2022-12-27 20:03:08 +00:00
displayName : CMake DirectXTex (Build) dbg
2022-12-05 02:22:15 +00:00
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2022-12-05 02:22:15 +00:00
cmakeArgs : --build out -v
2022-12-27 20:03:08 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Config) rel
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2024-04-04 03:48:00 +00:00
cmakeArgs : -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
2022-12-27 20:03:08 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Build) rel
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2022-12-27 20:03:08 +00:00
cmakeArgs : --build out2 -v
2024-04-04 03:48:00 +00:00
- job : BUILD_WSL_VCPKG
displayName : 'Windows Subsystem for Linux (WSL) using VCPKG'
timeoutInMinutes : 120
cancelTimeoutInMinutes : 1
steps :
- checkout : self
clean : true
fetchTags : false
2024-10-06 06:15:54 +00:00
fetchDepth : 1
path : 's'
- checkout : vcpkgRepo
2024-04-04 03:48:00 +00:00
displayName : Fetch VCPKG
2024-10-06 06:15:54 +00:00
clean : true
fetchTags : false
fetchDepth : 1
path : 's/vcpkg'
2024-04-04 03:48:00 +00:00
- task : Bash@3
displayName : VCPKG Bootstrap
inputs :
targetType : filePath
filePath : $(Build.SourcesDirectory)/vcpkg/bootstrap-vcpkg.sh
workingDirectory : $(Build.SourcesDirectory)/vcpkg
- task : CmdLine@2
displayName : GCC and CMake version
inputs :
script : |
g++ --version
cmake --version
- task : CmdLine@2
2024-10-06 06:15:54 +00:00
displayName : VCPKG install packages
2024-04-04 03:48:00 +00:00
inputs :
2024-10-06 06:15:54 +00:00
script : vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-linux
workingDirectory : $(VCPKG_ROOT)
2024-04-04 03:48:00 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Config) dbg
inputs :
2024-10-06 06:15:54 +00:00
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
2024-04-04 03:48:00 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Build) dbg
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2024-04-04 03:48:00 +00:00
cmakeArgs : --build out -v
- task : CMake@1
displayName : CMake DirectXTex (Config) rel
inputs :
2024-10-06 06:15:54 +00:00
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
2024-04-04 03:48:00 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Build) rel
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2024-04-04 03:48:00 +00:00
cmakeArgs : --build out2 -v
- task : CMake@1
displayName : CMake DirectXTex (Config) w/ OpenEXR
inputs :
2024-10-06 06:15:54 +00:00
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
2024-04-04 03:48:00 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Build) w/ OpenEXR
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2024-04-04 03:48:00 +00:00
cmakeArgs : --build out3 -v
- task : CMake@1
displayName : CMake DirectXTex (Config) w/ libjpeg
inputs :
2024-10-06 06:15:54 +00:00
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
2024-04-04 03:48:00 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Build) w/ libjpeg
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2024-04-04 03:48:00 +00:00
cmakeArgs : --build out4 -v
- task : CMake@1
displayName : CMake DirectXTex (Config) w/ libpng
inputs :
2024-10-06 06:15:54 +00:00
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
2024-04-04 03:48:00 +00:00
- task : CMake@1
displayName : CMake DirectXTex (Build) w/ libpng
inputs :
2024-10-06 06:15:54 +00:00
cwd : $(Build.SourcesDirectory)
2024-04-04 03:48:00 +00:00
cmakeArgs : --build out5 -v